Prediction
Predict the time series data
Give a data frame with these columns
Date
Close
2014-04-14
133.95
Base data can come from Yahoo driver

All

The model will predict SVR, LINEAR, ARIMA for 20 days on Close value
1
dataset = naas_drivers.yahoo.stock("TSLA")
2
pr = naas_drivers.prediction.get(dataset=dataset, prediction_type="all")
Copied!

Prediction size

  • data_points: The number of days in the future that are to predict.
1
dataset = naas_drivers.yahoo.stock("TSLA")
2
pr = naas_drivers.prediction.get(dataset=dataset, data_points=50)
Copied!

Model

All the parameters of the above formula are explained below.
  • prediction_type: The model to predict, it can be SVR, LINEAR, ARIMA, or all
1
dataset = naas_drivers.yahoo.stock("TSLA")
2
pr = naas_drivers.prediction.get(dataset=dataset, prediction_type="ARIMA")
Copied!

Options

  • dataset : the dataset in DataFrame format
  • column: The exact name of the column that is to be predicted, from the dataset
  • date_column:The date range from the dataset. Will be used as the output index.
  • prediction_type: Can be ARIMA, LINEAR, SVR, COMPOUND or all
  • data_points **(optional):** number of days to predict
  • concact_label (optional): A column name who will generate a concatenated frame with past and future data.
1
dataset = naas_drivers.yahoo.stock("TSLA")
2
pr = naas_drivers.prediction.get(dataset=dataset)
Copied!

Plot

Once you have predicted using the above predict formula, you can plot the predictions
1
naas_drivers.plotly.stock(pr, , "linechart_close")
Copied!
Check more options on the link below
Copy link
Edit on GitHub