An API for machine learning¶
Machine learning functionalities.
This module proposes many high-level functions for creating and loading machine learning models.
- gemseo.mlearning.create_classification_model(name, data, transformer=mappingproxy({'inputs': <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object>}), **parameters)[source]
Create a classification model from a learning dataset.
- Parameters:
name (str) – The name of the classification algorithm.
data (IODataset) – The learning dataset.
transformer (TransformerType) –
The strategies to transform the variables. Values are instances of
Transformer
while keys are names of either variables or groups of variables. IfIDENTITY
, do not transform the variables.By default it is set to {‘inputs’: <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object at 0x7f8bdddd6970>}.
parameters – The parameters of the classification model.
- Returns:
A classification model.
- Return type:
See also
get_classification_models get_classification_options import_classification_model
- gemseo.mlearning.create_clustering_model(name, data, transformer=mappingproxy({}), **parameters)[source]
Create a clustering model from a learning dataset.
- Parameters:
name (str) – The name of the clustering algorithm.
data (Dataset) – The learning dataset.
transformer (TransformerType) –
The strategies to transform the variables. Values are instances of
Transformer
while keys are names of either variables or groups of variables. IfIDENTITY
, do not transform the variables.By default it is set to {}.
parameters – The parameters of the clustering model.
- Returns:
A clustering model.
- Return type:
See also
get_clustering_models get_clustering_options import_clustering_model
- gemseo.mlearning.create_mlearning_model(name, data, transformer=mappingproxy({}), **parameters)[source]
Create a machine learning algorithm from a learning dataset.
- Parameters:
name (str) – The name of the machine learning algorithm.
data (Dataset) – The learning dataset.
transformer (TransformerType) –
The strategies to transform the variables. Values are instances of
Transformer
while keys are names of either variables or groups of variables. IfIDENTITY
, do not transform the variables.By default it is set to {}.
parameters – The parameters of the machine learning algorithm.
- Returns:
A machine learning model.
- Return type:
See also
get_mlearning_models get_mlearning_options import_mlearning_model
- gemseo.mlearning.create_regression_model(name, data, transformer=mappingproxy({'inputs': <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object>, 'outputs': <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object>}), **parameters)[source]
Create a regression model from a learning dataset.
- Parameters:
name (str) – The name of the regression algorithm.
data (IODataset) – The learning dataset.
transformer (TransformerType) –
The strategies to transform the variables. Values are instances of
Transformer
while keys are names of either variables or groups of variables. IfIDENTITY
, do not transform the variables.By default it is set to {‘inputs’: <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object at 0x7f8bdddf02b0>, ‘outputs’: <gemseo.mlearning.transformers.scaler.min_max_scaler.MinMaxScaler object at 0x7f8bdddf0340>}.
parameters – The parameters of the regression model.
- Returns:
A regression model.
- Return type:
See also
get_regression_models get_regression_options import_regression_model
- gemseo.mlearning.get_classification_models()[source]
Get available classification models.
See also
create_classification_model get_classification_options import_classification_model
- gemseo.mlearning.get_classification_options(model_name, output_json=False, pretty_print=True)[source]
Find the available options for a classification model.
- Parameters:
- Returns:
The options schema of the classification model.
- Return type:
See also
create_classification_model get_classification_models import_classification_model
- gemseo.mlearning.get_clustering_models()[source]
Get available clustering models.
See also
create_clustering_model get_clustering_options import_clustering_model
- gemseo.mlearning.get_clustering_options(model_name, output_json=False, pretty_print=True)[source]
Find the available options for clustering model.
- Parameters:
- Returns:
The options schema of the clustering model.
- Return type:
See also
create_clustering_model get_clustering_models import_clustering_model
- gemseo.mlearning.get_mlearning_models()[source]
Get available machine learning algorithms.
See also
import_mlearning_model create_mlearning_model get_mlearning_options import_mlearning_model
- gemseo.mlearning.get_mlearning_options(model_name, output_json=False, pretty_print=True)[source]
Find the available options for a machine learning algorithm.
- Parameters:
- Returns:
The options schema of the machine learning algorithm.
- Return type:
See also
create_mlearning_model get_mlearning_models import_mlearning_model
- gemseo.mlearning.get_regression_models()[source]
Get available regression models.
See also
create_regression_model get_regression_options import_regression_model
- gemseo.mlearning.get_regression_options(model_name, output_json=False, pretty_print=True)[source]
Find the available options for a regression model.
- Parameters:
- Returns:
The options schema of the regression model.
- Return type:
See also
create_regression_model get_regression_models import_regression_model
- gemseo.mlearning.import_classification_model(directory)[source]
Import a classification model from a directory.
- Parameters:
directory (str | Path) – The path to the directory.
- Returns:
A classification model.
- Return type:
See also
create_classification_model get_classification_models get_classification_options
- gemseo.mlearning.import_clustering_model(directory)[source]
Import a clustering model from a directory.
- Parameters:
directory (str | Path) – The path to the directory.
- Returns:
A clustering model.
- Return type:
See also
create_clustering_model get_clustering_models get_clustering_options
- gemseo.mlearning.import_mlearning_model(directory)[source]
Import a machine learning algorithm from a directory.
- Parameters:
directory (str | Path) – The path to the directory.
- Returns:
A machine learning model.
- Return type:
See also
create_mlearning_model get_mlearning_models get_mlearning_options