1
$\begingroup$

I'm building a model to predict the flight delay. My dataset contains the following columns:

FL_DATE (contains months(1-12)), OP_CARRIER (One hot encoded data of Carrier names), ORIGIN(One hot encoded data of Origin Airport), Dest(one-hot encoded data of Dest Airport), CRS_DEP_TIME(Intended time of departure ex: 1015), DEP_TIME(Actual time of departure ex: 1017),DEP_DELAY(the difference between crs-dep ex: -2), ARR_DELAY(arrival delay ex: -2)

Screenshot of first 10 rows of my dataset

My target variable is ARR_DELAY. After checking my data, I have decided it is a regression problem. However, I'm not sure what method do I need to use for selecting the appropriate columns. On the other hand, I was plotting each column with ARR_DELAY to check their relation and got something like this: FL_TIME vs ARR_DELAY enter image description here

In such scenarios, if I have to build a model for such data which regression technique should I use?

PS: I'm new to Machine Learning. Please correct me If I'm heading in the wrong direction

$\endgroup$
  • $\begingroup$ It seems your question is really, 'How to choose the best features?' or 'How does one carry out feature selection?' When I consider a model I think what best describes the data, e.g. is it a linear model, square or KNN model? Your model is your estimate for the 'REAL' but unknown function. It seems you are looking to discover which variables are most important. I know you mention using python but I really like Kuhn's book on caret-R for its overall hands-on discussions. Try: topepo.github.io/caret/feature-selection-overview.html $\endgroup$ – oaxacamatt Apr 29 at 1:27
0
$\begingroup$

One of my favorite tools for feature selection is the Random Forest. Consider giving it a try:
https://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_importances.html

Random Forests are generally classifiers but they have the added advantage of being able to find and measure the variable's importance. It can be a long process but helpful. By using 'Gini importance' as a measure, RF can provide a bar chart that gives a relative comparison of the features with respect to which feature is best at separating signal from the noise. Check out this further discussion:
https://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm#workings

| improve this answer | |
$\endgroup$
0
$\begingroup$

I think a better option will be that you try different regression techniques (it will be good for your learning curve) and see advantages and disadvantage.

For subset selection purposes few options are:

1- Best subset selection : in which you start with a null model and fill all possible combination of models and select best model on the basis of AIC, BIC or adjusted R2.

2-Forward selection: You start with a null model as well and add feature one by one to see which one gives lowest RSS or highest R2. Then add another feature again until you have the best model.

3-Backward selection: you start with a model with all p predictors remove one predictor evaluate adjusted R2 or AIC, BIC. do it again and again until you have a satisfactory model.

You don't have to do it manually both R and python have library that will help you in this.

| improve this answer | |
$\endgroup$
  • $\begingroup$ I think you are getting feature selection confused with model selection. It seems obvious to me that the questioner is confused too. The main header is 'How to choose the best model' Not 'How to choose the best predictors or features'. Confusing the matter even more AIC and BIC are also used for feature selection and model selection. Choosing the best model requires Precision and Recall of your model. How accurate and specific, etc it is compared to others. en.wikipedia.org/wiki/Precision_and_recall $\endgroup$ – oaxacamatt Apr 29 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.