API References
Insolver DataFrame
Build-in transformations
Core utils for transformations
Basic data transformations
Person data methods
Insurance data methods
Grouping and sorting data methods
Missing values imputation methods
Date and Datetime methods
Feature engineering
Data preprocessing
Feature selection
Dimensionality reduction
Sampling
Smoothing
Normalization
Discretization
Interpretation
DiCE
LIME
Plots
Model Wrappers
Base Wrapper
- class insolver.wrappers.base.InsolverBaseWrapper(backend)[source]
Base wrapper serving as a building block for other wrappers.
- Parameters:
backend (str) – Name of the backend to build the model.
- load_model(load_path)[source]
Loading a model to the wrapper.
- Parameters:
load_path (str) – Path to the model that will be loaded to wrapper.
- save_model(path=None, name=None, suffix=None, **kwargs)[source]
Saving the model contained in wrapper.
- Parameters:
path (str, optional) – Path to save the model. Using current working directory by default.
name (str, optional) – Optional, name of the model.
suffix (str, optional) – Optional, suffix in the name of the model.
**kwargs – Other parameters passed to, e.g. h2o.save_model().
Trivial Wrapper
- class insolver.wrappers.trivial.InsolverTrivialWrapper(task=None, col_name=None, agg=None, thresh=0.5, **kwargs)[source]
Dummy wrapper for returning trivial “predictions” for metric comparison and statistics.
- Parameters:
col_name (str, list, optional) – String or list of strings containing column name(s) to perform groupby operation.
agg (callable, optional) – Aggregation function.
thresh (float, optional) – Threshold for continuous prediction in dummy classification.
**kwargs – Other arguments.
- fit(X, y)[source]
Fitting dummy model.
- Parameters:
X (pd.DataFrame) – Data.
y (pd.Series) – Target values.
- load_model(load_path)
Loading a model to the wrapper.
- Parameters:
load_path (str) – Path to the model that will be loaded to wrapper.
- predict(X)[source]
Making dummy predictions.
- Parameters:
X (pd.DataFrame, pd.Series) – Data.
- Returns:
Trivial model “prediction”.
- Return type:
array
- save_model(path=None, name=None, suffix=None, **kwargs)
Saving the model contained in wrapper.
- Parameters:
path (str, optional) – Path to save the model. Using current working directory by default.
name (str, optional) – Optional, name of the model.
suffix (str, optional) – Optional, suffix in the name of the model.
**kwargs – Other parameters passed to, e.g. h2o.save_model().