Live data from Hacker News

Machine Learning from scratch: Bare bones implementations in Python

github.com

41–50 of 67 posts

Re: Machine Learning from scratch: Bare bones implementations in Python

#46
post #21

Would you suggest any books/resources to learn the theory behind these implementations so a newbie can follow along?

probably this https://www.amazon.ca/Python-Machine-Learning-Sebastian-Rasc...

While a great book, most of this is just implementations of sklearn.

Re: Machine Learning from scratch: Bare bones implementations in Python

#47
Great resource, but it could be a phenomenal resource if you documented each method and explained how and why it does what it does.

Don't get me wrong, having working code to play with is key, but when you don't fully grasp the concepts behind it, an explanation can become so valuable.

That being said, you've included names, so research can be done. Great work and I hope you're enjoying it!

Re: Machine Learning from scratch: Bare bones implementations in Python

#48
In your RandomForest implementation, on the line in fit() where you're building the training subsets to give to each tree, it appears that your bagging approach doesn't use 'sampling with replacement' strategy.

    idx = np.random.choice(range(n_features), size=self.max_features, replace=False)   
It would appear that the replace=False prevents the 'sampling with replacement' behavior usually implemented by bagging algorithms. Should the replace=False be changed to replace=True?

Re: Machine Learning from scratch: Bare bones implementations in Python

#49
This could become a fantastic resource for anybody who is teaching machine learning.

One vital improvement suggestion to make that path attractive would be if the Jupyter notebook format were used. It would be easier to add more documentation and references.

But in any case, thanks for sharing!

Re: Machine Learning from scratch: Bare bones implementations in Python

#50
post #26

Earlier quoted context omitted.

GMRES is definitely my go-to these days. Though it is worth noting that direct methods do have a benefit of letting you quickly solve many successive linear problems involving the same matrix, but different right-hand sides. But iterative methods scale very well for large sparse problems that they are very often the only tool to consider. Block Krylov methods are a thing , but I haven't experimented with them yet.

For solving linear systems there are recent mind-blowing methods by R. M. Gower and P. Richtarik: https://arxiv.org/abs/1506.03296 http://www.maths.ed.ac.uk/~richtarik/papers/SDA.pdf Plus R. M. Gower is fantastically nice and enthusiastic so there's that And thanks for the link !

Has anyone implemented them in production? I read their paper a while ago, but thought that the dual methods they showed might have practical limitations (like insane cache misses, compared to more standard methods)
Post reply on HN