Code Monkey home page Code Monkey logo

rbeast's People

Contributors

dirt avatar ebigelow avatar jj avatar kbodolai avatar zhaokg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rbeast's Issues

ERROR: r1 < r2; this should never happen and there must be something wrong!

I try to find the best fitted model , so i use grid search based on diffrent scp_max and tcp_max combination.
when I set parameters like :o=rb.beast(ndvi_values[:],tcp_minmax=(0,tcp_max),scp_minmax=(0,scp_max),quiet=True, mcmc_seed=42) ,it works well.
But when i set parameters like :o=rb.beast(ndvi_values[:],tcp_minmax=(tcp_max,tcp_max),scp_minmax=(scp_max,scp_max),quiet=True, mcmc_seed=42), one of my time series will throw error r1<r2 during the circulate.

作者您好,我想请问一下这个问题为什么出现。我希望通过参数搜索找到rmse最低的拟合函数,然后我尝试了两种设置变点数量的方法。版本1是设置范围,版本2则直接制定变点数。也许是我搜索的范围过大而时间序列不够长吗?我在版本2的循环中获得了报错。

Issue on marginal likelihood

The manual says:

the average of the model marginal likelihood; the larger marg_lik, the
better the fitting for a given time series.

Would that be the negative larger? Foir instance, -1000 would be better than -10, right?

AttributeError

i reproduce the first example in Spyder then, i replace it with my own data, and it worked but, want to change to another personal data, i restarted the kernel and everything because appears the next error :
'Traceback (most recent call last):

File ~\AppData\Local\anaconda3\envs\rbeast\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)

File c:\users\marciba\documents\python scripts\rbeast.py:8
import Rbeast as rb

File ~\Documents\Python Scripts\Rbeast.py:21
o = rb.beast(nile, season='none')

AttributeError: partially initialized module 'Rbeast' has no attribute 'beast' (most likely due to a circular import)'
and i have uninstalled Rbeast and reinstall and still don't work, can you help me?

here is the code:
import Rbeast as rb

import pandas as pd
import numpy as np

path_base = r"C:\Users\Marciba\Documents\Python Scripts"

data = pd.read_csv(path_base + '\ACfiltered.csv',sep=",")
col= ['index','newindex','Event Date','C2H2_Acetylene']
data.columns=col
#data['Event Date'] = pd.to_datetime(data['Event Date'],format="%Y-%m-%d %H:%M:%S")
nile = np.array(data['C2H2_Acetylene'])
year = np.array(data['Event Date'])
#nile, year = rb.load_example('nile')
o = rb.beast(nile, season='none')
rb.plot(o, title= 'Annual streamflow of the nile river')
rb.print(o)

Convergence of the results.

It is known that in a system based on Monte Carlo sampling, the results depend on the initial random seed. To my understanding, the RBeast package has this characteristic. However, the results are varying significantly, even when increasing the number of samples to 32,000, for example. I would greatly appreciate your help in finding a way to adjust the parameters so that the results converge. I am running the program on a computer with an i7 processor, 8GB of memory, and the Linux Ubuntu 22.04 operating system, using Python or Matlab environments. I am applying RBeast to remove the seasonality from weekly time series. This series has 978 observations, and I used the following parameters: beast(series, start=2005.01644, deltat=1/52, period=1, mcmc_samples=32000). Thank you for your attention

Beast with Octave 8.2

Hello, I would like to try your software with Windows 11 x64 + Octave 8.2, it doesn't work, does it need to be recompiled ? Can you make a script for recompilation ?

thanks

Mario Rossi

Returning MCMC samples of trend/seasonality functions

Hi!

Is it possible to access the posterior samples of the trend and/or seasonality functions directly? Specifically, I'm interested in accessing the sampled vectors that ultimately get averaged together to form the Y outputs. If not, could this feature be added?

These would be helpful in order to look at posterior inferences for things like locations of positive slope, which Rbeast already provides, but also things like the locations of the local minima/maxima and the presence of particular shapes. Rather than open separate issues for each new inference that might come up, all would be handled if the user is given an option where those posterior samples could be returned directly, probably in the form of a matrix that is size N by n_iterations (assuming vector time-series input).

I recognize that returning posterior samples for ALL parameters is probably not feasible, but hopefully the trend/seasonality vector samples are easy enough structurally to add as an extra return item.

Thank you!

Writing BEAST output to disk not working

I tried to write the BEAST output to disk using:
option$outputToDisk=1
option$outputFolder='C:/folder'
But when the optional parameters were printed on starting BEAST the output folder had changed to "outputFolder=Ñ0zl"
"Writing output..." was printed on the console but no files were written in the specified output folder. I searched for a temporary folder named Ñ0zl, but found nowhere that BEAST was writing the output to.
My friend and I tried using different folders, but instead both got "outputFolder=aKzl" on different data.
I tried to look at the scripts underlying beast, but couldn't figure out where the error was.

It would also be good to know where the outputs "marg_lik" and "sig2" have come from and what they mean, as this isn't outlined in the Rbeast package guidance.

calculations are incomplete in beast123 when using large array as input

I found that beast123 can't calculate compeletly when the input array is big enough(number of row or column is bigger than 200)

`import numpy as np
import Rbeast as rb
import xarray as xr
import matplotlib.pyplot as plt

ndvi3d = np.load("sub_r_ndvi.npz")['r_nvdi'] # (722, 1378, 38) array

metadata = lambda: None
metadata.start = 1986
metadata.season = 'none'
metadata.whichDimIsTime = 3
metadata.period = 1.0
extra = rb.args()
extra.numThreadsPerCPU = 2
o = rb.beast123(ndvi3d, metadata, [], [], extra)
plt.imshow(o.trend.cp[:, :, 0])
plt.show()`

the abolve code shows a plot like

11820

however when we decrease the number of row and column
ndvi3d = ndvi3d[0:150, 0:150, :]
the calculation can be completely like
8140

abc_cpu lacks support for PowerPC

/opt/local/bin/gcc-mp-12 -I"/opt/local/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -isystem/opt/local/include/LegacySupport -I/opt/local/include  -DR_RELEASE   -fPIC  -pipe -Os -arch ppc  -c abc_cpu.c -o abc_cpu.o
abc_cpu.c:102:5: error: #error "No cpuid intrinsic defined for processor architecture."
  102 | #   error "No cpuid intrinsic defined for processor architecture."
      |     ^~~~~
abc_cpu.c: In function 'detect_OS_AVX':
abc_cpu.c:115:40: error: '_XCR_XFEATURE_ENABLED_MASK' undeclared (first use in this function)
  115 |         uint64_t xcrFeatureMask=xgetbv(_XCR_XFEATURE_ENABLED_MASK);
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
abc_cpu.c:115:40: note: each undeclared identifier is reported only once for each function it appears in
abc_cpu.c: In function 'detect_OS_AVX512':
abc_cpu.c:123:36: error: '_XCR_XFEATURE_ENABLED_MASK' undeclared (first use in this function)
  123 |     uint64_t xcrFeatureMask=xgetbv(_XCR_XFEATURE_ENABLED_MASK);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [abc_cpu.o] Error 1

Dos it support online mode?

This is great work. I know the origional paper from Adam and MacKay talking about online changepoint. Does it support online calculation? thanks.

RBeast issue -Assuming a complexity prior distribution on the number of change-points with `gammaParameter = 2`

Hi,

It seems that there is an issue with Rbeast, it is not running today. My code worked perfectly fine the previous day but today I am getting an error . (see the error output below "=====")

Assuming a complexity prior distribution on the number of change-points with gammaParameter = 2.
Computing posterior parameters... Error in numeric(nTime) : invalid 'length' argument
Is this a temporally thing? Can you help?

Thank you,

besat_123_example.txt runing wrong

Hi, Mr,zhao. When I run the code
'Update beast123_raster_example.txt' in R , the line 11 which is 'ndvi3d = stack(filelist)', it's always report a error'Error in data.frame(values = unlist(unname(x)), ind, stringsAsFactors = FALSE) : Parameter values mean different number of rows: 437, 0''
Would you like to Work out this error? I do not know if it my operation error or something else.
Waiting for your reply.

Cannot build on AArch64 Linux

While installing this package on a AArch64 Linux machine, I got the following error at link time:

