Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🌎 machine learning algorithms tutorials (mainly in Python3)

License

Notifications You must be signed in to change notification settings

MachineLearningOrg/machine-learning

Repository files navigation

machine-learning

license Python 3.5

This is one of the continuously updated repositories that documents personal journey on learning data science related topics. Currently, contents are organized into two separate repositories based on the following table's description.

Repository Documentation Focus
machine-learning Machine learning, algorithm and programming (mainly in Python)
Business-Analytics All other data analytic related stuffs, e.g. concepts, statistics, visualizations (R, Python)

Within each section, documentations are listed in reverse chronological order of the start date (the date when the first notebook in that folder was created, if the notebook happened to be updated, then the actual date will be at the top of each notebook). Each of them are independent of one another unless specified.

Documentation Listings

model_selection : 2017年06月12日

Methods for selecting, evaluating models/algorithms.

  • K-fold cross validation, grid/random search from scratch. [nbviewer]

spark : 2017年06月07日

Note that the following notebook is not a tutorial on the basics of spark, it assumes you're already somewhat familar with it or can pick it up quickly by checking documentations along the way. For those interested there's also a pyspark cheatsheet that may come in handy.

  • Pyspark installation on Mac. [markdown]
  • Examples of manipulating with data (crimes data) and building a RandomForest model with Spark. [nbviewer]
  • PCA with Spark's ML. [nbviewer]

dim_reduct : 2017年01月02日

Dimensionality reduction methods.

  • Principal Component Analysis (PCA) from scratch. [nbviewer]

recsys : 2016年12月17日

Recommendation System. Starters into the field should go through the first notebook to understand the basics of matrix factorization methods. Then the second notebook - "ALS-WR for implicit feedback data" and third notebook - "Bayesian Personalized Ranking" are independent of one another as they are simply different algorithms.

  • Alternating Least Squares with Weighted Regularization (ALS-WR) from scratch. [nbviewer]
  • ALS-WR for implicit feedback data from scratch & mean average precision at k evaluation. [nbviewer]
  • Bayesian Personalized Ranking (BPR) from scratch & AUC evaluation. [nbviewer]

trees : 2016年12月10日

Tree-based models for both regression and classification tasks.

  • Decision Tree from scratch. [nbviewer]
  • Random Forest from scratch and Extra Trees. [nbviewer]
  • Gradient Boosting Machine from scratch. [nbviewer]
  • Xgboost API walkthrough (includes hyperparmeter tuning via scikit-learn like API). [nbviewer]

association_rule : 2016年09月16日

Also known as market-basket analysis.

  • Apriori from scratch. [nbviewer]
  • Using R's arules package (aprori) on tabular data. [Rmarkdown]

clustering : 2016年08月16日

TF-IDF and Topic Modeling are techniques specifically used for text analytics.

  • TF-IDF (text frequency - inverse document frequency) from scratch. [nbviewer]
  • K-means, K-means++ from scratch; Elbow method for choosing K. [nbviewer]
  • Gaussian Mixture Model from scratch; AIC and BIC for choosing the number of Gaussians. [nbviewer]
  • Topic Modeling with gensim's Latent Dirichlet Allocation(LDA). [nbviewer]

data_science_is_software : 2016年08月01日

SciPy 2016: Data Science is Software. Best practices for doing data science (in Python).

deep_learning : 2016年07月23日

Curated notes on deep learning. Tensorflow is used to implement some of the models.

  • Softmax Regression from scratch. [nbviewer]
  • Softmax Regression using Tensorflow (includes Tensorflow hello world). [nbviewer]
  • Multi-layers Neural Network. [nbviewer]
  • Convolutional Neural Network. [nbviewer]

keras : 2016年06月29日

Walking through keras, a high-level deep learning library. Note that this is only a API walkthrough, not a tutorial on the details of deep learning. For those interested there's also a keras cheatsheet that may come in handy.

  • Multi-layers Neural Network (keras basics). [nbviewer]
  • Multi-layers Neural Network hyperparameter tuning via scikit-learn like API. [nbviewer]
  • Convolutional Neural Network (image classification). [nbviewer]

text_classification : 2016年06月15日

Naive Bayes and Logistic Regression for text classification.

  • Building intuition with spam classification using scikit-learn. [nbviewer]
  • Bernoulli and Multinomial Naive Bayes from scratch. [nbviewer]
  • Logistic Regression (stochastic gradient descent) from scratch. [nbviewer]
  • Chi-square feature selection. [nbviewer]

networkx : 2016年06月13日

PyCon 2016: Practical Network Analysis Made Simple. Quickstart to networkx's API. Includes some basic graph plotting and algorithms.

regularization : 2016年05月25日

Building intuition on Ridge and Lasso regularization using scikit-learn.

ga : 2016年04月25日

Genetic Algorithm. Math-free explanation and code from scratch.

  • Start from a simple optimization problem and extending it to traveling salesman problem (tsp).
  • View [nbviewer]

h2o : 2016年01月24日

Walking through H2O 2015 World Training GitBook.The walkthrough does basically zero feature engineering with the example dataset, as it is just browsing through its function calls and parameters. Apart from that, H2o Resources also contains booklets on each of the models.

  • R's API:
  • Python's API:
    • h2o's deep learning, Ensemble Tree. [nbviewer]

unbalanced : 2015年11月25日

Choosing the optimal cutoff value for logistic regression using cost-sensitive mistakes (meaning when the cost of misclassification might differ between the two classes) when your dataset consists of unbalanced binary classes. e.g. Majority of the data points in the dataset have a positive outcome, while few have negative, or vice versa. The notion can be extended to any other classification algorithm that can predict class’s probability, this documentation just uses logistic regression for illustration purpose.

  • Visualize two by two standard confusion matrix and ROC curve with costs using ggplot2.
  • View [Rmarkdown]

clustering_old

A collection of scattered old clustering documents in R.

  • 2015年12月08日 | Toy sample code of the LDA algorithm (gibbs sampling) and the topicmodels library. [Rmarkdown]
  • 2015年11月19日 | k-shingle, Minhash and Locality Sensitive Hashing for solving the problem of finding textually similar documents. [Rmarkdown]
  • 2015年11月17日 | Introducing tf-idf (term frequency-inverse document frequency), a text mining technique. Also uses it to perform text clustering via hierarchical clustering. [Rmarkdown]
  • 2015年11月06日 | Some useful evaluations when working with hierarchical clustering and K-means clustering (K-means++ is used here). Including Calinski-Harabasz index for determine the right K (cluster number) for clustering and boostrap evaluation of the clustering result’s stability. [Rmarkdown]

linear_regression : 2015年10月30日

Training Linear Regression with gradient descent in R.

  • Briefly covers the interpretation and visualization of linear regression's summary output.
  • View [Rmarkdown]

Python Programming

  • 2017年03月16日 | Logging module. [nbviewer]
  • 2016年12月26日 | Walking through the free online tutorial, Problem Solving with Algorithms and Data Structures, that introduces basic data structure, algorithms from scratch. [folder]
  • 2016年12月22日 | Cython and Numba quickstart for high performance python. [nbviewer]
  • 2016年06月22日 | pandas's category type. [nbviewer]
  • 2016年06月10日 | unittest. [python code]
  • 2016年04月26日 | Some pre-implemented data structure and algorithm. [nbviewer]
  • 2016年04月26日 | Tricks with strings and text. [nbviewer]
  • 2016年04月17日 | python's decorators (useful script for logging and timing function). [nbviewer]
  • 2016年03月18日 | pandas's pivot table. [nbviewer]
  • 2016年03月02日 | @classmethod, @staticmethod and @property. [nbviewer]
  • 2016年02月22日 | sorting with itemgetter and attrgetter. [nbviewer]
  • 2016年02月19日 | for .. else .. statement. [nbviewer]
  • 2016年02月18日 | namedtuple and defaultdict. [nbviewer]

About

🌎 machine learning algorithms tutorials (mainly in Python3)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 82.3%
  • Jupyter Notebook 17.3%
  • Other 0.4%

AltStyle によって変換されたページ (->オリジナル) /