Skip to content

Practice Machine Learning algorithms or reproduce paper from scratch

Notifications You must be signed in to change notification settings

AllenLeong/PracticeMLfromScratch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Machine Learning From Scratch

This a practice for ML algorithms

Tree

Decision Tree

from Trees import DecisionTree
tree = DecisionTree.DecisionTree()
tree.fit(X,y)
tree.predict(X)

Decisoin Tree Result

Regression Tree

from Trees import DecisionTree
tree = DecisionTree.RegressionTree()
tree.fit(X,y)
tree.predict(X)

Regression Tree Result

Ensembles

from Trees.Ensamble import Ensamble
rf = Ensamble([DecisionTree.DecisionTree(max_depth=3, splitter='quantile'),
              DecisionTree.DecisionTree(max_depth=3, splitter='quantile'),
              DecisionTree.DecisionTree(max_depth=3, splitter='quantile')])
             

Random Forest

from Trees.Ensamble import Ensamble, RandomForest
rf = RandomForest(max_features=.05,n_estimator=30,max_depth = 3)
rf.fit(X,y)

GBM

GBDT

from Trees.GradientBoost import GradientBoostTree
gbdt = GradientBoostTree(n_estimator=n_estimator,
                         learning_rate=5e1,max_depth=depth)
gbdt.fit(X,y)

GBDT Results

About

Practice Machine Learning algorithms or reproduce paper from scratch

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages