palma#
Subpackages#
Attributes#
Classes#
Wrapper to optimizers selecting the best model for a Project. |
|
Represents a machine learning project with various components |
Package Contents#
- class palma.ModelEvaluation(estimator)#
- __date#
- __model_id#
- __estimator#
- __components#
- estimator_name#
- metrics#
- add(component, name=None)#
- fit(project: palma.base.project.Project)#
- __get_fit_estimators(X, y, indexes)#
- __compute_predictions(project, indexes, estimators)#
- property id: str#
- property components#
- property unfit_estimator#
- class palma.ModelSelector(engine: str | palma.base.engine.BaseOptimizer, engine_parameters: Dict)#
Wrapper to optimizers selecting the best model for a Project.
The optimization can be launched with the
start
method. Once the optimization is done, the best model can be accessed as thebest_model_
attribute.- Parameters:
- - engine (str): Currently accepted values are “FlamlOptimizer” or
“AutoSklearnOptimizer” (the latter is deprecatted).
- - engine_parameters (dict): parameters passed to the engine.
Methods
- start(project: Project): look for best model
- __date#
- __run_id#
- __parameters#
- property run_id: str#
- class palma.Project(project_name: str, problem: str)#
Represents a machine learning project with various components and logging capabilities.
- Parameters:
- project_name (str): The name of the project.
- problem (str): The description of the machine learning problem.
Accepted values: “classification” or “regression”.
- Attributes:
- base_index (List[int]): List of base indices for the project.
- components (dict): Dictionary containing project components.
- date (datetime): The date and time when the project was created.
- project_id (str): Unique identifier for the project.
- is_started (bool): Indicates whether the project has been started.
- problem (str): Description of the machine learning problem.
- validation_strategy (ValidationStrategy): The validation strategy used in the project.
- project_name (str): The name of the project.
- study_name (str): The randomly generated study name.
- X (pd.DataFrame): The feature data for the project.
- y (pd.Series): The target variable for the project.
Methods
add(component: Component) -> None: Adds a component to the project.
start(X: pd.DataFrame, y: pd.Series, splitter, X_test=None, y_test=None, groups=None, **kwargs) -> None:
Starts the project with the specified data and validation strategy.
- __project_name#
- __date#
- __study_name#
- __problem#
- __components#
- __is_started = False#
- __component_list = []#
- start(X: pandas.DataFrame, y: pandas.Series, splitter, X_test=None, y_test=None, groups=None, **kwargs) None #
- property components: dict#
- property date: datetime.datetime#
- property project_id: str#
- property is_started: bool#
- property problem: str#
- property validation_strategy: palma.base.splitting_strategy.ValidationStrategy#
- property project_name: str#
- property study_name: str#
- property X: pandas.DataFrame#
- property y: pandas.Series#
- palma.logger#
- palma.set_logger#