BreakoutDetection
BreakoutDetection copied to clipboard
Added support for Python. Removed dependencies on Rcpp in C++ code.
Removed dependencies on Rcpp from the C++ files that aren't required for R. Created a file RcppWrappers.cpp that declares the Rcpp wrappers. Added some CMakeLists files to build directly from the C++ source as a stand-alone shared library. Added support for Python.
@roland-hochmuth The Travis CI build failed. Please submit a new PR after fixes.
That's embarrassing. I'll get this resolved as soon as I understand what exactly went wrong. Have to learn a little more about Travis CI. Hopefully, will get resolved soon.
@roland-hochmuth Click on 'Details' to see what went wrong with the CI build.
cc @putnam120
Thanks Arun, I know what is going wrong, but unfortunately, I haven't figured out how to resolve it. In experience with Rcpp and a busy week. Hopefully, I'll get back to this over the weekend. If this pull request sitting around becomes a problem I could abandon it. I'll eventually figure it out and issue a new one.
@roland-hochmuth No rush. Things will not break as I have not merged it. Once you have an update @putnam120 will review your patch.
+1 for the Python support! Is this a dead branch though?
Hi Kevin, Sorry, I started to get this done over the holidays and then ran into problems with my understanding of Rcpp. The Python bindings works, but the R bindings don't. I had tested in R, but it turned out I wasn't really testing my code, but instead was testing the already installed code. Thankfully, your automated tests caught this. I'm not sure when I'll get back to this. I think I need another holiday to complete it. If you want to remove the branch to clean things up, that would be OK with me. I'm still looking at integrating this into Monasca.
Regards --Roland
+1 for Python support
@bhemashekar rolands fork has Python support and worked out of the box for me. I ported the R-wrapper to Python to have the interface described in the R help file.
I will send a pull request end of August but could share work in progress via email (it's for a university project, and they don't give credit for code published before hand in date).
@PatrickSchiffmann Kindly share it with sh(dot)bharath(at)gmail(dot)com
@bhemashekar it is here https://github.com/roland-hochmuth/BreakoutDetection
The PR appears to cause an error with R installation:
RcppWrappers.cpp:13:40: error: cannot initialize a variable of type 'Rcpp::NumericVector::iterator' (aka 'double ') with an rvalue of type 'const_iterator' (aka 'const double ')
for (Rcpp::NumericVector::iterator it = Z.begin(); it != Z.end(); ++it) {
^ ~~~~~~~~~
1 error generated.
make: *** [RcppWrappers.o] Error 1
ERROR: compilation failed for package 'BreakoutDetection'
Which builds with the line altered as follows:
- for (Rcpp::NumericVector::iterator it = Z.begin(); it != Z.end(); ++it) {
+ for (Rcpp::NumericVector::const_iterator it = Z.begin(); it != Z.end(); ++it) {
Hi Roland, +1 for python support. However for some reason the min_size/beta/Degree arguments don't work and this is the error i get: TypeError: evaluate() got an unexpected keyword argument 'min_size'
Hi Roland, I figured it out!! evaluate in EdmMulti has been defined with *args, and therefore should only accepts values of the arguments min_size/beta/Degree. In order to provide named arguments viz. min_size=64 we need to define EdmMulti with **kwargs
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
Roland Hochmuth seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.