Prediction

prediction.model_predictor.predict_unseen_data(predict: dict, models_nr: list, save_models_dir: str, model_type: str)

Target prediction

This function predicts unseen data given in the dictionary predict

Parameters:
  • predict (dict) – A dictionary that contains pandas dataframes which are unseen data that will be used to predict the target
  • models_nr (list) – A list of indexes that will be used to point to the trained models which were saved locally after training.
  • save_models_dir (str) – The path where the models will be saved.
  • model_type (str) – The type of the model that was used to fit the data e.g. linear or lightgbm
Returns:

  • y_prediction - A numpy array that contains the predicted target of the unseen data.

prediction.model_predictor.model_prediction(predict: dict, models_nr: list, save_models_dir: str, model_type: str)

Predictor

This function applies the function predict_unseen_data to predict the target using the data in the predict.

Parameters:
  • predict (dict) – A dictionary that contains pandas dataframes which are unseen data that will be used to predict the target
  • models_nr (list) – A list of indexes that will be used to point to the trained models which were saved locally after training.
  • save_models_dir (str) – The path where the models will be saved.
  • model_type (str) – The type of the model that was used to fit the data e.g. linear or lightgbm
Returns:

  • y_prediction - A numpy array that contains the predicted target of the unseen data.