* installing to library ‘/root/tmp/libdir’
* installing *source* package ‘Rbeast’ ...
** package ‘Rbeast’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C compiler: ‘gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3)’
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c _beastv2_gui_plot.c -o _beastv2_gui_plot.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c _beastv2_gui_winmain.c -o _beastv2_gui_winmain.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_common.c -o abc_common.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_cpu.c -o abc_cpu.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_date.c -o abc_date.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_dir.c -o abc_dir.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_R.c -o abc_ide_util_R.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_common.c -o abc_ide_util_common.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_matlab.c -o abc_ide_util_matlab.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ide_util_python.c -o abc_ide_util_python.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ioFlush.c -o abc_ioFlush.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_lzw.c -o abc_lzw.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mat.c -o abc_mat.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math.c -o abc_math.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math_avx.c -o abc_math_avx.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_math_avx512.c -o abc_math_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mcmc.c -o abc_mcmc.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mem.c -o abc_mem.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_mem_ext.c -o abc_mem_ext.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_pthread.c -o abc_pthread.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_global.c -o abc_rand_pcg_global.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local.c -o abc_rand_pcg_local.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_avx2.c -o abc_rand_pcg_local_avx2.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_avx512.c -o abc_rand_pcg_local_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_rand_pcg_local_generic.c -o abc_rand_pcg_local_generic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_sort.c -o abc_sort.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_svd.c -o abc_svd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_system.c -o abc_system.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_timer.c -o abc_timer.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_tranpose.c -o abc_tranpose.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_ts_func.c -o abc_ts_func.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec.c -o abc_vec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_avx2.c -o abc_vec_avx2.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_avx512.c -o abc_vec_avx512.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_vec_generic.c -o abc_vec_generic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c abc_win32_demo.c -o abc_win32_demo.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4.c -o beastv2_COREV4.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_bic.c -o beastv2_COREV4_bic.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_bic_mthrd.c -o beastv2_COREV4_bic_mthrd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_gui.c -o beastv2_COREV4_gui.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_COREV4_mthrd.c -o beastv2_COREV4_mthrd.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_allocinitmem.c -o beastv2_basis_allocinitmem.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_computexy_q.c -o beastv2_basis_computexy_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_cvtKnotsToBinVec.c -o beastv2_basis_cvtKnotsToBinVec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_genrandbasis.c -o beastv2_basis_genrandbasis.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_gensegment.c -o beastv2_basis_gensegment.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_pickcmptId.c -o beastv2_basis_pickcmptId.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_proposeNew_q.c -o beastv2_basis_proposeNew_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_updateKsKe_prec0123.c -o beastv2_basis_updateKsKe_prec0123.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_basis_updategoodvec.c -o beastv2_basis_updategoodvec.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_date.c -o beastv2_date.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_func_q.c -o beastv2_func_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_in_args.c -o beastv2_io_in_args.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_in_readts.c -o beastv2_io_in_readts.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_allocmem_q.c -o beastv2_io_out_allocmem_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_printargs.c -o beastv2_io_out_printargs.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_tsextractprint.c -o beastv2_io_out_tsextractprint.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_io_out_write_q.c -o beastv2_io_out_write_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_model_allocinit_q.c -o beastv2_model_allocinit_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_prior_model.c -o beastv2_prior_model.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_prior_precfunc.c -o beastv2_prior_precfunc.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_svdbasis.c -o beastv2_svdbasis.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c beastv2_xxyy_allocmem_q.c -o beastv2_xxyy_allocmem_q.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c globalvars.c -o globalvars.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c glue_code.c -o glue_code.o
gcc -I"/root/r/dist/include" -DNDEBUG -D_REENTRANT -DR_RELEASE  -I/usr/local/include '-D_FORTIFY_SOURCE=2'  -DR_RELEASE   -fPIC  -g -O2 -Wall -pedantic -fexceptions -fstack-protector-strong -fstack-clash-protection -Werror=implicit-function-declaration -Wstrict-prototypes   -c tetris.c -o tetris.o
gcc -shared -L/root/r/dist/lib -L/usr/local/lib -o Rbeast.so _beastv2_gui_plot.o _beastv2_gui_winmain.o abc_common.o abc_cpu.o abc_date.o abc_dir.o abc_ide_util_R.o abc_ide_util_common.o abc_ide_util_matlab.o abc_ide_util_python.o abc_ioFlush.o abc_lzw.o abc_mat.o abc_math.o abc_math_avx.o abc_math_avx512.o abc_mcmc.o abc_mem.o abc_mem_ext.o abc_pthread.o abc_rand_pcg_global.o abc_rand_pcg_local.o abc_rand_pcg_local_avx2.o abc_rand_pcg_local_avx512.o abc_rand_pcg_local_generic.o abc_sort.o abc_svd.o abc_system.o abc_timer.o abc_tranpose.o abc_ts_func.o abc_vec.o abc_vec_avx2.o abc_vec_avx512.o abc_vec_generic.o abc_win32_demo.o beastv2_COREV4.o beastv2_COREV4_bic.o beastv2_COREV4_bic_mthrd.o beastv2_COREV4_gui.o beastv2_COREV4_mthrd.o beastv2_basis_allocinitmem.o beastv2_basis_computexy_q.o beastv2_basis_cvtKnotsToBinVec.o beastv2_basis_genrandbasis.o beastv2_basis_gensegment.o beastv2_basis_pickcmptId.o beastv2_basis_proposeNew_q.o beastv2_basis_updateKsKe_prec0123.o beastv2_basis_updategoodvec.o beastv2_date.o beastv2_func_q.o beastv2_io_in_args.o beastv2_io_in_readts.o beastv2_io_out_allocmem_q.o beastv2_io_out_printargs.o beastv2_io_out_tsextractprint.o beastv2_io_out_write_q.o beastv2_model_allocinit_q.o beastv2_prior_model.o beastv2_prior_precfunc.o beastv2_svdbasis.o beastv2_xxyy_allocmem_q.o globalvars.o glue_code.o tetris.o -lpthread -lm -L/root/r/dist/lib -lR
installing to /root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded from temporary location
Error: package or namespace load failed for ‘Rbeast’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object ‘/root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs/Rbeast.so’:
  /root/tmp/libdir/00LOCK-Rbeast/00new/Rbeast/libs/Rbeast.so: undefined symbol: __builtin_readcyclecounter
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/root/tmp/libdir/Rbeast’

