Giter Site home page Giter Site logo

trekhleb / homemade-machine-learning Goto Github PK

View Code? Open in Web Editor NEW
22.4K 22.4K 4.0K 14.49 MB

๐Ÿค– Python examples of popular machine learning algorithms with interactive Jupyter demos and math being explained

License: MIT License

Python 0.59% Jupyter Notebook 99.41%
algorithm jupyter jupyter-notebook machine-learning machine-learning-algorithms machinelearning python

homemade-machine-learning's Introduction

Hi there!

I'm Oleksii. I work as a full-time software engineer at Uber. In my spare time I do open-sourcing (normally it is about 1-2 hours in the morning before the work).

Most of my open-source ๐Ÿš€ projects below ๐Ÿ‘‡๐Ÿป are focused on one thing - to help people learn ๐Ÿ“š. You may use these projects to learn about algorithms in JavaScript and get prepared for technical interviews, or to learn Python syntax and start experimenting with machine learning algorithms and math behind them, etc.

There are also other projects that I've developed for fun but that you might find useful, like โœ๐Ÿป okso.app online drawing app.

I also write ๐Ÿ“ articles about life, web-development and machine learning.

Getting in touch

trekhleb.dev

Follow me on Twitter ย  Follow me on LinkedIn ย  Follow me on Medium

homemade-machine-learning's People

Contributors

elkike8 avatar lizhangx avatar trekhleb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homemade-machine-learning's Issues

Software requirements for pc

Hi, Good Morning sir. I want to build a desktop software from my excel worksheet. So could you please help me. My WhatsApp number is+918903617327

error LogisticRegression

error LogisticRegression


ModuleNotFoundError Traceback (most recent call last)
in
5
6 # Import custom logistic regression implementation.
----> 7 from homemade.logistic_regression import LogisticRegression

D:\Projetos\Teste Fabio\homemade-machine-learning-master\homemade\logistic_regression_init_.py in
1 """Logistic Regression Module"""
2
----> 3 from .logistic_regression import LogisticRegression

D:\Projetos\Teste Fabio\homemade-machine-learning-master\homemade\logistic_regression\logistic_regression.py in
2
3 import numpy as np
----> 4 from scipy.optimize import minimize
5 from ..utils.features import prepare_for_training
6 from ..utils.hypothesis import sigmoid

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_init_.py in
385
386 from .optimize import *
--> 387 from ._minimize import *
388 from ._root import *
389 from ._root_scalar import *

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_minimize.py in
28 from ._trustregion_krylov import _minimize_trust_krylov
29 from ._trustregion_exact import _minimize_trustregion_exact
---> 30 from ._trustregion_constr import _minimize_trustregion_constr
31
32 # constrained minimization

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_trustregion_constr_init_.py in
2
3
----> 4 from .minimize_trustregion_constr import _minimize_trustregion_constr
5
6 all = ['_minimize_trustregion_constr']

D:\aplicativos\Anaconda3\lib\site-packages\scipy\optimize_trustregion_constr\minimize_trustregion_constr.py in
2 import time
3 import numpy as np
----> 4 from scipy.sparse.linalg import LinearOperator
5 from .._differentiable_functions import VectorFunction
6 from .._constraints import (

D:\aplicativos\Anaconda3\lib\site-packages\scipy\sparse_init_.py in
228 import warnings as _warnings
229
--> 230 from .base import *
231 from .csr import *
232 from .csc import *

D:\aplicativos\Anaconda3\lib\site-packages\scipy\sparse\base.py in
7
8 from scipy._lib.six import xrange
----> 9 from scipy._lib._numpy_compat import broadcast_to
10 from .sputils import (isdense, isscalarlike, isintlike,
11 get_sum_dtype, validateaxis, check_reshape_kwargs,

ModuleNotFoundError: No module named 'scipy._lib._numpy_compat'

I cannot connect jupyter notebook

[I 19:38:56.924 NotebookApp] 302 GET / (127.0.0.1) 1.13ms
[I 19:38:56.930 NotebookApp] 302 GET /tree? (127.0.0.1) 1.52ms
[W 19:38:56.966 NotebookApp] 403 POST /api/kernels (127.0.0.1): '_xsrf' argument missing from POST
[W 19:38:56.967 NotebookApp] '_xsrf' argument missing from POST
[W 19:38:56.967 NotebookApp] 403 POST /api/kernels (127.0.0.1) 1.17ms referer=None
[I 19:55:08.294 NotebookApp] 302 GET / (::1) 1.84ms


the above is the error message

I use intelliIdea and cannot connect jupyter notebook

Translation to Spanish

Hello, I find the repository very interesting, would it bother you if I make a translation into Spanish?

add_polynomials go wrong when process different shape of dataset_1 and dataset_2

Dear developers,
Thanks for the generous share of code.
When I learn the code of LinearRegression at the step of prepare_for_training, I have understood we need to split the features dataset into first half(dataset_1) and second half(dataset_2). But problems happen when we have odd number of features. let's say 5, so the shape of first half will be (-1,2) and the second (-1,3) which have different shape after split, then how can it work when calculate (dataset_1 ** (i - j)) * (dataset_2 ** j)? I mean dataset_1 ** (i - j) and dataset_2 ** j must have different shape, too.

Update Machine Learning Map ?

Hello,
I like your Machine Learning Map (homemade-machine-learning/images/machine-learning-map.png). But could you please complete it a little bit ?
For example, it would be great if you could add NLP, make connections between DQN and the Deep Learning rectangle, include, maybe, some Big Data technologies (Map Reduce for instance), and Planning as well. Monte Carlo Tree search could also appear.
Great job ! ๐Ÿ‘ ๐Ÿ‘
Damien

Predictions

Is there no module such that you could make predictions on new data for K-Means?

Translate to Russian

Russian translation would be appreciated very much by Russian pyhton community

theta[0] is caculated twice in per gradient_step at LinearRegression

Vectorized version of gradient descent.

theta = theta * reg_param - alpha * (1 / num_examples) * (delta.T @ self.data).T

We should NOT regularize the parameter theta_zero.

theta[0] = theta[0] - alpha * (1 / num_examples) * (self.data[:, 0].T @ delta).T

the first code line ,theta include theta[0].
so I think can write like this:
theta[0] -= alpha * (1 / num_examples) * (self.data[:, 0].T @ delta)
theta[1:] = theta[1:] * reg_param - alpha * (1 / num_examples) * (self.data[:, 1:].T @ delta)

thanks

New Comer in ML

Let me know that how can I improve skill in MLE. And if possible then show an easy to understand Roadmap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.