Skip to content

Julia-language port of the Sequencer algorithm, originally developed in python (https://github.com/dalya/Sequencer). The Sequencer finds trends in 1-dimensional data sets and has been used by its original authors for data analysis in astrophysics, seismology, image processing, etc. Contributions are welcome!

License

Notifications You must be signed in to change notification settings

turingtest37/SequencerJ.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SequencerJ

SequencerJ is a pure Julia implementation of the Sequencer Algorithm, a data analysis tool to identify and extract the principal trends in a set of 1-d data vectors.

Getting started with SequencerJ is easy. From the Julia REPL:

    julia> using Pkg; Pkg.add("SequencerJ")
    [...]
    julia> using SequencerJ
    [ Info: Precompiling SequencerJ [348581b9-6e84-42e0-ac4e-fe9177c221e6]
    [...]

You may get WARNINGs upon compilation. Sorry, I'm working on that! You can safely ignore them for most purposes, but if you are developing SequencerJ locally and use the Revise package, note that you may have to restart your Julia environment more often than usual.

    julia> A = rand(50,100); #some data to process. 

    julia> m = ALL_METRICS
    (Euclidean(0.0), EMD(nothing), KLDivergence(), Energy(nothing))

    julia> s = (1,2,4)
    (1, 2, 4)

    julia> seqres = sequence(A; metrics=m, scales=s)
    ┌ Info: Sequencing data with
    │     shape: (50, 100)
    │     metric(s): (Euclidean(0.0), EMD(nothing), KLDivergence(), Energy(nothing))
    └     scale(s): (1, 2, 4)
    [...]

seqres is a SequencerResult type that may be used to retrieve results of the sequencing run. The order function returns the best reordering of the data columns that was found.

    julia> bestseq = order(seqres)
    100-element Array{Int64,1}:
    10
    15
    13
    [...]

The Sequencer also calculates a fitness coefficient η that can be used to compare quality of solutions using various metrics and scales against the same data. Bigger is better. η is returned by the elong function.

    julia> eta = elong(seqres)
    6.2345

The paper that describes the Sequencer algorithm and its applications can be found on Arxiv: [https://arxiv.org/abs/2006.13948].

About

Julia-language port of the Sequencer algorithm, originally developed in python (https://github.com/dalya/Sequencer). The Sequencer finds trends in 1-dimensional data sets and has been used by its original authors for data analysis in astrophysics, seismology, image processing, etc. Contributions are welcome!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages