Commit 75c21f72 authored by Leodegario Lorenzo II's avatar Leodegario Lorenzo II
Browse files

Add Multi Layer Perceptron model

parent 84329738
......@@ -59,6 +59,7 @@ from sklearn.ensemble import HistGradientBoostingClassifier
from sklearn.ensemble import HistGradientBoostingRegressor
from sklearn.ensemble import AdaBoostClassifier, AdaBoostRegressor
from sklearn.ensemble import ExtraTreesClassifier, ExtraTreesRegressor
from sklearn.neural_network import MLPClassifier, MLPRegressor
# XGBoost, Catboost, and LightGBM requires library installation
......@@ -166,7 +167,8 @@ class MLModels:
'Bernoulli NB': BNB(C),
'XGB Classifier': XGBC(max_depth, tree_rs),
'LightGBM Classifier': LGBMC(max_depth, tree_rs),
'CatBoost Classifier': CBClassifier(max_depth, tree_rs)}
'CatBoost Classifier': CBClassifier(max_depth, tree_rs),
'MLP Classifier': MLPC(C)}
# Set Regression methods
methods['Regression'] = {
......@@ -188,7 +190,8 @@ class MLModels:
'AdaBoost DT': ABDTRegressor(max_depth, tree_rs),
'XGB Regressor': XGBR(max_depth, tree_rs),
'LightGBM Regressor': LGBMR(max_depth, tree_rs),
'CatBoost Regressor': CBRegressor(max_depth, tree_rs)}
'CatBoost Regressor': CBRegressor(max_depth, tree_rs),
'MLP Regressor': MLPR(C)}
return methods
......@@ -1514,6 +1517,12 @@ class LinearRegressor(MLModels):
self._setting = alpha
class MLPC(LinearRegressor):
model = partial(MLPClassifier)
class MLPR(LinearRegressor):
model = partial(MLPRegressor)
class LassoRegressor(LinearRegressor):
model = partial(Lasso, max_iter=10000)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment