hyperimpute.plugins.core.base_plugin module
- class Plugin
Bases:
Serializable
Base class for all plugins. Each derived class must implement the following methods:
type() - a static method that returns the type of the plugin. e.g., imputation, preprocessing, prediction, etc. subtype() - optional method that returns the subtype of the plugin. e.g. Potential subtypes:
preprocessing: feature_scaling, dimensionality reduction
prediction: classifiers, prediction, survival analysis
name() - a static method that returns the name of the plugin. e.g., EM, mice, etc. hyperparameter_space() - a static method that returns the hyperparameters that can be tuned during the optimization. The method will return a list of Params derived objects. _fit() - internal method, called by fit on each training set. _transform() - internal method, called by transform. Used by imputation or preprocessing plugins. _predict() - internal method, called by predict. Used by classification/prediction plugins.
If any method implementation is missing, the class constructor will fail.
- _abc_impl = <_abc_data object>
- abstract _predict(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
- abstract _transform(X: DataFrame) DataFrame
- fit(X: DataFrame, *args: Any, **kwargs: Any) Any
- fit_predict(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
- fit_transform(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
- classmethod fqdn() str
- abstract static name() str
- predict(X: DataFrame, *args: Any, **kwargs: Any) DataFrame
- classmethod sample_hyperparameters(trial: Trial, *args: Any, **kwargs: Any) Dict[str, Any]
- classmethod sample_hyperparameters_fqdn(trial: Trial, *args: Any, **kwargs: Any) Dict[str, Any]
- classmethod sample_hyperparameters_np(*args: Any, **kwargs: Any) Dict[str, Any]
- abstract static subtype() str
- transform(X: DataFrame) DataFrame
- abstract static type() str
- class PluginLoader(plugins: list, expected_type: Type)
Bases:
object
- _load_single_plugin(plugin: str) None
- add(name: str, cls: Type) PluginLoader
- get(name: str, *args: Any, **kwargs: Any) Any
- get_type(name: str) Type
- list() List[str]
- reload() PluginLoader
- types() List[Type]