Spaces:
Sleeping
Sleeping
Commit
·
fc72ae1
1
Parent(s):
c105df8
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,8 +33,8 @@ def predictAirPassengers(df, split):
|
|
| 33 |
|
| 34 |
df1=df2.set_index(['Month'])
|
| 35 |
df1.rename(columns={'#Valor':'Valor'},inplace=True)
|
| 36 |
-
train=df1.
|
| 37 |
-
test=df1.
|
| 38 |
preds=rf.predict(X_test).astype(int)
|
| 39 |
predictions=pd.DataFrame(preds,columns=['Valor'])
|
| 40 |
predictions.index=test.index
|
|
|
|
| 33 |
|
| 34 |
df1=df2.set_index(['Month'])
|
| 35 |
df1.rename(columns={'#Valor':'Valor'},inplace=True)
|
| 36 |
+
train=df1.Valor[:int (len(ts.Valor)*ttSplit)]
|
| 37 |
+
test=df1.Valor[int(len(ts.Valor)*ttSplit):]
|
| 38 |
preds=rf.predict(X_test).astype(int)
|
| 39 |
predictions=pd.DataFrame(preds,columns=['Valor'])
|
| 40 |
predictions.index=test.index
|