You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to contribute several machine learning algorithms implemented from scratch to enhance the machine_learning/ module.
These implementations will follow the repository’s coding guidelines — including type hints, docstrings, and unit tests.
📘 Proposed Algorithms Principal Component Analysis (PCA) from Scratch
Implementation using NumPy for matrix operations.
Steps: standardization, covariance matrix computation, eigen decomposition, dimensionality reduction.
Output: projected dataset and explained variance ratio.
File: machine_learning/pca_from_scratch.py
Logistic Regression (Vectorized Version)
Implementation using full vectorization with NumPy.
Includes sigmoid activation, gradient descent optimization, and cost function.
File: machine_learning/logistic_regression_vectorized.py
Naive Bayes with Laplace Smoothing
Multinomial Naive Bayes classifier implementation with Laplace correction to handle zero probabilities.
File: machine_learning/naive_bayes_laplace.py
Decision Tree Pruning
Enhancement of the existing decision tree algorithm with post-pruning (reduced error pruning) or cost-complexity pruning.
Reduces overfitting on training data.
File: machine_learning/decision_tree_pruning.py