From e6747e09e31798ed18836843dd0b106da9226d18 Mon Sep 17 00:00:00 2001 From: tirthajyoti Date: Sat, 27 Jul 2019 11:20:02 -0700 Subject: [PATCH 1/5] Updated index.rst --- docs/index.rst | 396 +++++++++++++++++++++++-------------------------- 1 file changed, 185 insertions(+), 211 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 92d4e21..3266f5a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,211 +1,185 @@ -.. image:: https://readthedocs.org/projects/machine-learning-with-python/badge/?version=latest - :width: 15 % -.. image:: https://img.shields.io/badge/License-BSD%202--Clause-orange.svg - :width: 22 % -.. image:: https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg - :width: 13 % -.. image:: https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg - :width: 13 % - -| - -Python Machine Learning Notebooks (Tutorial style) -================================================== - -Dr. Tirthajyoti Sarkar, Fremont, CA (`Please feel free to add me on -LinkedIn -here `__) - --------------- - -Requirements -=============== - -- Python 3.5+ -- NumPy (``$ pip install numpy``) -- Pandas (``$ pip install pandas``) -- Scikit-learn (``$ pip install scikit-learn``) -- SciPy (``$ pip install scipy``) -- Statsmodels (``$ pip install statsmodels``) -- MatplotLib (``$ pip install matplotlib``) -- Seaborn (``$ pip install seaborn``) -- Sympy (``$ pip install sympy``) - --------------- - -You can start with this article that I wrote in Heartbeat magazine (on -Medium platform): - -`“Some Essential Hacks and Tricks for Machine Learning -with -Python” `__ - -.. image:: https://cookieegroup.com/wp-content/uploads/2018/10/2-1.png" - :width: 500px - :align: center - :height: 350px - :alt: alternate text - -Essential tutorial-type notebooks on Pandas and Numpy -======================================================= - -Jupyter notebooks covering a wide range of functions and operations on -the topics of NumPy, Pandans, Seaborn, matplotlib etc. - -- `Basics of Numpy - array `__ - -- `Basics of Pandas - DataFrame `__ - -- `Basics of Matplotlib and Descriptive - Statistics `__ - --------------- - -Regression -=============== -.. image:: https://slideplayer.com/slide/6053182/20/images/10/Simple+Linear+Regression+Model.jpg - :width: 400px - :align: center - :height: 300px - :alt: alternate text - -- Simple linear regression with t-statistic generation - -- `Multiple ways to perform linear regression in Python and their speed - comparison `__ - (`check the article I wrote on - freeCodeCamp `__) - -- `Multi-variate regression with - regularization `__ - -- Polynomial regression using ***scikit-learn pipeline feature*** - (`check the article I wrote on *Towards Data - Science* `__) -- Decision trees and Random Forest regression (showing how the Random - Forest works as a robust/regularized meta-estimator rejecting - overfitting) - -- `Detailed visual analytics and goodness-of-fit diagnostic tests for a - linear regression - problem `__ - --------------- - -Classification -=============== - -.. image:: https://qph.fs.quoracdn.net/main-qimg-914b29e777e78b44b67246b66a4d6d71 - :width: 500px - :align: center - :height: 350px - :alt: alternate text - -- Logistic regression/classification - -- *k*-nearest neighbor classification -- Decision trees and Random Forest Classification -- Support vector machine classification (`check the article I wrote - in Towards Data Science on SVM and sorting - algorithm `__) - -- Naive Bayes classification - --------------- - -Clustering -=============== - -.. image:: https://i.ytimg.com/vi/IJt62uaZR-M/maxresdefault.jpg - :width: 500px - :align: center - :height: 350px - :alt: alternate text - -- *K*-means clustering -- Affinity propagation (showing its time complexity and the effect of - damping factor) -- Mean-shift technique (showing its time complexity and the effect of - noise on cluster discovery) -- DBSCAN (showing how it can generically detect areas of high density - irrespective of cluster shapes, which the k-means fails to do) -- Hierarchical clustering with Dendograms showing how to choose optimal - number of clusters - --------------- - -Dimensionality reduction -=========================== - -.. image:: https://i.ytimg.com/vi/QP43Iy-QQWY/maxresdefault.jpg - :width: 500px - :align: center - :height: 350px - :alt: alternate text - -- Principal component analysis - --------------- - -Deep Learning/Neural Network -============================== - -- `Demo notebook to illustrate the superiority of deep neural network - for complex nonlinear function approximation - task `__ -- Step-by-step building of 1-hidden-layer and 2-hidden-layer dense - network using basic TensorFlow methods - --------------- - -Random data generation using symbolic expressions -====================================================== - -- How to use `Sympy package `__ to - generate random datasets using symbolic mathematical expressions. - -- Here is my article on Medium on this topic: `Random regression and - classification problem generation with symbolic - expression `__ - --------------- - -Simple deployment examples (serving ML models on web API) -============================================================ - -- `Serving a linear regression model through a simple HTTP server - interface `__. - User needs to request predictions by executing a Python script. Uses - ``Flask`` and ``Gunicorn``. - -- `Serving a recurrent neural network (RNN) through a HTTP - webpage `__, - complete with a web form, where users can input parameters and click - a button to generate text based on the pre-trained RNN model. Uses - ``Flask``, ``Jinja``, ``Keras``/``TensorFlow``, ``WTForms``. - --------------- - -Object-oriented programming with machine learning -====================================================== - -Implementing some of the core OOP principles in a machine learning -context by `building your own Scikit-learn-like estimator, and making it -better `__. - -See my articles on Medium on this topic. - -- `Object-oriented programming for data scientists: Build your ML - estimator `__ -- `How a simple mix of object-oriented programming can sharpen your - deep learning - prototype `__ - -.. |License| image:: https://img.shields.io/badge/License-BSD%202--Clause-orange.svg - :target: https://opensource.org/licenses/BSD-2-Clause -.. |GitHub forks| image:: https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg - :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/network -.. |GitHub stars| image:: https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg - :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/stargazers +|License| |GitHub forks| |GitHub stars| + +Python Machine Learning Notebooks (Tutorial style) +================================================== + +### Dr. Tirthajyoti Sarkar, Fremont, CA (`Please feel free to add me on LinkedIn here `__) +-------------------------------------------------------------------------------------------------------------------------------------------------- + +Requirements +~~~~~~~~~~~~ + +- **Python 3.5+** +- **NumPy (``$ pip install numpy``)** +- **Pandas (``$ pip install pandas``)** +- **Scikit-learn (``$ pip install scikit-learn``)** +- **SciPy (``$ pip install scipy``)** +- **Statsmodels (``$ pip install statsmodels``)** +- **MatplotLib (``$ pip install matplotlib``)** +- **Seaborn (``$ pip install seaborn``)** +- .. rubric:: **Sympy (``$ pip install sympy``)** + :name: sympy-pip-install-sympy + +You can start with this article that I wrote in Heartbeat magazine (on +Medium platform): ### `“Some Essential Hacks and Tricks for Machine +Learning with +Python” `__ + +Essential tutorial-type notebooks on Pandas and Numpy +----------------------------------------------------- + +Jupyter notebooks covering a wide range of functions and operations on +the topics of NumPy, Pandans, Seaborn, matplotlib etc. + +`Basic Numpy operations `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`Basic Pandas operations `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`Basics of visualization with Matplotlib and descriptive stats `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`Advanced Pandas operations `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`How to read various data sources `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`PDF reading and table processing demo `__ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`How fast are Numpy operations compared to pure Python code? `__ (Read my `article `__ on Medium related to this topic) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`Fast reading from Numpy using .npy file format `__ (Read my `article `__ on Medium on this topic) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tutorial-type notebooks covering regression, classification, clustering, dimensionality reduction, and some basic neural network algorithms +------------------------------------------------------------------------------------------------------------------------------------------- + +Regression +~~~~~~~~~~ + +- Simple linear regression with t-statistic generation + +- `Multiple ways to perform linear regression in Python and their speed + comparison `__ + (`check the article I wrote on + freeCodeCamp `__) + +- `Multi-variate regression with + regularization `__ + +- Polynomial regression using **scikit-learn pipeline feature** (`check + the article I wrote on Towards Data + Science `__) + +- Decision trees and Random Forest regression (showing how the Random + Forest works as a robust/regularized meta-estimator rejecting + overfitting) + +- `Detailed visual analytics and goodness-of-fit diagnostic tests for a + linear regression + problem `__ + +-------------- + +Classification +~~~~~~~~~~~~~~ + +- Logistic regression/classification + +- *k*-nearest neighbor classification + +- Decision trees and Random Forest Classification + +- Support vector machine classification (`check the article I wrote in + Towards Data Science on SVM and sorting + algorithm `__\ **)** + +- Naive Bayes classification + +-------------- + +Clustering +~~~~~~~~~~ + +- *K*-means clustering +- Affinity propagation (showing its time complexity and the effect of + damping factor) +- Mean-shift technique (showing its time complexity and the effect of + noise on cluster discovery) +- DBSCAN (showing how it can generically detect areas of high density + irrespective of cluster shapes, which the k-means fails to do) +- Hierarchical clustering with Dendograms showing how to choose optimal + number of clusters + +-------------- + +Dimensionality reduction +~~~~~~~~~~~~~~~~~~~~~~~~ + +- Principal component analysis + +-------------- + +Deep Learning/Neural Network +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- `Demo notebook to illustrate the superiority of deep neural network + for complex nonlinear function approximation + task `__ +- Step-by-step building of 1-hidden-layer and 2-hidden-layer dense + network using basic TensorFlow methods + +-------------- + +Random data generation using symbolic expressions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- How to use `Sympy package `__ to + generate random datasets using symbolic mathematical expressions. + +- .. rubric:: Here is my article on Medium on this topic: `Random + regression and classification problem generation with symbolic + expression `__ + :name: here-is-my-article-on-medium-on-this-topic-random-regression-and-classification-problem-generation-with-symbolic-expression + +Simple deployment examples (serving ML models on web API) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- `Serving a linear regression model through a simple HTTP server + interface `__. + User needs to request predictions by executing a Python script. Uses + ``Flask`` and ``Gunicorn``. + +- `Serving a recurrent neural network (RNN) through a HTTP + webpage `__, + complete with a web form, where users can input parameters and click + a button to generate text based on the pre-trained RNN model. Uses + ``Flask``, ``Jinja``, ``Keras``/``TensorFlow``, ``WTForms``. + +-------------- + +Object-oriented programming with machine learning +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Implementing some of the core OOP principles in a machine learning +context by `building your own Scikit-learn-like estimator, and making it +better `__. + +See my articles on Medium on this topic. + +- `Object-oriented programming for data scientists: Build your ML + estimator `__ +- `How a simple mix of object-oriented programming can sharpen your + deep learning + prototype `__ + +.. |License| image:: https://img.shields.io/badge/License-BSD%202--Clause-orange.svg + :target: https://opensource.org/licenses/BSD-2-Clause +.. |GitHub forks| image:: https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg + :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/network +.. |GitHub stars| image:: https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg + :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/stargazers From 84cc9d3d4937ebfdf2dab5153cbb4cd24051ade2 Mon Sep 17 00:00:00 2001 From: tirthajyoti Date: Sat, 27 Jul 2019 11:22:45 -0700 Subject: [PATCH 2/5] deleted new index.rst --- docs/index.rst | 185 ------------------------------------------------- 1 file changed, 185 deletions(-) delete mode 100644 docs/index.rst diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 3266f5a..0000000 --- a/docs/index.rst +++ /dev/null @@ -1,185 +0,0 @@ -|License| |GitHub forks| |GitHub stars| - -Python Machine Learning Notebooks (Tutorial style) -================================================== - -### Dr. Tirthajyoti Sarkar, Fremont, CA (`Please feel free to add me on LinkedIn here `__) --------------------------------------------------------------------------------------------------------------------------------------------------- - -Requirements -~~~~~~~~~~~~ - -- **Python 3.5+** -- **NumPy (``$ pip install numpy``)** -- **Pandas (``$ pip install pandas``)** -- **Scikit-learn (``$ pip install scikit-learn``)** -- **SciPy (``$ pip install scipy``)** -- **Statsmodels (``$ pip install statsmodels``)** -- **MatplotLib (``$ pip install matplotlib``)** -- **Seaborn (``$ pip install seaborn``)** -- .. rubric:: **Sympy (``$ pip install sympy``)** - :name: sympy-pip-install-sympy - -You can start with this article that I wrote in Heartbeat magazine (on -Medium platform): ### `“Some Essential Hacks and Tricks for Machine -Learning with -Python” `__ - -Essential tutorial-type notebooks on Pandas and Numpy ------------------------------------------------------ - -Jupyter notebooks covering a wide range of functions and operations on -the topics of NumPy, Pandans, Seaborn, matplotlib etc. - -`Basic Numpy operations `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`Basic Pandas operations `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`Basics of visualization with Matplotlib and descriptive stats `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`Advanced Pandas operations `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`How to read various data sources `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`PDF reading and table processing demo `__ -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`How fast are Numpy operations compared to pure Python code? `__ (Read my `article `__ on Medium related to this topic) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -`Fast reading from Numpy using .npy file format `__ (Read my `article `__ on Medium on this topic) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Tutorial-type notebooks covering regression, classification, clustering, dimensionality reduction, and some basic neural network algorithms -------------------------------------------------------------------------------------------------------------------------------------------- - -Regression -~~~~~~~~~~ - -- Simple linear regression with t-statistic generation - -- `Multiple ways to perform linear regression in Python and their speed - comparison `__ - (`check the article I wrote on - freeCodeCamp `__) - -- `Multi-variate regression with - regularization `__ - -- Polynomial regression using **scikit-learn pipeline feature** (`check - the article I wrote on Towards Data - Science `__) - -- Decision trees and Random Forest regression (showing how the Random - Forest works as a robust/regularized meta-estimator rejecting - overfitting) - -- `Detailed visual analytics and goodness-of-fit diagnostic tests for a - linear regression - problem `__ - --------------- - -Classification -~~~~~~~~~~~~~~ - -- Logistic regression/classification - -- *k*-nearest neighbor classification - -- Decision trees and Random Forest Classification - -- Support vector machine classification (`check the article I wrote in - Towards Data Science on SVM and sorting - algorithm `__\ **)** - -- Naive Bayes classification - --------------- - -Clustering -~~~~~~~~~~ - -- *K*-means clustering -- Affinity propagation (showing its time complexity and the effect of - damping factor) -- Mean-shift technique (showing its time complexity and the effect of - noise on cluster discovery) -- DBSCAN (showing how it can generically detect areas of high density - irrespective of cluster shapes, which the k-means fails to do) -- Hierarchical clustering with Dendograms showing how to choose optimal - number of clusters - --------------- - -Dimensionality reduction -~~~~~~~~~~~~~~~~~~~~~~~~ - -- Principal component analysis - --------------- - -Deep Learning/Neural Network -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `Demo notebook to illustrate the superiority of deep neural network - for complex nonlinear function approximation - task `__ -- Step-by-step building of 1-hidden-layer and 2-hidden-layer dense - network using basic TensorFlow methods - --------------- - -Random data generation using symbolic expressions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- How to use `Sympy package `__ to - generate random datasets using symbolic mathematical expressions. - -- .. rubric:: Here is my article on Medium on this topic: `Random - regression and classification problem generation with symbolic - expression `__ - :name: here-is-my-article-on-medium-on-this-topic-random-regression-and-classification-problem-generation-with-symbolic-expression - -Simple deployment examples (serving ML models on web API) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- `Serving a linear regression model through a simple HTTP server - interface `__. - User needs to request predictions by executing a Python script. Uses - ``Flask`` and ``Gunicorn``. - -- `Serving a recurrent neural network (RNN) through a HTTP - webpage `__, - complete with a web form, where users can input parameters and click - a button to generate text based on the pre-trained RNN model. Uses - ``Flask``, ``Jinja``, ``Keras``/``TensorFlow``, ``WTForms``. - --------------- - -Object-oriented programming with machine learning -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Implementing some of the core OOP principles in a machine learning -context by `building your own Scikit-learn-like estimator, and making it -better `__. - -See my articles on Medium on this topic. - -- `Object-oriented programming for data scientists: Build your ML - estimator `__ -- `How a simple mix of object-oriented programming can sharpen your - deep learning - prototype `__ - -.. |License| image:: https://img.shields.io/badge/License-BSD%202--Clause-orange.svg - :target: https://opensource.org/licenses/BSD-2-Clause -.. |GitHub forks| image:: https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg - :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/network -.. |GitHub stars| image:: https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg - :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/stargazers From c8ac31be28215fca21f704d3d7a8f01405de58b6 Mon Sep 17 00:00:00 2001 From: tirthajyoti Date: Sat, 27 Jul 2019 14:53:21 -0700 Subject: [PATCH 3/5] Added updated index.rst --- docs/index.rst | 214 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 docs/index.rst diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..41b5604 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,214 @@ +|License| |GitHub forks| |GitHub stars| + +Python Machine Learning Notebooks (Tutorial style) +================================================== + +Authored and maintained by Dr. Tirthajyoti Sarkar, Fremont, CA. `Please +feel free to add me on LinkedIn +here `__. + +-------------- + +Requirements +------------ + +- Python 3.5 +- NumPy (``pip install numpy``) +- Pandas (``pip install pandas``) +- Scikit-learn (``pip install scikit-learn``) +- SciPy (``pip install scipy``) +- Statsmodels (``pip install statsmodels``) +- MatplotLib (``pip install matplotlib``) +- Seaborn (``pip install seaborn``) +- Sympy (``pip install sympy``) + +-------------- + +You can start with this article that I wrote in Heartbeat magazine (on +Medium platform): + +`“Some Essential Hacks and Tricks for Machine Learning with +Python” `__ + +Essential tutorial-type notebooks on Pandas and Numpy +----------------------------------------------------- + +Jupyter notebooks covering a wide range of functions and operations on +the topics of NumPy, Pandans, Seaborn, matplotlib etc. + +- `Basic Numpy + operations `__ +- `Basic Pandas + operations `__ +- `Basics of visualization with Matplotlib and descriptive + stats `__ +- `Advanced Pandas + operations `__ +- `How to read various data + sources `__ +- `PDF reading and table processing + demo `__ +- `How fast are Numpy operations compared to pure Python + code? `__ + (Read my + `article `__ + on Medium related to this topic) +- `Fast reading from Numpy using .npy file + format `__ + (Read my + `article `__ + on Medium on this topic) + +Regression +---------- + +- Simple linear regression with t-statistic generation (`Here is the + Notebook `__) + +- Multiple ways to perform linear regression in Python and their speed + comparison (`Here is the + Notebook `__). + Also `check the article I wrote on + freeCodeCamp `__ + +- Multi-variate regression with regularization (`Here is the + Notebook `__) + +- Polynomial regression using **scikit-learn pipeline feature** (`Here + is the + Notebook `__). + Also `check the article I wrote on Towards Data + Science `__. + +- Decision trees and Random Forest regression (showing how the Random + Forest works as a robust/regularized meta-estimator rejecting + overfitting) (`Here is the + Notebook `__). + +- Detailed visual analytics and goodness-of-fit diagnostic tests for a + linear regression problem (`Here is the + Notebook `__). + +-------------- + +Classification +-------------- + +- Logistic regression/classification (`Here is the + Notebook `__). + +- *k*-nearest neighbor classification (`Here is the + Notebook `__). + +- Decision trees and Random Forest Classification (`Here is the + Notebook `__). + +- Support vector machine classification (`Here is the + Notebook `__). + Also `check the article I wrote in Towards Data Science on SVM and + sorting + algorithm `__. + +- Naive Bayes classification (`Here is the + Notebook `__). + +-------------- + +Clustering +---------- + +- *K*-means clustering (`Here is the + Notebook `__). + +- Affinity propagation (showing its time complexity and the effect of + damping factor) (`Here is the + Notebook `__). + +- Mean-shift technique (showing its time complexity and the effect of + noise on cluster discovery) (`Here is the + Notebook `__). + +- DBSCAN (showing how it can generically detect areas of high density + irrespective of cluster shapes, which the k-means fails to do) (`Here + is the + Notebook `__). + +- Hierarchical clustering with Dendograms showing how to choose optimal + number of clusters (`Here is the + Notebook `__). + +-------------- + +Dimensionality reduction +------------------------ + +- Principal component analysis (`Here is the + Notebook `__) + +-------------- + +Random data generation using symbolic expressions +------------------------------------------------- + +- Simple script to generate random polynomial expression/function + (`Here is the + Notebook `__). + +- How to use `Sympy package `__ to + generate random datasets using symbolic mathematical expressions + (`Here is the + Notebook `__). + Also, `here is the Python + script `__ + if anybody wants to use it directly in their project. + +- Here is my article on Medium on this topic: `Random regression and + classification problem generation with symbolic + expression `__ + +-------------- + +Simple deployment examples (serving ML models on web API) +--------------------------------------------------------- + +- `Serving a linear regression model through a simple HTTP server + interface `__. + User needs to request predictions by executing a Python script. Uses + ``Flask`` and ``Gunicorn``. + +- `Serving a recurrent neural network (RNN) through a HTTP + webpage `__, + complete with a web form, where users can input parameters and click + a button to generate text based on the pre-trained RNN model. Uses + ``Flask``, ``Jinja``, ``Keras``/``TensorFlow``, ``WTForms``. + +-------------- + +Object-oriented programming with machine learning +------------------------------------------------- + +Implementing some of the core OOP principles in a machine learning +context by `building your own Scikit-learn-like estimator, and making it +better `__. + +`Here is the complete Python script with the linear regression +class `__, +which can do fitting, prediction, cpmputation of regression metrics, +plot outliers, plot diagnostics (linearity, constant variance, etc.), +compute variance inflation factors. + +See my articles on Medium on this topic. + +- `Object-oriented programming for data scientists: Build your ML + estimator `__ + +- `How a simple mix of object-oriented programming can sharpen your + deep learning + prototype `__ + +.. |License| image:: https://img.shields.io/badge/License-BSD%202--Clause-orange.svg + :target: https://opensource.org/licenses/BSD-2-Clause +.. |GitHub forks| image:: https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg + :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/network +.. |GitHub stars| image:: https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg + :target: https://github.com/tirthajyoti/Machine-Learning-with-Python/stargazers From 8ba34c4181e1fdaaa61a0507770c6927dcafc19f Mon Sep 17 00:00:00 2001 From: Tirthajyoti Sarkar Date: Sat, 27 Jul 2019 14:59:28 -0700 Subject: [PATCH 4/5] Update index.rst --- docs/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 41b5604..0595ee9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,6 +9,10 @@ here `__. -------------- +.. image:: https://miro.medium.com/max/1838/1*92h6Lg1Bu1F9QqoVNrkLdQ.jpeg + :width: 500px + :height: 450px + Requirements ------------ From 7b6250e3db39aaa3a3068f6b24ca3cc0a0a273b1 Mon Sep 17 00:00:00 2001 From: Tirthajyoti Sarkar Date: Sun, 21 Mar 2021 15:42:13 -0700 Subject: [PATCH 5/5] Update README.md --- README.md | 98 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 65 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 3f96239..e9145c9 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,36 @@ [![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause) [![GitHub forks](https://img.shields.io/github/forks/tirthajyoti/Machine-Learning-with-Python.svg)](https://github.com/tirthajyoti/Machine-Learning-with-Python/network) [![GitHub stars](https://img.shields.io/github/stars/tirthajyoti/Machine-Learning-with-Python.svg)](https://github.com/tirthajyoti/Machine-Learning-with-Python/stargazers) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/tirthajyoti/Machine-Learning-with-Python/pulls) -# Python Machine Learning Notebooks (Tutorial style) +# Python Machine Learning Jupyter Notebooks ([ML website](https://machine-learning-with-python.readthedocs.io/en/latest/)) + +### Dr. Tirthajyoti Sarkar, Fremont, California ([Please feel free to connect on LinkedIn here](https://www.linkedin.com/in/tirthajyoti-sarkar-2127aa7)) -### Dr. Tirthajyoti Sarkar, Fremont, CA ([Please feel free to add me on LinkedIn here](https://www.linkedin.com/in/tirthajyoti-sarkar-2127aa7)) --- -### Requirements -* **Python 3.5+** -* **NumPy (`$ pip install numpy`)** -* **Pandas (`$ pip install pandas`)** -* **Scikit-learn (`$ pip install scikit-learn`)** -* **SciPy (`$ pip install scipy`)** -* **Statsmodels (`$ pip install statsmodels`)** -* **MatplotLib (`$ pip install matplotlib`)** -* **Seaborn (`$ pip install seaborn`)** -* **Sympy (`$ pip install sympy`)** +## Also check out these super-useful Repos that I curated + +[Highly cited and useful papers related to machine learning, deep learning, AI, game theory, reinforcement learning](https://github.com/tirthajyoti/Papers-Literature-ML-DL-RL-AI) + +[Carefully curated resource links for data science in one place](https://github.com/tirthajyoti/Data-science-best-resources) + +## Requirements +* **Python 3.6+** +* **NumPy (`pip install numpy`)** +* **Pandas (`pip install pandas`)** +* **Scikit-learn (`pip install scikit-learn`)** +* **SciPy (`pip install scipy`)** +* **Statsmodels (`pip install statsmodels`)** +* **MatplotLib (`pip install matplotlib`)** +* **Seaborn (`pip install seaborn`)** +* **Sympy (`pip install sympy`)** +* **Flask (`pip install flask`)** +* **WTForms (`pip install wtforms`)** +* **Tensorflow (`pip install tensorflow>=1.15`)** +* **Keras (`pip install keras`)** +* **pdpipe (`pip install pdpipe`)** + --- You can start with this article that I wrote in Heartbeat magazine (on Medium platform): @@ -24,16 +38,17 @@ You can start with this article that I wrote in Heartbeat magazine (on Medium pl ## Essential tutorial-type notebooks on Pandas and Numpy -Jupyter notebooks covering a wide range of functions and operations on the topics of NumPy, Pandans, Seaborn, matplotlib etc. - -### [Basic Numpy operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Basics%20of%20Numpy%20arrays.ipynb) -### [Basic Pandas operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Basics%20of%20Pandas%20DataFrame.ipynb) -### [Basics of visualization with Matplotlib and descriptive stats](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Basics%20of%20Matplotlib%20and%20Descriptive%20Statistics.ipynb) -### [Advanced Pandas operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Advanced%20Pandas%20Operations.ipynb) -### [How to read various data sources](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Read_data_various_sources/How%20to%20read%20various%20sources%20in%20a%20DataFrame.ipynb) -### [PDF reading and table processing demo](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Read_data_various_sources/PDF%20table%20reading%20and%20processing%20demo.ipynb) -### [How fast are Numpy operations compared to pure Python code?](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/How%20fast%20are%20NumPy%20ops.ipynb) (Read my [article](https://towardsdatascience.com/why-you-should-forget-for-loop-for-data-science-code-and-embrace-vectorization-696632622d5f) on Medium related to this topic) -### [Fast reading from Numpy using .npy file format](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Numpy_Reading.ipynb) (Read my [article](https://towardsdatascience.com/why-you-should-start-using-npy-file-more-often-df2a13cc0161) on Medium on this topic) +Jupyter notebooks covering a wide range of functions and operations on the topics of NumPy, Pandans, Seaborn, Matplotlib etc. + +* [Detailed Numpy operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Numpy_operations.ipynb) +* [Detailed Pandas operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Pandas_Operations.ipynb) +* [Numpy and Pandas quick basics](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Numpy_Pandas_Quick.ipynb) +* [Matplotlib and Seaborn quick basics](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Matplotlib_Seaborn_basics.ipynb) +* [Advanced Pandas operations](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Advanced%20Pandas%20Operations.ipynb) +* [How to read various data sources](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Read_data_various_sources/How%20to%20read%20various%20sources%20in%20a%20DataFrame.ipynb) +* [PDF reading and table processing demo](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Read_data_various_sources/PDF%20table%20reading%20and%20processing%20demo.ipynb) +* [How fast are Numpy operations compared to pure Python code?](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/How%20fast%20are%20NumPy%20ops.ipynb) (Read my [article](https://towardsdatascience.com/why-you-should-forget-for-loop-for-data-science-code-and-embrace-vectorization-696632622d5f) on Medium related to this topic) +* [Fast reading from Numpy using .npy file format](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Pandas%20and%20Numpy/Numpy_Reading.ipynb) (Read my [article](https://towardsdatascience.com/why-you-should-start-using-npy-file-more-often-df2a13cc0161) on Medium on this topic) ## Tutorial-type notebooks covering regression, classification, clustering, dimensionality reduction, and some basic neural network algorithms @@ -47,34 +62,44 @@ Jupyter notebooks covering a wide range of functions and operations on the topic * Polynomial regression using ***scikit-learn pipeline feature*** ([check the article I wrote on *Towards Data Science*](https://towardsdatascience.com/machine-learning-with-python-easy-and-robust-method-to-fit-nonlinear-data-19e8a1ddbd49)) -* Decision trees and Random Forest regression (showing how the Random Forest works as a robust/regularized meta-estimator rejecting overfitting) + +* [Decision trees and Random Forest regression](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Regression/Random_Forest_Regression.ipynb) (showing how the Random Forest works as a robust/regularized meta-estimator rejecting overfitting) * [Detailed visual analytics and goodness-of-fit diagnostic tests for a linear regression problem](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Regression/Regression_Diagnostics.ipynb) +* [Robust linear regression using `HuberRegressor` from Scikit-learn](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Regression/Robust%20Linear%20Regression.ipynb) + ----- ### Classification -* Logistic regression/classification +* Logistic regression/classification ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Classification/Logistic_Regression_Classification.ipynb)) -* _k_-nearest neighbor classification -* Decision trees and Random Forest Classification -* Support vector machine classification (**[check the article I wrote in Towards Data Science on SVM and sorting algorithm](https://towardsdatascience.com/how-the-good-old-sorting-algorithm-helps-a-great-machine-learning-technique-9e744020254b))** +* _k_-nearest neighbor classification ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Classification/KNN_Classification.ipynb)) + +* Decision trees and Random Forest Classification ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Classification/DecisionTrees_RandomForest_Classification.ipynb)) + +* Support vector machine classification ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Classification/Support_Vector_Machine_Classification.ipynb)) (**[check the article I wrote in Towards Data Science on SVM and sorting algorithm](https://towardsdatascience.com/how-the-good-old-sorting-algorithm-helps-a-great-machine-learning-technique-9e744020254b))** -* Naive Bayes classification +* Naive Bayes classification ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Classification/Naive_Bayes_Classification.ipynb)) --- ### Clustering -* _K_-means clustering -* Affinity propagation (showing its time complexity and the effect of damping factor) -* Mean-shift technique (showing its time complexity and the effect of noise on cluster discovery) -* DBSCAN (showing how it can generically detect areas of high density irrespective of cluster shapes, which the k-means fails to do) -* Hierarchical clustering with Dendograms showing how to choose optimal number of clusters +* _K_-means clustering ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Clustering-Dimensionality-Reduction/K_Means_Clustering_Practice.ipynb)) + +* Affinity propagation (showing its time complexity and the effect of damping factor) ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Clustering-Dimensionality-Reduction/Affinity_Propagation.ipynb)) + +* Mean-shift technique (showing its time complexity and the effect of noise on cluster discovery) ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Clustering-Dimensionality-Reduction/Mean_Shift_Clustering.ipynb)) + +* DBSCAN (showing how it can generically detect areas of high density irrespective of cluster shapes, which the k-means fails to do) ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Clustering-Dimensionality-Reduction/DBScan_Clustering.ipynb)) + +* Hierarchical clustering with Dendograms showing how to choose optimal number of clusters ([Here is the Notebook](https://github.com/tirthajyoti/Machine-Learning-with-Python/blob/master/Clustering-Dimensionality-Reduction/Hierarchical_Clustering.ipynb)) + --- @@ -96,8 +121,12 @@ Jupyter notebooks covering a wide range of functions and operations on the topic * How to use [Sympy package](https://www.sympy.org/en/index.html) to generate random datasets using symbolic mathematical expressions. * Here is my article on Medium on this topic: [Random regression and classification problem generation with symbolic expression](https://towardsdatascience.com/random-regression-and-classification-problem-generation-with-symbolic-expression-a4e190e37b8d) + --- +### Synthetic data generation techniques +* [Notebooks here](https://github.com/tirthajyoti/Machine-Learning-with-Python/tree/master/Synthetic_data_generation) + ### Simple deployment examples (serving ML models on web API) * [Serving a linear regression model through a simple HTTP server interface](https://github.com/tirthajyoti/Machine-Learning-with-Python/tree/master/Deployment/Linear_regression). User needs to request predictions by executing a Python script. Uses `Flask` and `Gunicorn`. @@ -113,3 +142,6 @@ See my articles on Medium on this topic. * [Object-oriented programming for data scientists: Build your ML estimator](https://towardsdatascience.com/object-oriented-programming-for-data-scientists-build-your-ml-estimator-7da416751f64) * [How a simple mix of object-oriented programming can sharpen your deep learning prototype](https://towardsdatascience.com/how-a-simple-mix-of-object-oriented-programming-can-sharpen-your-deep-learning-prototype-19893bd969bd) +--- +### Unit testing ML code with Pytest +Check the files and detailed instructions in the [Pytest](https://github.com/tirthajyoti/Machine-Learning-with-Python/tree/master/Pytest) directory to understand how one should write unit testing code/module for machine learning models