I am trying to predict flight take off delay
using my current dataset. At this point of time, I only have four dimensions.
scheduled_time_departure (A)
, flight_id
, day_of_week
actual_time_departure(B)
, take_off_delay(B-A)
when I try to predict actual_time_departure(B)
using scikit linear regression model using (scheduled_time_departure (A)
, flight_id
, day_of_week
) on x-axis, I am getting good r2_score
However when I am trying to predict take_off_delay
(which is actually difference between actual_time_departure
and scheduled_time_departure
), in that case I am getting negative r2_score
.
Note:
- to convert
string
tointeger
I am usingLabelEncoder
. scheduled_time_departure
andactual_time_departure
are in seconds not a timestamp, that is second of day, 86400 is max value it can have.- I even tried doing
normalization
ofscheduled_time_departure
- I have ensured that
take_off_delay
is always positive. - For the case when I was predicting
actual_time_departure
, I tried usingone hot encoder
but that agravatedr2_score
P.S: I am new to machine learning and data science, let me know if I am making dumb mistake :) P.P.S: I understand model can be worst if r2 score is negative, however I want to understand the reason.
flight_id
is something which is unique for given time and route. I have result both with and without normalization, howeverr2_score
was negative in both case when I was predictingtake_off_delay
. However when I try to predictactual_time_departure
I get goodr2_score
.take_off_delay
is absolute delta betweenactual_time_departure
andscheduled_time_departure
. Same flight_id can be repeated for multiple days. $\endgroup$flight_id
is like bus number, which can have entry for each day. I have also tried this withoutflight_id
but even in those cases r2 score was negative. $\endgroup$