Giter VIP home page Giter VIP logo

Comments (3)

rkillick avatar rkillick commented on June 2, 2024

If I run the following then it works:

data=ts(data=rnorm(100),start=c(2000,1),frequency=12)
cpt.mean(data)

Output:

class 'cpt' : Changepoint Object
~~ : S4 class containing 12 slots with names
cpttype date version data.set method test.stat pen.type pen.value minseglen cpts ncpts.max param.est

Created on : Wed Aug 11 17:32:15 2021

summary(.) :

Created Using changepoint version 2.2.2
Changepoint type : Change in mean
Method of analysis : AMOC
Test Statistic : Normal
Type of penalty : MBIC with value, 13.81551
Minimum Segment Length : 1
Maximum no. of cpts : 1
Changepoint Locations :

Can you provide a minimal working example such as the above?

from changepoint.

1lliter8 avatar 1lliter8 commented on June 2, 2024

Ach, I constructed my ts object using a single-columned tibble rather than pull()ing to a vector. This was giving the object something to return with dim() when it shouldn't, and tripping the error. Switching select to pull resolves.

Sorry to bother you!

from changepoint.

rkillick avatar rkillick commented on June 2, 2024

No problem! I'm always open to hearing that my code my be incorrect but glad when it turns out I don't have to do anything :-)

Please do come back to me if you find anything else or have any comments for improvements. One thing I do need to do is return a ts object in the data slot for the output. Currently, we return a vector which means that the plotting doesn't use the time attributes of the input object. Clearly not desirable!

from changepoint.

Related Issues (20)

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.