/kaggle-predicting-Red-Hat-Business-Value

Approach to machine learning competition hosted at kaggle

Primary LanguageJupyter NotebookMIT LicenseMIT

Stories in Ready

kaggle-predicting-Red-Hat-Business-Value

The folder contains all the classification methods used. However, the steps below are to be followed to achieve the best results achieved.

Moreover, the result on running the model may not be exactly the same. This is because of the differences in the system and randomness in the models.

Development set up

Requirements

  1. Anaconda installation with multithreading xgb (local set up). (We found the single-threading version to give lower scores on the same model.)
  2. xgboost installation is not supported by anaconda or pip - so needs to be installed manually on your local drive with instructions from their docs (However, the documentation is slightly tricky) https://github.com/dmlc/xgboost/blob/master/doc/build.md

Pre-processing steps:

  1. Create a 'Data' folder. Store the unzipped data files, also create a 'pickle' folder inside the data folder
  2. Run code for label encoding:
    python preprocessing/preprocessing_label_encoding.py --data_directory <file-path-to-Data-directory>
    Note: Before running the above code, download the data from Kaggle and store it in a directory called 'Data'. Extract the files and do not change the names.
  3. Run DimensionalityReduction_with17304_removal.ipynb
  4. Run PreprocessingInterpolation.ipynb
  5. Run Preprocessing_dateFeatures.ipynb
  6. Run group_outcome_change.ipynb
  7. Run Preprocessing_merging.ipynb. ** Note: _ Preprocessing_merging.ipynb required you to check if all categorical variable are one-hot-encodable i.e. there are no inconsistency in the total unique value in a OHE column in test and train. An additional row maybe added to make it consistent. See comment block in the file **
  8. Run xgboost.ipynb

Additional Note: Depending on the path to your data folder, you may need to change file paths in the ipynb files. These are always present at the beginning of each notebook.