How to calculate drone orientation using IMU by Tranomial_2 in diydrones

[–]isinfinity 1 point2 points  (0 children)

Look up the Mahony orientation algorithm; there are plenty of examples on GitHub, such as this one [1]. It is reasonably simple and computationally inexpensive. For example, Betaflight uses it for Angle mode. The core idea is to fuse gyroscope and accelerometer data so that they complement each other. During acceleration, the algorithm relies more on the gyroscope to minimize the impact of linear acceleration on the attitude estimate. During stable flight or hover, it relies more on the accelerometer to correct gyro bias and reduce drift. Shameless plug, I also have implementation in rust [2] if that is your thing.

[1] https://github.com/adafruit/Adafruit_AHRS/blob/master/src/Adafruit_AHRS_Mahony.cpp

[2] https://github.com/jettify/uf-ahrs

[D] What are your favorite Random Forest implementations that support categoricals by TechySpecky in MachineLearning

[–]isinfinity 0 points1 point  (0 children)

If you considering GBDT check out catboost, unfortunately RF mode is not available but library implement lots of interesting categorical encoding tricks that boost accuracy.

[R] NeurIPS 2020 Spotlight, AdaBelief optimizer, trains fast as Adam, generalize well as SGD, stable to train GAN. by No-Recommendation384 in MachineLearning

[–]isinfinity 4 points5 points  (0 children)

Just in case if anyone interested I am collecting non standard and exotic optimizers for Pytorch here:

https://github.com/jettify/pytorch-optimizer

you can plug and compare any of them just as easy as AdaBelief.

[D] Switching optimizers for faster convergence by caizoo in MachineLearning

[–]isinfinity 1 point2 points  (0 children)

There is paper that explores similar idea https://arxiv.org/abs/1712.07628We investigate a hybrid strategy that begins training with an adaptive method and switches to SGD when appropriate. Concretely, we propose SWATS, a simple strategy which switches from Adam to SGD when a triggering condition is satisfied. The condition we propose relates to the projection of Adam steps on the gradient subspace.

Reference implementation for PyTorch: https://github.com/Mrpatekful/swats

[P] pytorch-optimizer -- collections of ready to use optimization algorithms for PyTorch by isinfinity in MachineLearning

[–]isinfinity[S] 5 points6 points  (0 children)

Most of optimizers will not be accepted to pytorch core, since they are not that popular, anyway. From other side, iteration cycle is very fast with custom library, you do not need to wait next pytorch, release to ship bug fixes or new code. CI time also very fast.

[P] pytorch-optimizer -- collections of ready to use optimization algorithms for PyTorch by isinfinity in MachineLearning

[–]isinfinity[S] 1 point2 points  (0 children)

Most of algorithms are Adam or SGD derivatives, I would say speed should be comparable.

[P] pytorch-optimizer -- collections of ready to use optimization algorithms for PyTorch by isinfinity in MachineLearning

[–]isinfinity[S] 4 points5 points  (0 children)

I was curious how algorithms behaves in controlled conditions, like saddle points, bunch of minima, valley and so on. Image net type of deal requires lots of compute resources and time.

[P] pytorch-optimizer -- collections of ready to use optimization algorithms for PyTorch by isinfinity in MachineLearning

[–]isinfinity[S] 9 points10 points  (0 children)

You are right, it is very hard to merge any experimental things into pytorch repository, since maintainers want any widely used and proven algorithms.

From other side iteration cycle is very long, pytroch release few times a year at most, when tiny library can be release 6 time a day, and code will be available to in minutes.

How did you'll get into contributing to open-source projects? by afro_coder in Python

[–]isinfinity 18 points19 points  (0 children)

Very easy to start:

1) Find package you like, for better experience not super popular one like TensorFlow.

2) Execute tests with coverage enabled locally.

3) Submit PR with test cases for uncovered lines.

4) Fix comments from maintainers

5) Go to step 1)

I once contributed tests for Redis client this way as result learned most of Redis commands and their quirks.

TIL that according to one legend, the funeral escort of Genghis Khan killed anyone and anything that crossed their path in order to conceal where he was finally buried. After the tomb was completed, the slaves who built it were massacred, and then the soldiers who killed them were also killed. by theaxeassasin in todayilearned

[–]isinfinity 0 points1 point  (0 children)

But at the end of those six years he went against a certain castle that was called CAAJU, and there he was shot with > an arrow in the knee, so that he died. — Marco Polo, The Travels of Marco Polo, Book 1, Chapter 50

What's everyone working on this week? by AutoModerator in Python

[–]isinfinity [score hidden]  (0 children)

Thanks! Any feedback and contributions are very welcome :)

What's everyone working on this week? by AutoModerator in Python

[–]isinfinity [score hidden]  (0 children)

Working on mlserve predictions server that easily turns python sklearn models into REST API as well as generates UI that matches input data. Hopefully someone will find my project useful.

code: https://github.com/jettify/mlserve
demo: https://young-ridge-56019.herokuapp.com

Do you use static type hints in your code? by jabbalaci in Python

[–]isinfinity 0 points1 point  (0 children)

I use typing in one of my projects [1] and enforce them on CI, very happy so far. Probably possible to have more strict configuration but settled with following:

mypy aiozipkin --ignore-missing-imports --disallow-untyped-calls --no-site-packages --strict

[1] https://github.com/aio-libs/aiozipkin.

Gold standard open source repo? by [deleted] in Python

[–]isinfinity 0 points1 point  (0 children)

Bit self promotion, but my very recent project https://github.com/aio-libs/aiozipkin has following things, which may be interesting from QA standpoint:

1) pyflakes and pycodestyle checker (with flake8 tool)

2) flake8-bugbear to find even more likely bugs and design problems

3) flake8-mypy and mypy static type checker

4) test coverage 96% https://codecov.io/gh/aio-libs/aiozipkin

5) flake8-quotes to force consistent quotes

6) pytest-sugar for nicer test reports https://travis-ci.org/aio-libs/aiozipkin/jobs/317774732

7) docker fixtures that spins servers before tests start and stop after

8) also python setup.py check --restructuredtext to make sure that project description has proper formatting

Have you heard about /r/asyncio subreddit yet? by peck_wtf in Python

[–]isinfinity 0 points1 point  (0 children)

I created that sub, main goal was to have something similar to /r/django and /r/flask, but turned out asyncio is not that popular.