Data Loading

Q1.  Load the data from the source file and set up the target y and predictors X as expected by scikit-learn.

Train-Test Split

Q2. ) Create a train-test 80-20 split of the data while maintaining the same target value proportion in each of the training and testing partition. You should use the training partition for the subsequent analysis and then finally use the testing at the last step for final validation using the best model found. Optional Step: Create some charts for data exploration to gain an understanding of the data with respect to the given prediction problem.

Explain your observations along with each chart. Data Preprocessing & Feature Selection/Engineering Q3. Set up a data preparation pipeline using scikit-learn to perform the following preprocessing steps. A. If there are missing values in the data, take appropriate measures. B. Select the features as follows:

  1. The variable DEP_TIME  cannot be used for predicting new flights. Why? Briefly explain.
  2. Create a new categorical variable by binning the scheduled departure time into 2-hour bins.
  3. Drop the original variable CRS_DEP_TIME from the data to be analyzed and keep the new categorical variable.
  4. Drop the variables DISTANCE and FL_DATE from the dataset. What would be the reasons to do so? Think and provide possible explanation.
  5. Handle the following categorical variables in the data using the one-hot encoding approach. How many new variables would you get as a result of this one-hot encoding? Explain.
  6. day of week
  7. carrier
  8. departure airport (origin)
  9. arrival airport
  10. scheduled (binned/categorical) departure time
  11. Weather is coded as 1 if there was a weather-delay. Would you need to use one-hot encoding for this variable? Why or why not? Explain and take the appropriate action. Using the pipeline, create a prepared training dataset to be used for predictive modeling. MIST.6160: Advanced Data Mining Copyright  2020 Prof. Amit V. Deokar. All rights reserved. 3 Model Training and Validation

Q5.Select any two classification algorithms listed in Q6 below and demonstrate how to find the “best” hyperparameters for each of these two models with grid search using 5-fold cross-validation experimenting with 1-2 parameters in each case.

 


    Customer Area

    Make your order right away

    Confidentiality and privacy guaranteed

    satisfaction guaranteed