Esempio n. 1
0
    def __init__(self, name):
        self.model = None
        if name == Constants.logistic:
            self.model = LogisticRegression()

        elif name == Constants.linear:
            self.model = LinearRegression()

        elif name == Constants.GBM:
            self.model = GradientBoosting()

        elif name == Constants.naiveBayes:
            self.model = NaiveBayes()

        elif name == Constants.decisionTree:
            self.model = DecisionTree()

        elif name == Constants.randomForest:
            self.model = RandomForest()

        elif name == Constants.SVM:
            self.model = SVM()

        elif name == Constants.xgboost:
            self.model = XGBoost()
Esempio n. 2
0
#  __Date__     : 1/5/2020.
#  __Author__   :  CodePerfectPlus
#  __Package__  :  Python 3
#  __GitHub__   : https://www.github.com/codeperfectplus
#
from Algorithms import LogisticRegression

lr = LogisticRegression()

X = [2, 3, 5]
y = [3, 5, 3]
lr.fit(X, y)