utils

Module Contents

Functions

extratree_rank_features(x: pandas.DataFrame, y: pandas.DataFrame) → Tuple[list, list]

takes dataframe and series and ranks the dataframe columns by importance to

evaluate_regression_base_model(prepared_data: dict, model: xgboost.XGBRegressor, features: list = None) → dict

Predicting and evaluating the results

get_metrics(y_true: numpy.ndarray, y_pred: numpy.ndarray, data_name: str) → dict

Evaluating for temperature model

xgb_grid_search(prepared_data: dict, debug: bool = False, max_depth: int = None, n_estimators: int = None, eta: float = None) → Tuple[int, int, float]

Grid Search : Trying diffferent parameter for model. Evaluating

utils.extratree_rank_features(x: pandas.DataFrame, y: pandas.DataFrame) Tuple[list, list]

takes dataframe and series and ranks the dataframe columns by importance to an ExtraTreeRegressor

returns ordered list of features and list of feature important values

utils.evaluate_regression_base_model(prepared_data: dict, model: xgboost.XGBRegressor, features: list = None) dict

Predicting and evaluating the results

utils.get_metrics(y_true: numpy.ndarray, y_pred: numpy.ndarray, data_name: str) dict

Evaluating for temperature model

Grid Search : Trying diffferent parameter for model. Evaluating model predictions by mae and returning best parameter