Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BanchmarkLite package is obsolete #33

Open
qlahcim opened this issue Apr 4, 2022 · 4 comments
Open

BanchmarkLite package is obsolete #33

qlahcim opened this issue Apr 4, 2022 · 4 comments

Comments

@qlahcim
Copy link

qlahcim commented Apr 4, 2022

Could you add some other suitable Benchmark package (supported by the recent Julia Pkg) instead of BenchmarkLite? BechmarkLite is a completely dead project.

See ... perf.jl

@qlahcim
Copy link
Author

qlahcim commented Apr 5, 2022

Any response?

@Dom-Owens-UoB
Copy link
Collaborator

Hi Michal,

thanks for pointing this out, for now I'll delete the perf folder and I'l try to update this in the near future.
If you have a solution already, feel free to submit a pull request

@qlahcim
Copy link
Author

qlahcim commented Apr 5, 2022

Hi,
I am just starting to use Julia, switching from MATLAB. So, at least for now, I am not able to make any suitable submission to your project.

In MATLAB are two functions related to the Changepoint detection by PELT method:

  1. https://www.mathworks.com/help/matlab/ref/ischange.html
  2. https://www.mathworks.com/help/signal/ref/findchangepts.html

I just need to know how fast is your implementation vs MATLAB functions. My experience is, that the original PELT R code (+ internal C functions) by R. Killick is far slower than MATLAB implementation. I am not able to find any reason why is original implementation about 10-100x slower than MATLAB built-in functions.

Did you perform any speed comparisons with original code, or did you make some significant improvements at your Julia code?

Could you help me to evaluate performance of your Julia PELT code? I am using PELT with 'linear' statistics (linear regression segments), threshold = 1.0.

>> tic;[tf,s1,s2] = ischange(signal,'linear','Threshold',1.0);toc
Elapsed time is 0.054550 seconds.

On my PC this task take ~ 0.05sec on signal (86400 samples) ... see attached file (signal.txt ).
There are 87 change points see this picture.

Could you send me simple Julia script to read my signal and test your PELT code with proper cost function (linear segments) and measure CPU time?

@qlahcim qlahcim changed the title BanchmakLite package is obsolete BanchmarkLite package is obsolete Apr 5, 2022
@fairbrot
Copy link
Member

fairbrot commented Apr 6, 2022

Hi,

You could time a changepoint algorithm in the following way:

using DelimitedFiles
using Changepoints

# Run algorithm once to avoid timing JIT compilation overhead
data = rand(100)
seg_cost = NormalMeanSegment(data, σ)  # Create segment cost function
pelt_cps, pelt_cost = PELT(seg_cost, length(data))   # Run PELT

# Load data
signal = readdlm("signal.txt")
σ = std(signal)

@time begin
    seg_cost = NormalMeanSegment(data, σ)  # Create segment cost function
    pelt_cps, pelt_cost = PELT(seg_cost, length(data))   # Run PELT
end

Note however that this package doesn't currently have a linear segment cost function (please open an issue if you think this would be useful) so it won't be possible to directly compare the two packages for this. I've not done time comparisons but I suspect the R package is a bit faster than our one, since the underlying algorithms are mostly written in C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants