niaaml.classifiers

class niaaml.classifiers.AdaBoost(**kwargs)

Bases: Classifier

Implementation of AdaBoost classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:
  1. Freund, R. Schapire, “A Decision-Theoretic Generalization of on-Line Learning and an Application to Boosting”, 1995.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.AdaBoostClassifier.html

See Also:
Name = 'AdaBoost'
fit(x, y, **kwargs)

Fit AdaBoost.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.Bagging(**kwargs)

Bases: Classifier

Implementation of bagging classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:
  1. Breiman, “Bagging predictors”, Machine Learning, 24(2), 123-140, 1996.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.BaggingClassifier.html

See Also:
Name = 'Bagging'
fit(x, y, **kwargs)

Fit Bagging.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.Classifier(**kwargs)

Bases: PipelineComponent

Class for implementing classifiers.

Date:

2020

Author:

Luka Pečnik

License:

MIT

See Also:
  • niaaml.pipeline_component.PipelineComponent

fit(x, y, **kwargs)

Fit implemented classifier.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

class niaaml.classifiers.ClassifierFactory(**kwargs)

Bases: Factory

Class with string mappings to classifiers.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Attributes:

_entities (Dict[str, Classifier]): Mapping from strings to classifiers.

See Also:
  • niaaml.utilities.Factory

class niaaml.classifiers.DecisionTree(**kwargs)

Bases: Classifier

Implementation of decision tree classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:
  1. Breiman, J. Friedman, R. Olshen, and C. Stone, “Classification and Regression Trees”, Wadsworth, Belmont, CA, 1984.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeClassifier.html#sklearn.tree.DecisionTreeClassifier

See Also:
Name = 'Decision Tree Classifier'
fit(x, y, **kwargs)

Fit DecisionTree.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.ExtremelyRandomizedTrees(**kwargs)

Bases: Classifier

Implementation of extremely randomized trees classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:
  1. Geurts, D. Ernst., and L. Wehenkel, “Extremely randomized trees”, Machine Learning, 63(1), 3-42, 2006.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.ExtraTreesClassifier.html

See Also:
Name = 'Extremely Randomized Trees'
fit(x, y, **kwargs)

Fit ExtremelyRandomizedTrees.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.GaussianNB(**kwargs)

Bases: Classifier

Implementation of gaussian Naive Bayes classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

Murphy, Kevin P. “Naive bayes classifiers.” University of British Columbia 18 (2006): 60.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.naive_bayes.GaussianNB.html

See Also:
Name = 'Gaussian Naive Bayes'
fit(x, y, **kwargs)

Fit GaussianNB.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.GaussianProcess(**kwargs)

Bases: Classifier

Implementation of gaussian process classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

Rasmussen, Carl Edward, and Hannes Nickisch. “Gaussian processes for machine learning (GPML) toolbox.” The Journal of Machine Learning Research 11 (2010): 3011-3015.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.gaussian_process.GaussianProcessClassifier.html

See Also:
Name = 'Gaussian Process Classifier'
fit(x, y, **kwargs)

Fit GaussianProcess.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.KNeighbors(**kwargs)

Bases: Classifier

Implementation of k neighbors classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

“Neighbourhood Components Analysis”, J. Goldberger, S. Roweis, G. Hinton, R. Salakhutdinov, Advances in Neural Information Processing Systems, Vol. 17, May 2005, pp. 513-520.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsClassifier.html

See Also:
Name = 'K Neighbors Classifier'
fit(x, y, **kwargs)

Fit KNeighbors.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.LinearSVC(**kwargs)

Bases: Classifier

Implementation of linear support vector classification.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

Fan, Rong-En, et al. “LIBLINEAR: A library for large linear classification.” Journal of machine learning research 9.Aug (2008): 1871-1874.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.svm.LinearSVC.html

See Also:
Name = 'Linear Support Vector Classification'
fit(x, y, **kwargs)

Fit LinearSVCClassifier.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.MultiLayerPerceptron(**kwargs)

Bases: Classifier

Implementation of multi-layer perceptron classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

Glorot, Xavier, and Yoshua Bengio. “Understanding the difficulty of training deep feedforward neural networks.” International Conference on Artificial Intelligence and Statistics. 2010.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPClassifier.html

See Also:
Name = 'Multi Layer Perceptron'
fit(x, y, **kwargs)

Fit MultiLayerPerceptron.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.QuadraticDiscriminantAnalysis(**kwargs)

Bases: Classifier

Implementation of quadratic discriminant analysis classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

“The Elements of Statistical Learning”, Hastie T., Tibshirani R., Friedman J., Section 4.3, p.106-119, 2008.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis.html#sklearn.discriminant_analysis.QuadraticDiscriminantAnalysis

See Also:
Name = 'Quadratic Discriminant Analysis'
fit(x, y, **kwargs)

Fit QuadraticDiscriminantAnalysis.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.

class niaaml.classifiers.RandomForest(**kwargs)

Bases: Classifier

Implementation of random forest classifier.

Date:

2020

Author:

Luka Pečnik

License:

MIT

Reference:

Breiman, “Random Forests”, Machine Learning, 45(1), 5-32, 2001.

Documentation:

https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html

See Also:
Name = 'Random Forest Classifier'
fit(x, y, **kwargs)

Fit RandomForestClassifier.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify. y (pandas.core.series.Series): n classes of the samples in the x array.

Returns:

None

predict(x, **kwargs)

Predict class for each sample (row) in x.

Arguments:

x (pandas.core.frame.DataFrame): n samples to classify.

Returns:

pandas.core.series.Series: n predicted classes.

set_parameters(**kwargs)

Set the parameters/arguments of the algorithm.

to_string()

User friendly representation of the object.

Returns:

str: User friendly representation of the object.