Classification models options¶
KNNClassifier¶
-
class
gemseo.mlearning.classification.knn.
KNNClassifier
(data, transformer=None, input_names=None, output_names=None, n_neighbors=5, **parameters)[source] K nearest neighbors classification algorithm.
Constructor.
- Parameters
data (Dataset) – learning dataset.
transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.
input_names (list(str)) – names of the input variables.
output_names (list(str)) – names of the output variables.
n_neighbors – number of neighbors.
parameters – other keyword arguments for sklearn KNN.
RandomForestClassifier¶
-
class
gemseo.mlearning.classification.random_forest.
RandomForestClassifier
(data, transformer=None, input_names=None, output_names=None, n_estimators=100, **parameters)[source] Random forest classification algorithm.
Constructor.
- Parameters
data (Dataset) – learning dataset.
transformer (dict(str)) – transformation strategy for data groups. If None, do not transform data. Default: None.
input_names (list(str)) – names of the input variables.
output_names (list(str)) – names of the output variables.
n_estimators (int) – number of trees in the forest.
parameters – other keyword arguments for sklearn rand. forest.