Spaces:
Sleeping
Sleeping
Shafeek Saleem
commited on
Commit
·
c532c54
1
Parent(s):
b14d8eb
ss
Browse files
pages/3_Training the Model.py
CHANGED
@@ -54,7 +54,7 @@ def create_model_inputs(data, lag, mean_period, target_variable):
|
|
54 |
X = df_processed[
|
55 |
["Location", "MinTemp", "MaxTemp", "Rainfall", "WindGustDir", "WindGustSpeed", "WindDir9am", "WindDir3pm",
|
56 |
"WindSpeed9am", "WindSpeed3pm", "Humidity9am", "Humidity3pm", "Pressure9am", "Pressure3pm", "Temp9am",
|
57 |
-
"Temp3pm", "RainToday", target_variable + "_mean"]].
|
58 |
from sklearn.preprocessing import LabelEncoder
|
59 |
label_encoder = LabelEncoder()
|
60 |
X['RainToday'] = label_encoder.fit_transform(X['RainToday'])
|
|
|
54 |
X = df_processed[
|
55 |
["Location", "MinTemp", "MaxTemp", "Rainfall", "WindGustDir", "WindGustSpeed", "WindDir9am", "WindDir3pm",
|
56 |
"WindSpeed9am", "WindSpeed3pm", "Humidity9am", "Humidity3pm", "Pressure9am", "Pressure3pm", "Temp9am",
|
57 |
+
"Temp3pm", "RainToday", target_variable + "_mean"]].dropna()
|
58 |
from sklearn.preprocessing import LabelEncoder
|
59 |
label_encoder = LabelEncoder()
|
60 |
X['RainToday'] = label_encoder.fit_transform(X['RainToday'])
|