simplefit.regressor
Module Contents
Functions
|
This function preprocess the data, fit baseline model(dummyregresor) and ridge with default setups to provide data scientists |
- simplefit.regressor.regressor(train_df, target_col, numeric_feats=None, categorical_feats=None, cv=5)[source]
This function preprocess the data, fit baseline model(dummyregresor) and ridge with default setups to provide data scientists easy access to the common models results(scores).
- Parameters:
train_df (pandas.DataFrame) – The clean train data which includes target column.
target_col (str) – The column of the train data that has the target values.
list (numeric_feats =) – The numeric features that needs to be considered in the model. If the user do not define this argument, the function will assume all the columns except the identified ones in other arguments as numeric features.
optional – The numeric features that needs to be considered in the model. If the user do not define this argument, the function will assume all the columns except the identified ones in other arguments as numeric features.
categorical_feats (list, optional) – The categorical columns for which needs onehotencoder preprocessing.
cv (int, optional) – The number of folds on the data for train and validation set.
- Returns:
A data frame that includes test scores and train scores for each model.
- Return type:
Data frame
Examples
>>> regressor(train_df, target_col = 'popularity', categorical_features='genre') >>> regressor(train_df, target_col = 'popularity', numeric_feats = ['danceability', 'loudness'], categorical_feats=['genre'], cv=10)