Skip to content

[TESTING_ENVIRONMENT] Initial pre-recorded data algorithm positioning analyzer#35

Open
mieshki wants to merge 2 commits intowonkleio:devfrom
mieshki:analyzer_init
Open

[TESTING_ENVIRONMENT] Initial pre-recorded data algorithm positioning analyzer#35
mieshki wants to merge 2 commits intowonkleio:devfrom
mieshki:analyzer_init

Conversation

@mieshki
Copy link
Copy Markdown

@mieshki mieshki commented Feb 12, 2026

  • Common JSON format with validation
  • CLI usage for automatic testing
  • --visual-debug option to see estimation errors interactively
  • Handy new algorithms/grids registration
  • Allows to test many datasets at once

Current algorithms and datasets are only for demo purposes, proper ones to be developed/collected later on

Initial thresholds:
    <0.15mm (good)
    0.15-0.35mm (acceptable)
    0.35-0.7mm (too big)
    >0.7mm (terrible)

More details in README.md

Example output:

> python analyzer.py --dataset datasets/hexgrid --print-metric-guide

Skipped (grid type incompatibility):
  • ideal_algorithm × test_centers.json: Algorithm supports SquareGrid, dataset uses HexagonalGrid
  • ideal_algorithm × test_long.json: Algorithm supports SquareGrid, dataset uses HexagonalGrid


Metric guide:
N       → Number of samples.
MAE     → Average position error. Lower is better.
Median  → Typical error (robust to outliers).
RMS     → Penalizes large errors strongly.
P95     → 95% of errors are below this value.
P99     → Worst realistic case.
Max     → Absolute worst case.
Fail%   → % of points above failure threshold.
BiasX/Y → Systematic shift on axis (should be ~0).
Score   → Overall quality score (0-100, higher is better).

Good signs:
• Median ≈ MAE
• RMS slightly above MAE
• P95 not >> MAE
• Bias near 0
• Low Fail%
• High Score (>70)

+--------------+------------------------------------+-----+------+------+--------------+------+------+-------+-------+-------+-------+--------+-------+
|  Algorithm   |                Data                |  N  | MAE  | RMS  | Median (P50) | P90  | P95  |  P99  |  Max  | BiasX | BiasY | Fail%  | Score |
+--------------+------------------------------------+-----+------+------+--------------+------+------+-------+-------+-------+-------+--------+-------+
| gaussian_fit | datasets/hexgrid/test_centers.json |  13 | 0.10 | 0.11 |     0.09     | 0.16 | 0.19 |  0.22 |  0.23 |  0.03 | -0.00 | 23.1%  |  85.5 |
| gaussian_fit |  datasets/hexgrid/test_long.json   | 153 | 2.46 | 3.80 |     2.17     | 3.52 | 4.01 | 16.02 | 26.11 |  0.57 |  0.06 | 100.0% |  0.0  |
+--------------+------------------------------------+-----+------+------+--------------+------+------+-------+-------+-------+-------+--------+-------+


> python analyzer.py --help
usage: analyzer.py [-h] [--list-algorithms] [--list-grids] [--list-algorithms-per-grid GRID_TYPE] [--dataset DATASET] [--algorithm ALGORITHM] [--detailed] [--print-metric-guide] [--visual-debug]

Position Algorithm Analyzer - Evaluate magnetic position estimation algorithms

options:
  -h, --help            show this help message and exit
  --list-algorithms     Print available algorithms and exit
  --list-grids          Print supported grid types and exit
  --list-algorithms-per-grid GRID_TYPE
                        List algorithms that support a specific grid type
  --dataset DATASET     Path to a single JSON file or folder containing JSON files
  --algorithm ALGORITHM
                        Algorithm(s) to run (use 'all' to run all algorithms, or comma-separated list like 'alg1,alg2', default: all)
  --detailed            Enable detailed analysis output
  --print-metric-guide  Print metric guide before results (default: False)
  --visual-debug        Enable visual debugging

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​pygame@​2.6.17410010010070
Addedpypi/​numpy@​2.4.27510010010070
Addedpypi/​prettytable@​3.17.0100100100100100

View full report

@Ross0907
Copy link
Copy Markdown
Contributor

Ross0907 commented Feb 14, 2026

Rudimentary simulation script : here. Feel free to provide suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants