CREATE MODEL
statement:
CREATE MODEL
: It is used to create, train, and deploy an ML model. By default, MindsDB’s AutoML will automatically choose the best model for your data but this can be overridden (docs).
FROM
: Here, we specify which of our integrations to use. Anything that is between the parentheses is the data that will be used to train the model - here, the latest Binance data from the connection we’ve already made to Binance is used.
PREDICT
: It specifies the target column - here, the open price of the BTC/USDT trading pair is to be forecasted.
WINDOW
clause defines the window the model looks back at while making forecasts - here, the model looks back at sets of 100 rows (intervals of 100 minutes).
HORIZON
clause defines how many rows into the future the model will forecast - here, it forecasts the next 10 rows (the next 10 minutes).
CREATE MODEL
statement as above, you can check the progress status using this query:
HORIZON
clause).
The next thing we can do is automate price alerts. Here we’ll choose Slack as our preferred place to receive the alerts but this could be any other system that MindsDB integrates with.