Machine-Learning-From-Scratch
Machine-Learning-From-Scratch copied to clipboard
Implementation of popular ML algorithms from scratch
Hi, In the DecisionTree implementation, line 33 there is a call to the _most_common_label() method. Line 33 is reached only if the y numpy array has one unique value, so...
PCA
Line 20 in PCA should change, eig returns eigenvalues , eigenvectors. It is stated in reverse form in the code.
Some places need to use `iloc` to slice instead of default accessors. ```python def _best_split(self, X, y, feat_idxs): best_gain = -1 split_idx, split_threshold = None, None for feat_idx in feat_idxs:...
Changed the spelling of vote from voye
Code for issue #9
```python import numpy as np class LinearRegression: def __init__(self, lr = 0.001, n_iters=1000): self.lr = lr self.n_iters = n_iters self.weights = None self.bias = None def fit(self, X, y): n_samples,...
I modified linear regression to work with polynomials of different degrees, resulting in polynomial regression. I also implemented Lasso regression and Ridge regression from scratch