simplefit.classifier
Module Contents
Functions
|
This function preprocess the data, fit baseline model(dummyclassifier) and logistic regression with default setups to provide data scientists |
- simplefit.classifier.classifier(train_df, target_col, numeric_feats=None, categorical_feats=None, cv=5)[source]
This function preprocess the data, fit baseline model(dummyclassifier) and logistic regression with default setups to provide data scientists easy access to the common models results(scores). :param train_df: The clean train data which includes target column. :type train_df: pandas.DataFrame :param target_col: The column of the train data that has the target values. :type target_col: str :param numeric_feats = list: The numeric features that needs to be considered in the model. If the user enters an empty list, the function will use all numeric columns. :param optional: The numeric features that needs to be considered in the model. If the user enters an empty list, the function will use all numeric columns. :param categorical_feats: The categorical features that needs to be considered in the model. :type categorical_feats: list, optional :param cv: The number of folds on the data for train and validation set. :type cv: int, optional
- Returns
A data frame that includes test scores and train scores for each model.
- Return type
Data frame
Examples
>>> classifier(train_df, target_col = 'target', numerical_feats = [], categorical_features = []) >>> classifier(train_df, target_col = 'target', numeric_feats = ['danceability', 'loudness'], categorical_feats=['genre'], cv=10)