Skip to content

Step by step implementations with detailed descriptions of some machine learning topics in python, such as "linear algebra", "statistical tests", etc.

Notifications You must be signed in to change notification settings

ppetrushenkov/math_implementations

Repository files navigation

Math implementations in Python

Hi! This repository contains implementations of some mathematical topics, that often uses in "Machine Learning" area. I am writing it for myself just to get better understanding of some topics, that I'm currently learning. All implementations are written in Python.

For now this repository contains the following topics:

  • Linear algebra
  • Statistics
  • Probability theory
  • Machine learning

Implemented:

Linear algebra:

Functions:

  • Scalar product
  • Matrix product
  • Matrix transpose
  • Vector norm
  • Minor
  • Determinant
  • Inverse matrix
  • Matrix rank

Solving equations:

  • Gaussian method
  • QR method

Statistics:

Functions:

  • Mean
  • Variance
  • Standard Deviation
  • Standard Error
  • Percentile
  • Median
  • QQ plot
  • Covariance
  • Correlation

Student's t-test:

  • One sample t-test (independent)
  • Two sample t-test (independent)
  • Paired t-test (dependent test)

ANOVA test:

  • One-way ANOVA
  • Two-way ANOVA

Pearson's chi-squared test:

  • Chi squared distance between 2 groups
  • Chi2 test
  • Coin toss simulation distribution
  • Simulate distribution with specified degree of freedom

Probability theory:

Probability functions:

  • Intersection probability
  • Union probability
  • A\B and B\A probabilities

Combination functions:

  • Factorial
  • Permutations
  • Accommodations with and without repetitions
  • Combinations with and without repetitions

Machine learning:

Functions:

  • Sum of squares
  • Residuals
  • Determination coefficient
  • Regression prediction

Preprocessing

  • Min-Max Scaler
  • Standard Scaler

Regression:

  • Linear regression with one feature

Distance metrics:

  • Euclidean metric
  • Manhattan metric
  • Max-metric

Anomaly detection:

  • Anomaly detection using Chauvenet's criterion
  • Anomaly detection using Z Score
  • Outlier detection using Interquartile Range (IQR)

Clustering:

  • K Means Clustering

About

Step by step implementations with detailed descriptions of some machine learning topics in python, such as "linear algebra", "statistical tests", etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages