Skip to content

Some classical algorithms coded from scratch for my training, in Python and C++.

Notifications You must be signed in to change notification settings

roomate/ML_from_scratch

Repository files navigation

Code from scratch

This repo contains some code I write on my free time. It has two objectives: first, learn new algorithms on ML and numerical analysis; second, close the gap between the conceptual idea of the algorithm and its practical implementation, whether in Python or C++. I am not after efficiency and perfectly optimized code here, I am satisfied if it works well on academic examples. The rest is left to developers. I only code algorithms I did not have the occasion to code in one of my previous project, I do not try to make an exhaustive repo of all ML algorithms either.

Filename Algorithms Returns:
tris.ipynb Quick sort, Merge sort, Insertion sort, Heap sort An array sorted
classification Kernel Logistic Regression, kernel k-NN, SVM, logistic NN, Bayesian logistic NN & Kernel Fisher Discriminant Analysis A logistic classifer & k-Nearest Neighbours with kernel tricks
dimension_reduction.ipynb kernel PCA, t-SNE, NMF, kernel LLE, MDS, CCA, Isomap, Laplacian Eigenmaps Reduce data dimension
Regression.ipynb Ridge Regression, Bayesian Linear Regression, Kriging, SVR, Nadaraya-Watson, Isotonic regression Regression model
graham_convex_hull.py Graham Algorithm Convex hull of a 2D cloud points
graph.py BFS, DFS, Dijkstra, Bellman The shortest path between a source node and all others
clustering.ipynb Hierarchical clustering, kernel KMEAN, DBSCAN, OPTICS, K-Median, K-Medoid, Mean-Shift Set of cluster
gmm.ipynb Gaussian Mixture Model & Expectation-Maximization algorithm Bayesian clustering
random_algos.ipynb Poisson Process, Gaussian process, and Sampling Samples from a random process or a probability law.
main.ipynb Sinkhorn's algorithm A quasi-optimal map for the Schrodinger problem
Lab_population_based_optimization Genetic algorithm for optimization of scalar objective. Bonus: Inspyred Package
Levinson-Durbin.ipynb Levinson-Durbin algorithm Compute auto-regressive coefficients in an AR(p) Time Series model
fft.ipynb Fast Fourier Transform (Cooley-Tukey's and Rader's FFT) Compute the FFT of vector of size N
interpolation.ipynb cardinal sinus interpolation Construct an interpolating function

About

Some classical algorithms coded from scratch for my training, in Python and C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages