Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.naive_bayes import GaussianNB
class TPOTGaussianNB(Classifier):
"""Fits a Gaussian Naive Bayes Classifier
Parameters
----------
None
"""
import_hash = {'sklearn.naive_bayes': ['GaussianNB']}
sklearn_class = GaussianNB
arg_types = ()
def __init__(self):
pass
def preprocess_args(self):
return {}
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.naive_bayes import BernoulliNB
class TPOTBernoulliNB(Classifier):
"""Fits a Bernoulli Naive Bayes Classifier
Parameters
----------
alpha: float
Additive (Laplace/Lidstone) smoothing parameter (0 for no smoothing).
binarize: float
Threshold for binarizing (mapping to booleans) of sample features.
"""
import_hash = {'sklearn.naive_bayes': ['BernoulliNB']}
sklearn_class = BernoulliNB
arg_types = (float, float)
def __init__(self):
pass
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.ensemble import GradientBoostingClassifier
class TPOTGradientBoosting(Classifier):
"""Fits a Gradient Boosting classifier
Parameters
----------
learning_rate: float
Shrinks the contribution of each tree by learning_rate
max_features: float
Maximum number of features to use (proportion of total features)
"""
import_hash = {'sklearn.ensemble': ['GradientBoostingClassifier']}
sklearn_class = GradientBoostingClassifier
arg_types = (float, float)
def __init__(self):
pass
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.neighbors import KNeighborsClassifier
class TPOTKNeighborsClassifier(Classifier):
"""Fits a k-nearest neighbor classifier
Parameters
----------
n_neighbors: int
Number of neighbors to use by default for k_neighbors queries; must be a positive value
weights: int
Selects a value from the list: ['uniform', 'distance']
"""
import_hash = {'sklearn.neighbors': ['KNeighborsClassifier']}
sklearn_class = KNeighborsClassifier
arg_types = (int, int)
def __init__(self):
pass
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from xgboost import XGBClassifier
class TPOTXGBClassifier(Classifier):
"""Fits an XGBoost Classifier
Parameters
----------
max_depth: int
Maximum tree depth for base learners
min_child_weight: int
Minimum sum of instance weight(hessian) needed in a child
learning_rate: float
Shrinks the contribution of each tree by learning_rate
subsample: float
Subsample ratio of the training instance
"""
import_hash = {'xgboost': ['XGBClassifier']}
sklearn_class = XGBClassifier
arg_types = (int, int, float, float)
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.ensemble import RandomForestClassifier
class TPOTRandomForestClassifier(Classifier):
"""Fits a random forest classifier.
Parameters
----------
None
"""
import_hash = {'sklearn.ensemble': ['RandomForestClassifier']}
sklearn_class = RandomForestClassifier
arg_types = ()
def __init__(self):
pass
def preprocess_args(self):
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.tree import DecisionTreeClassifier
class TPOTDecisionTreeClassifier(Classifier):
"""Fits a decision tree classifier
Parameters
----------
None
"""
import_hash = {'sklearn.tree': ['DecisionTreeClassifier']}
sklearn_class = DecisionTreeClassifier
arg_types = ()
def __init__(self):
pass
def preprocess_args(self):
return {}
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.ensemble import ExtraTreesClassifier
class TPOTExtraTreesClassifier(Classifier):
"""Fits an Extra Trees Classifier
Parameters
----------
criterion: int
Integer that is used to select from the list of valid criteria,
either 'gini', or 'entropy'
max_features: float
The number of features to consider when looking for the best split
"""
import_hash = {'sklearn.ensemble': ['ExtraTreesClassifier']}
sklearn_class = ExtraTreesClassifier
arg_types = (int, float)
def __init__(self):
Free Software Foundation, either version 3 of the License, or (at your option)
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from .base import Classifier
from sklearn.naive_bayes import MultinomialNB
class TPOTMultinomialNB(Classifier):
"""Fits a Multinomial Naive Bayes Classifier
Parameters
----------
alpha: float
Additive (Laplace/Lidstone) smoothing parameter (0 for no smoothing).
"""
import_hash = {'sklearn.naive_bayes': ['MultinomialNB']}
sklearn_class = MultinomialNB
arg_types = (float, )
def __init__(self):
pass
any later version.
The TPOT library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along
with the TPOT library. If not, see http://www.gnu.org/licenses/.
"""
from ...gp_types import Bool
from .base import Classifier
from sklearn.svm import LinearSVC
class TPOTLinearSVC(Classifier):
"""Fits a Linear Support Vector Classifier
Parameters
----------
C: float
Penalty parameter C of the error term.
penalty: int
Integer used to specify the norm used in the penalization (l1 or l2)
dual: bool
Select the algorithm to either solve the dual or primal optimization problem.
"""
import_hash = {'sklearn.svm': ['LinearSVC']}
sklearn_class = LinearSVC
arg_types = (float, int, Bool)