factory module¶
The factory to create the machine learning algorithms.
This module contains a factory to instantiate an MLAlgo from its class name.
This factory also provides a list of available machine learning algorithms and allows
testing if a machine learning algorithm is available.
- class gemseo.mlearning.core.factory.MLAlgoFactory[source]
Bases:
BaseFactoryThis factory instantiates an
MLAlgofrom its class name.The class can be either internal or external. In this second case, it can be either implemented in a module referenced in the
GEMSEO_PATHor in a module The class can be either internal or external. In the second case, it can be either implemented in a module referenced in theGEMSEO_PATHenvironment variable or in a module starting withgemseo_and referenced in thePYTHONPATHenvironment variable.- Return type:
Any
- create(ml_algo, **options)[source]
Create an instance of a machine learning algorithm.
- Parameters:
- Returns:
The instance of the machine learning algorithm.
- Raises:
TypeError – If the class cannot be instantiated.
- Return type:
- load(directory)[source]
Load an instance of machine learning algorithm from the disk.