Фабрика оценщиков¶
Этот модуль предназначен для создания экземпляров, связанных с BNEstimator
.
Подробнее читайте в Руководстве пользователя.
EstimatorPipelineFactory
¶
Factory class to create an estimator pipeline for classification or regression tasks.
Attributes:
Name | Type | Description |
---|---|---|
interfaces |
dict
|
Mapping of task types to their corresponding scikit-learn mixin classes. |
task_type |
str
|
The type of task ('classification' or 'regression'). |
estimator_ |
None | BaseEstimator
|
The estimator instance. |
Source code in applybn/core/estimators/estimator_factory.py
estimator
property
¶
Returns the estimator instance, creating it if necessary.
Returns:
Name | Type | Description |
---|---|---|
BNEstimatorMixin |
The estimator instance with classifier or regressor interface. |
__call__(preprocessor=None, **params)
¶
Creates a pipeline with the given preprocessor and parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
preprocessor
|
None | list
|
The preprocessor to use (default is None). |
None
|
**params
|
Unpack[BNEstimatorParams]
|
Parameters for the BNEstimator. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
CorePipeline |
The constructed pipeline. |
Source code in applybn/core/estimators/estimator_factory.py
__init__(task_type='classification')
¶
Initializes the EstimatorPipelineFactory with the given task type.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
task_type
|
str
|
The type of task ('classification' or 'regression'). |
'classification'
|
Source code in applybn/core/estimators/estimator_factory.py
convert_bamt_preprocessor(preprocessor)
staticmethod
¶
Converts a BAMT preprocessor to a BamtPreprocessorWrapper.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
preprocessor
|
list
|
The BAMT preprocessor to convert. |
required |
Returns:
Name | Type | Description |
---|---|---|
BamtPreprocessorWrapper |
The wrapped preprocessor. |