-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Description
hello, I would like to use the spectrum library for extracting periods from data of time series
as I understand it, the strongest frequencies (in the case below) is: 0.2, 0.33 and 0.36
Please, tell me is this correct understanding? Or maybe there is a better way to do this?
And the second question: method p.plot() allows you to plot frequencies, but where can you find the power values?
test case:
import numpy as np
import pandas as pd
data=[77943,119335,562383,29789,20429,40612,20523,722055,40659,6521,20008,
20605,130027,1172649,29964,22227,80446,20008,518405,16597,20322,24951,
70791,1224887,51838,38906,20258,630595,12250,40800]
data=np.asarray(data)
p=Periodogram(data)
p.periodogram()
p.plot()
p.periodogram()
f=p.frequencies()
f=pd.Series(f)
pd.DataFrame([1/f,f], index=['period', 'freq'])Result:
Metadata
Metadata
Assignees
Labels
No labels
