A julia package for clustering spatial timeseries, like for example eye-tracking data, based on PCCA+.
- Bachelor thesis (https://github.com/axsk/bachelor/blob/master/ba.pdf)
- Spectral Clustering for Non-Reversible Markov Chains (https://doi.org/https://doi.org/10.1007/s40314-018-0697-0)
Requires Julia 0.6.
- Install the package:
Pkg.clone("https://github.com/axsk/hokusai")- Copy the data file "sallsac_Hokusai.seq" into the packages data directory (~/.julia/v0.6/Hokusai/data).
- Test the package:
Pkg.test("Hokusai")See the test file
datais a DataFrame containing the x-/y-coordinates in the first two columns, the relative time in the third and an identifier for aggregation in the fourth column, allowing clustering of multiple test executions.ndenotes the desired number of clusters.taudenotes the timestep used for creating the markov jump processsigmadenotes the gaussian mixture standard deviation used for the "spatial coupling".preclusterspecifies the number of preclusters to generate via kmeans, to improve performance. (use0for no preclustering)sortdenotes how the final clusters will be ordered.:sizesorts by number of fixations in each cluster, and:xby the average horizontal position.methodspecifies the objective function used in the PCCA+ optimization. Accepted values::scaling(Weber),:metastability(Deuflhard),:crispness(Röblitz)
cluster returns a HokusaiResult, containing the resulting clustering in the field assignments.
- think about pi
- parameter optimization -- automatic tau/gamma -- automatic n (which method in nonreversible case?)
- we want tau to measure every fixation, -> min fixdur?
- sigma should seperate different fixations -> mean fixdist?