Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Procrustes analysis is giving weird/wrong results #723

@hohounk

Description

@hohounk

I have an application where I have to analyze data from sensors against reference data from the same sensors and in some cases, procrustes seems to break down and gives weird results. I've yet to see anything weird about the data I give it that could cause such issues.

This is an example of working case:
good

Blue is the raw data coming from sensors.
Red is the reference I compare against that is always constant.
Green is a piece of data cut out* from the blue data that has passed through procrustes analysis.

*) I cut off a couple dozen samples from both ends of the blue line

Rough pseudocode of how I'm using it is like this:

double [][,] dataset;
dataset[0] = red_line;
dataset[1] = blue_cut; // Not visible on graph here but exact raw data is linked at bottom

analyser.Compute(0, dataset);
green_line = analyser.ProcrustedDatasets[1].Transform(analyser.ProcrustedDatasets[0]);

Here is an example of what happens when the bug gets triggered somehow. Notice how the green line is basically mirrored horizontally from center point:
buggy

Does anyone know what could trigger such behavior and how to deal with it? I've been trying to go over the individual steps of the process with a fine tooth comb and so far I only know that the problem takes place in the Compute() function before the final Transform() step.

I put the input data of these two specific graphs + reference here in case someone wants to test it themselves:
https://docs.google.com/spreadsheets/d/1A-C2mm7lV_zJy-i-ORaewjkvcVyjr4ubSMyHj8REHOs/edit?usp=sharing

Sadly, I do not have a simple test application I could share that would show the problem but it should be relatively trivial to create.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions