- 积分
 - 1480
 
	- 贡献
 -  
 
	- 精华
 
	- 在线时间
 -  小时
 
	- 注册时间
 - 2015-4-9
 
	- 最后登录
 - 1970-1-1
 
 
 
 
 
 
 | 
	
 
 
发表于 2022-4-5 06:53:56
|
显示全部楼层
 
 
 
 本帖最后由 zhaokg 于 2022-6-11 06:37 编辑  
 
如果有人需要一个贝叶斯算法的话,我开发了一个时间序列趋势,断点/突变分析,和时间序列分解算法BEAST. 这里有更多介绍 http://github.com/zhaokg/Rbeast. 
 
具体而言, beast可以在R和Matlab中调用: 
 
in R
 - install.packages("Rbeast")
 
 - data(Nile)                       #  annual streamflow of the Nile River   
 
 - out = beast(Nile, season='none') #  'none': trend-only data without seasonlaity   
 
 - print(out)                  
 
 - plot(out)
 
  复制代码 
 
 
 
in Matlab:
 - eval(webread('http://b.link/beast',weboptions('cert',''))) % install BEAST to your local machine
 
 - load('Nile.mat')                          % annual streamflow of the Nile River startin from year 1871
 
 - out = beast(Nile, 'season', 'none','start', 1871)  % trend-only data without seasonality
 
 - printbeast(out)
 
 - plotbeast(out)
 
  复制代码 
 
 
Matlab中另外一个例子
 - load('googletrend.mat') % Monthly Google search trend data of 'beach' since Jan 2004
 
 - o = beast( beach )      % Apply BEAST to the 'beach time series: beach is a data vector only; the time
 
 -                         % info can be supplied using the start and deltat
 
 -                         % keywords, as in the next commented line
 
 - %o = beast( beach,'start',[2004,1],'deltat',1/12 )
 
 - printbeast(o)           % print the changepoints detected
 
 - plotbeast(o)            % plot the results: o.season.Y and o.trend.Y are the seasonal and trend compoents
 
  复制代码 
 |   
 
 
 
 |