All Apps and Add-ons

command="predict", data is not periodic

nikhilesh_cvx
New Member

I am new to periodic function. I am performing some R&D on existing file "souvenir_sales.csv". I am keeping only first 10-12 records and removing others to see the timechart but I get error "command="predict", data is not periodic".
I also copied the original file and then modified sales column for first 10 records with any random values(deleting all below records) and I still get same error.

I am using below command:
| inputlookup souvenir_sales.csv | eval _time=strptime(Month, "%Y-%m-%d") | timechart span=1mon values(sales) as sales| predict "sales" as prediction algorithm=LLP holdback=0 future_timespan=24 upper95=upper95 lower95=lower95 | forecastviz(24, 0, "sales", 95)

0 Karma

koshyk
Super Champion

The reason is because you are using "LLP" algorithm

LLP Seasonal local leve => A univariate model with seasonality. The number of data points must be at least twice the number of periods, using the period attribute. The LLP algorithm takes into account the cyclical regularity of the data, if it exists. If you know the number of periods, specify the period argument. If you do not set the period, this algorithm tries to calculate it. LLP returns an error message if the data is not periodic.

The key here is, LLP needs to have the "span" results atleast 2x than future_timespan value. So in your case, since your timechart span=1mon will give you monthly aggregation, but need to ensure it covers atleast 48 months, as you have provided 24 in the future_timespan. In simple terms, you need to provide last 4 years of data for predicting next 2 years !

You could try test it by putting span=1d in your original search and see if the issue I've mentioned is the cause or use another algorithm like LLT OR LLP5

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...