lmc2179 / bayesian_bootstrap

bayesian bootstrapping in python
MIT License
121 stars 17 forks source link

Implement weight based bootstrapping for model #9

Closed JulianWgs closed 4 years ago

JulianWgs commented 4 years ago

This uses the sample_weights keywords of the fit function to make an bayesian bootstrap. This is more accurate and more performant than doing a resampling approach.

close #8

JulianWgs commented 4 years ago

There is still work in progress like writing tests, but I wanted to give you a chance to look at the implementation beforehand. Also I want to remark that this approach doesn't only work for regressions but also classification, etc. So I think functions like bayesian_bootstrap_regression should be renamed. Do you have anything in mind?

JulianWgs commented 4 years ago

Several things:

  1. Underscores in module names are not PEP8.
  2. Use an __init__.py to directly import things from a module. (bayesian_bootstrapping.mean instead of bayesian_bootstrapping.bootstrapping.mean)
  3. The code largely doesnt conform to PEP8 convention. Pylint gives a 5.00 out of10.
  4. Tests should deterministically.
  5. Pytest should be used instead of unittest. Pytest is much more flexible.
  6. Tests, which are being run by travis should should show up in this pull request.
lmc2179 commented 4 years ago

Sorry, my availability is a little limited right now with...well, you probably know, things are a little crazy everywhere right now. Thanks for your contribution, and for writing the tests - I'll review all the code once more to see where I can improve the naming, and will take your suggestion. I'll also package up a new release and get it on conda one of these days.

Thank you again!

JulianWgs commented 4 years ago

Thank you!

Be safe! Right now there are more important things in life than a Github project. If I can help you in any way, just reach out. I wish you all the best.

Take care :)