What happened was that the following function uses the compiler built-in __builtin_readcyclecounter:
https://github.com/zhaokg/Rbeast/blob/master/R/src/abc_timer.h#L101
__builtin_readcyclecounter is not implemented in GCC when targeting AArch64, but Clang does so M1 Mac linked OK.

I propose we handle the cpu_ARM64 case following the patch to a similar issue that resolved it for MariaDB: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=216668&action=diff

Essentially they check if the built-in exists and if not fallback to inline ASM, and since we know it's AArch64, it should be relatively safe.
I'm happy to open a PR to fix this.

Credible Interval for changepoints

Hi Zhaokg,

I am working with just one timeseries of 1 period and I am detecting correctly the changepoints and its change in trend. However, I would like to have some deeper insights and tools to see if actually a probability of (let's say 0.6) in a change point, is enough to consider it a valid changepoint.

I've been searching in all of the articles you shared but I cannot find an example on how to build a credible interval 95% in those cases. Do you have any example or some thought on how I could do it? Or how can I access to the simulations to build a CI?

Thank you so much, you package is amazing!

Segments

Hello,
I was wondering if it is possible to obtain the segments of the Trend components given the break points?

Mutiple periods?

Can the Rbeast explicitly handle the case that a time series with mutiple periods?

Error while updating the package

On Windows 10 laptop I tried to update terra to it's latest varsion (v 0.9.9) but I am getting this error:

C:\Users\GEOGRA~1\AppData\Local\Temp\ccLwEwDN.s: Assembler messages:
C:\Users\GEOGRA~1\AppData\Local\Temp\ccLwEwDN.s:13: Error: unsupported instruction `movq'
C:\Users\GEOGRA~1\AppData\Local\Temp\ccLwEwDN.s:393: Error: unsupported instruction `movq'
make: *** [C:/PROGRA~1/R/R-41~1.1/etc/i386/Makeconf:238: abc_pthread.o] Error 1
ERROR: compilation failed for package 'Rbeast'
* removing 'C:/Program Files/R/R-4.1.1/library/Rbeast'
* restoring previous 'C:/Program Files/R/R-4.1.1/library/Rbeast'
Warning in install.packages :
  installation of package ‘Rbeast’ had non-zero exit status

I tried updating the package through RStudio.
Currently, I am having the v 0.9.7 installed. I am using RStudio Version 1.4.1717 and R v 4.1.1. Any ideas why this error?
The RTools is properly installed on my machine. Ican test this by:

Sys.which('make')
                              make 
"C:\\rtools40\\usr\\bin\\make.exe" 

Here is the output of the sessionInfo():

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.1.1 cli_3.6.1      tools_4.1.1 

latest MATLAB version with beast123 produce error

Example regarding "beast123.m" (Ubuntu 22.04 Linux, Matlab R2023a upd3):

load('Nile')   % Nile river annual streamflow: trend-only data
metadata=[];
metadata.season     = 'none'  % trend-only
metadata.startTime = 1871;
metadata.deltaTime = 1;
% Default values will be used if parameters are missing
o=beast123(Nile,metadata) 
printbeast(o)
plotbeast(o)

produce the following error message:

Error using plot
Vectors must be the same length.
Error in plotbeast>plot_order (line 622)
plot(h, t,   Order,  'color',clr );
Error in plotbeast (line 260)
plot_order(h,ytitle, has, clr,x, t, t2t,Order, ncp, cp);

Segmemntation fault(Core dumped) error for samples sized over 1000k

The Python version of the package (also the R) works fine with smaller sample sizes till 10k and even for some 100k values, but as I keep on increasing the sample size, the above mentioned error becomes more and more prominent to a point, the code doesn't execute at all.

Windows fatal exception: access violation - for a large number of points

Hello and thank you for this great package.
I am using Rbeast 0.1.16 in python 3.9.12 and i 've noticed that when i use the code below i get : Windows fatal exception: access violation in windows 10, and Progress: 0.0% done[>*************************************************************][1] 1706831 segmentation fault (core dumped) in linux.
I 've also noticed that this is happening when the length of the series is approximately over 5300 points. With lesser points it works properly.
Here is the code :

import Rbeast as rb
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
 

#---------------------------------Data Generation-------------------------------#
def generate_dataset_with_noise(num_breakpoints, noise_level):
    data = []
    for i in range(num_breakpoints):
        if i == 0:
            segment_length = np.random.randint(5, 1000)
        else:
            segment_length = np.random.randint(3, 800)
        value = np.random.randint(1, 10)
      
        segment = np.full(segment_length, value)
        # Generate noise with the same length as the segment
        noise = np.random.normal(0, noise_level, segment_length)
 
        # Add the noise to the segment values
        segment_with_noise = segment + noise
        data.extend(segment_with_noise)
    return data

# Specify the number of breakpoints and noise level
num_breakpoints =17
noise_level =0.3

# Generate a dataset with noise added to the integer values
data = generate_dataset_with_noise(num_breakpoints, noise_level)
df=pd.Series(data)

#--------Rbeast--------------------#

o = rb.beast(df, \
          start          = 1,
          deltat         = 1,
          season         = 'none',  # 'harmonic','dummy','svd','none'
          period         = float('nan'),
          scp_minmax     = [0, 10],
          sorder_minmax  = [0, 5],
          sseg_minlength = None,  # an integer
          tcp_minmax     = [0, 10],                                        
          torder_minmax  = [0, 1],
          tseg_minlength = None,  # an integer
          detrend        = False,
          deseasonalize  = False,
          mcmc_seed      = 0,
          mcmc_burbin    = 200,
          mcmc_chains    = 3,
          mcmc_thin      = 5,
          mcmc_samples   = 5000,                                                 
          precValue      = 1.5,
          precPriorType  = 'componentwise',  # componentwise','uniform','constant','orderwise'
          print_options  = True,
          print_progress = True,
          quiet          = False,
          hasOutlier     = False,
          ocp_max        = 10,
          gui            = False) 

Error setting MaxKnotNum_Trend to zero

I would like to set MaxKnotNum_Trend to zero to examine seasonal changes only. When I do this I get the error "r2<r1:There must be something wrong!" before RStudio crashes.

beast123 + MATLAB crashing ... Linux

Ubuntu Linux 22.04 LTS + MATLAB R2023a upd3

>> rbeast_version

rbeastGitHubVersion =

    0.9461

Example:

      load('imageStack.mat') 
       % A toy example of stacked time series images: unevely-spaced in time
      NDVI3D=imageStack.ndvi    % a 12x9x1066 3D cube
      TIME  =imageStack.datestr % 1066 is the time series length%
      metadata=[];      
      metadata.time=[];
      metadata.time.dateStr=TIME
      metadata.time.strFmt='LT05_018032_20110726.yyyy-mm-dd';
      metadata.deltaTime  =1/12; % aggregated at a monthly interval
      metadata.period     =1.0;  % the period is 1.0 (year)
      extra=[];
      extra.dumpInputData   =true % get a copy of the aggregated input
      extra.numThreadsPerCPU = 2; % 2 threads per CPU core
      o=beast123(NDVI3D,metadata,[],[], extra) 
      imagesc(o.sig2)
      imagesc(o.trend.ncpPr(:,:,1:3))
      printbeast(o,[2,4]) %print the result at row 2 and col 4     
      plotbeast(o,'index',[2,4]) %plot the result at row 2 and col 4  

produce always MATLAB Crash:

MATLAB Log File: /home/kva/matlab_crash_dump.1020259-1


MATLAB Log File


      Segmentation violation detected at 2023-07-10 15:34:47 +0200

Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : X-Cinnamon
GNU C Library : 2.35 stable
Graphics Driver : Uninitialized hardware
Graphics card 1 : 0x10de ( 0x10de ) 0x1cb1 Version 535.54.3.0 (0-0-0)
Graphics card 2 : Not Started 0x8086 ( 0x8086 ) 0x3e98 Version 0.0.0.0 (0-0-0)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 6257193
MATLAB Root : /opt/MATLAB/R2023a
MATLAB Version : 9.14.0.2286388 (R2023a) Update 3
OpenGL : hardware
Operating System : Linux Mint 21.1
Process ID : 1020259
Processor ID : x86 Family 6 Model 158 Stepping 13, GenuineIntel
Session Key : d5cc3121-ac3a-4dd2-bc38-dce0840e29fb
Window System : The X.Org Foundation (12101004), display :0

Fault Count: 1

Abnormal termination:
Segmentation violation

Current Thread: 'MCR 0 interpret' id 140544990295616

Register State (from fault):
RAX = 0000000000000000 RBX = 00007fd363c62c90
RCX = 0000000000000000 RDX = 0000000000000000
RSP = 00007fd32e3870a0 RBP = 00007fd32e387680
RSI = 00007fd32e3871e0 RDI = 00007fd0be3f4640

R8 = 0000000000000001 R9 = 00007fd1e0823000
R10 = 00007fd1f8c6ca00 R11 = 4272b9ef08d57889
R12 = 0000000000000010 R13 = 00007fd363e6cc80
R14 = 000000000000001f R15 = 00007fd32e3871e0

RIP = 00007fd36c89659b EFL = 0000000000010202

CS = 0033 FS = 0000 GS = 0000

Stack Trace (from fault):
[ 0] 0x00007fd36c89659b /lib/x86_64-linux-gnu/libc.so.6+00615835
[ 1] 0x00007fd363c5a8be /home/kva/tmp/BEAST/work/Rbeast.mexa64+00370878
[ 2] 0x00007fd363c5ae2e /home/kva/tmp/BEAST/work/Rbeast.mexa64+00372270 mexFunction+00000014
[ 3] 0x00007fd3623d8f5f /opt/MATLAB/R2023a/bin/glnxa64/libmex.so+00954207
[ 4] 0x00007fd3623d8fd7 /opt/MATLAB/R2023a/bin/glnxa64/libmex.so+00954327
[ 5] 0x00007fd3623d9047 /opt/MATLAB/R2023a/bin/glnxa64/libmex.so+00954439
[ 6] 0x00007fd3623da5fa /opt/MATLAB/R2023a/bin/glnxa64/libmex.so+00959994
[ 7] 0x00007fd3623c51b0 /opt/MATLAB/R2023a/bin/glnxa64/libmex.so+00872880
[ 8] 0x00007fd362bf13dd /opt/MATLAB/R2023a/bin/glnxa64/libmwm_dispatcher.so+01528797 ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2+00000173
[ 9] 0x00007fd362bf24cc /opt/MATLAB/R2023a/bin/glnxa64/libmwm_dispatcher.so+01533132
[ 10] 0x00007fd362bf28a1 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_dispatcher.so+01534113 ZN8Mfh_file8dispatchEiPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPS1+00000033
[ 11] 0x00007fd361e5d95e /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+02480478
[ 12] 0x00007fd361e5dba6 /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+02481062
[ 13] 0x00007fd35100ed04 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+10546436
[ 14] 0x00007fd3510018e0 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+10492128
[ 15] 0x00007fd350f9d692 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+10081938
[ 16] 0x00007fd350ced250 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07262800
[ 17] 0x00007fd350cef544 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07271748
[ 18] 0x00007fd350ceca89 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07260809
[ 19] 0x00007fd350cfe3ff /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07332863
[ 20] 0x00007fd350cfee79 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07335545
[ 21] 0x00007fd350cec8a4 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07260324
[ 22] 0x00007fd350cec996 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+07260566
[ 23] 0x00007fd350e2961c /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+08558108
[ 24] 0x00007fd350e2d6b1 /opt/MATLAB/R2023a/bin/glnxa64/libmwm_lxe.so+08574641
[ 25] 0x00007fd361fdb1c8 /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+04043208
[ 26] 0x00007fd361ebd4ef /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+02872559
[ 27] 0x00007fd361ec4567 /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+02901351
[ 28] 0x00007fd361f826d5 /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+03679957
[ 29] 0x00007fd361f82b3e /opt/MATLAB/R2023a/bin/glnxa64/libmwlxemainservices.so+03681086
[ 30] 0x00007fd362ed7d12 /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+01019154 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000754
[ 31] 0x00007fd26a474f4c /opt/MATLAB/R2023a/bin/glnxa64/libnativejmi.so+01011532 _ZN9nativejmi17JmiUserEvalPlugin7executeEP15inWorkSpace_tag+00000028
[ 32] 0x00007fd362eb1bd0 /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00863184
[ 33] 0x00007fd362e7d64b /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00648779
[ 34] 0x00007fd3624ad831 /opt/MATLAB/R2023a/bin/glnxa64/libmwbridge.so+00497713
[ 35] 0x00007fd3624adc43 /opt/MATLAB/R2023a/bin/glnxa64/libmwbridge.so+00498755
[ 36] 0x00007fd3624c90c2 /opt/MATLAB/R2023a/bin/glnxa64/libmwbridge.so+00610498 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEES4_EE+00000210
[ 37] 0x00007fd3624c9303 /opt/MATLAB/R2023a/bin/glnxa64/libmwbridge.so+00611075 _Z8mnParserv+00000435
[ 38] 0x00007fd362d4d1bf /opt/MATLAB/R2023a/bin/glnxa64/libmwmcr.so+00889279
[ 39] 0x00007fd36d935234 /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so+03363380 ZN14cmddistributor15PackagedTaskIIP10invokeFuncIN7mwboost8functionIFvvEEEEENS2_10shared_ptrINS2_6futureIDTclfp_EEEEEERKT+00000068
[ 40] 0x00007fd36d9354e9 /opt/MATLAB/R2023a/bin/glnxa64/libmwmvm.so+03364073 _ZNSt17_Function_handlerIFN7mwboost3anyEvEZN14cmddistributor15PackagedTaskIIP10createFuncINS0_8functionIFvvEEEEESt8functionIS2_ET_EUlvE_E9_M_invokeERKSt9_Any_data+00000025
[ 41] 0x00007fd362ed1d8d /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00994701 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000093
[ 42] 0x00007fd362d48765 /opt/MATLAB/R2023a/bin/glnxa64/libmwmcr.so+00870245
[ 43] 0x00007fd362eb1bd0 /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00863184
[ 44] 0x00007fd362e7bab2 /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00641714
[ 45] 0x00007fd362e7c403 /opt/MATLAB/R2023a/bin/glnxa64/libmwiqm.so+00644099
[ 46] 0x00007fd362d37d9e /opt/MATLAB/R2023a/bin/glnxa64/libmwmcr.so+00802206
[ 47] 0x00007fd362d37995 /opt/MATLAB/R2023a/bin/glnxa64/libmwmcr.so+00801173
[ 48] 0x00007fd362d37bed /opt/MATLAB/R2023a/bin/glnxa64/libmwmcr.so+00801773
[ 49] 0x00007fd36cee0277 /opt/MATLAB/R2023a/bin/glnxa64/libmwboost_thread.so.1.78.0+00045687
[ 50] 0x00007fd36c894b43 /lib/x86_64-linux-gnu/libc.so.6+00609091
[ 51] 0x00007fd36c926a00 /lib/x86_64-linux-gnu/libc.so.6+01206784

This error was detected while a MEX-file was running. If the MEX-file
is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

Print blank lines

o = rb.beast(ts, season='none', start=0, deltat=1,
             quiet=True, print_progress=False, print_options=False)

In above code, even after setting various print prohibitions, blank lines are still printed. This causes the progress bar to display incorrectly when used with the tqdm library for batch calls.

About Python drawing

Dear:
I am using Python language and when drawing using the Rbeat library, I found when I use "rb.plot(o)" the image is not displayed. May I ask how to make the image display?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.