# AI tools in Dataslayer

# Introducing our new AI tools functionality for Google Sheets!

###### Are you working with your company's data and want to know if you are going to spend more money based on past expenses? Or do you want to know if your Reach, Impressions, Clicks, CPC, CTR, Conversions or ANY other metric you can think of will grow in the next few days based on your current data? From now on, Dataslayer can predict the future!

This functionality is under request.

Once you have downloaded the Dataslayer extension for Google Sheets, you can start using this awesome functionality! It's as easy as following these steps:

Open the Dataslayer extension in Google Sheets and create a table. If you already have your data table created, you can also use this functionality! It is not limited to only Dataslayer tables. Click on a data table and you will see that the AI tools button will become pink!

To make the AI tools functionality work, you have to click on a valid data table. A valid data table must match these two conditions:

It must have 6 rows of data minimum

It must have at least one column with any date format (with day, month and year)

If you don't select a valid data table or you are on a blank cell, and you click on the AI tools button, it will appear a pop-up message like the one below explaining the conditions a valid table must have.

When you click on the AI tools pink button, it will appear a pop-up window where you can select the date you want to predict. It's as easy as select the date format column you want to use and the column you want to make the prediction with. You can only select one column per prediction. Click on Predict and wait a few seconds until the prediction is over.

A new sheet will be automatically created with the predicted data. This sheet is named like this Predicted [Sheet Name] as you can see below.

###### It's done! You've predicted the future!

### Understanding my predicted data

Once you have successfully made your prediction, it's the moment to understand and analyze your data.

Dataslayer will create and add some new columns to your original table (always in the new sheet) to be able to generate the graphs

Date: It's the same as the date column you have previously selected to make the prediction. At the end of the table, Dataslayer will add 40% of the data you've selected, i.e. if you've selected 100 rows, Dataslayer will add 40 more rows.

[Predicted Value]: It's the metric you have previously selected to make the prediction. At the end of the table, it will add the predicted values for each specific date.

MAX [Predicted Value]: It's the maximum margin of error of the metric you chose to predict.

MIN [Predicted Value]: It's the minimum margin of error of the metric you chose to predict.

Dataslayer will also generate some prediction graphs

Prediction [Predicted Value] (X% Accuracy): In this linear graph you can see the Accuracy Percentage of the prediction, the exact predicted value (blue line), and the maximums and the minimums divided per date (red shade). This graph will always appear.

[Predicted Value] trend: The predicted metric's trend per day. This graph will always appear.

Weekly [Predicted Value] trend: The predicted metric's trend per weekday. This graph will only be generated when the original table has enough data to make this prediction.

Yearly [Predicted Value] trend: The predicted metric's trend per year. This graph will only be generated when the original table has enough data to make this prediction.

The next columns are created only to be able to build the graphs that we have just explained above:

data trend: It's the trend of the data that we have predicted divided per day.

Day of week: It's the day of the week to be able to build the weekly trend graph.

weekly trend: It's the trend of the data that we have predicted divided per weekday.

Month: We need the month column to be able to build the yearly trend graph.

yearly trend: It's the trend of the data that we have predicted divided per month of the year.

###### You have access to this Google Sheets document to see this example → Open the sample document

### How accurate is my prediction?

###### Mathematical explanation

The Accuracy is how close the predictions are to the real data. It can be interpreted as the percentage of success of the predicted data. This is how we calculate it:

`Accuracy = 100 - Weighted MAPE`

MAPE (Mean Absolute Percentage Error) = The average absolute percentage difference between the predicted and actual values.

Also, in the data prediction, Dataslayer calculates some extra values internally that are NOT shown to the user due to their complexity. These are some of the calculated fields:

Mean Absolute Error (MAE): The average absolute difference between the predicted and actual values.

Mean Squared Error (MSE): The average squared difference between the predicted and actual values.

Root Mean Squared Error (RMSE): The square root of the mean squared error.

R-Squared (R2): A measure of the proportion of variability in the target variable that can be explained by the predictors.

If you still have doubts about our AI tools, or you want to have access to this awesome functionality, please contact us via our live chat on our website or via email.

Updated on: 01/03/2023

Thank you!