Code Monkey home page Code Monkey logo

changepoint-data-structure's Introduction

TODOs

Efficient data structure for computing Optimal Partitioning models.

Basic structure is a binary search tree, probably best to implement on top of a C++ STL map.

Assume data set of size d.

Assume we have a solver OP(lambda) -> segments, loss. O(d log d)

Let N be the number of elements in the data structure.

Public Methods

  • getModelForPenalty(lambda): find l1<=lambda<l2 in O(log N). If l1==lambda then return stored segments for l1 in O(1). If stored segments2=segments1-1 then return segments in O(1). Otherwise run OP(lambda) and store result for lambda in O(1).

Private Methods

  • insertModel(lambda, segments, loss): O(log N) โ€“ useful if we have a bunch of pre-computed models on disk.

Application: compute the full path on the benchmark data, see if the min error that we get from the target interval algo is the same as the actual min error. Analyze computation time: using data structure we should be log-linear rather than quadratic.

Application: compare O(N^2) Segment Neighborhood algo (jointseg::Fpsn) with our algo. 1-we can do parallel eval with OP. 2- only 73% of SN models are actually computable via OP. 3-modelSelection code is linear time.

Parallel full path algo.

6 Feb 2019

no.intermediates.selected.R exhibits a set of valid loss/complexity values for which no intermediates are selected โ€“ how many pops does this cause?

4 Feb 2019

loss.small.R computes full path of loss values for all 13,000+ neuroblastoma data sets with less than 1000 data points.

figure-loss-small.R visualizes the corresponding model selection functions. viz

figure-loss-small.png

figure-loss-small-data.R also shows the data sets and segmentation models. viz

changepoint-data-structure's People

Contributors

tdhock avatar

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.