Note
This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the What you really need to know section for the big picture.
julearn.base.JuBaseEstimator¶
- class julearn.base.JuBaseEstimator(apply_to, needed_types=None)¶
Base class for julearn estimators.
Every julearn estimator is aware of the column types of the data. Thus, they should be able to provide the column types they need and the column types they apply to.
The main difference between this class and
sklearn.base.BaseEstimatoris that this class knows which columns to use from the data for its purpose. That is, the apply_to and needed_types attributes.- Parameters:
- __init__(apply_to, needed_types=None)¶
- get_needed_types()¶
Get the column types needed by the estimator.
- Returns:
The column types needed by the estimator.
- get_apply_to()¶
Get the column types the estimator applies to.
- Returns:
The column types the estimator applies to.
- filter_columns(X)¶
Get the apply_to columns of a pandas DataFrame.
- Parameters:
X (
DataFrame) – The DataFrame to filter.- Returns:
The DataFrame with only the apply_to columns.
- get_metadata_routing()¶
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
A
MetadataRequestencapsulating routing information.
- get_params(deep=True)¶
Get parameters for this estimator.
- Parameters:
deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns:
Parameter names mapped to their values.
- set_params(**params)¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline). The latter have parameters of the form<component>__<parameter>so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
Estimator instance.