Forecasting Quarterly House Sales with StatsForecast
Introduction
In this tutorial, we introduce Nixtla’s StatsForecast integration which offers numerous univariate time series forecasting models optimized for high performance and scalability. We’ll go through an example to predict the real estate sales.
Prerequisites
MindsDB Setup
One way is to sign up for an account at MindsDB Cloud. It is a convenient option as it doesn’t require any installation procedures. You can find the details here.
Alternatively, visit our docs and follow the instructions to manually set up a local instance of MindsDB via Docker or pip. You can also set up MindsDB on AWS following this instruction set.
Creating an ML Engine
Please note that before using the StatsForecast engine, you should create it with the below command:
You can check the available engines with this command:
If you see the StatsForecast engine on the list, you are ready to follow the tutorials.
Tutorial
Connecting the Data
In this tutorial, we take our House Sales tutorial and redo it using the StatsForecast engine.
We use a table from our MySQL public demo database, so let’s start by connecting MindsDB to it:
Now that we’ve connected our database to MindsDB, let’s query the data to be used in the example:
Here is the output:
The house_sales
table stores quarterly house price moving averages per property.
Creating a Model
Let’s create a model table to predict the house price moving average values:
The sytax is the same as in original tutorial. But here, we add the USING
clause that specifies the ML engine used to make predictions.
We can check the training status with the following query:
Making Predictions
Once the model status is complete
, the behavior is the same as with any other AI table – you can query for batch predictions by joining it with a data table:
Here is the output data:
What’s Next?
Have fun while trying it out yourself!
- Bookmark MindsDB repository on GitHub.
- Sign up for a free MindsDB account.
- Engage with the MindsDB community on Slack or GitHub to ask questions and share your ideas and thoughts.
If this tutorial was helpful, please give us a GitHub star here.