linked zhaba
This commit is contained in:
parent
7d28566292
commit
4518b9e65e
1 changed files with 23 additions and 13 deletions
36
readme.md
36
readme.md
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
(Russian лягушка [lʲɪˈɡuʂkə]: frog)
|
(Russian лягушка [lʲɪˈɡuʂkə]: frog)
|
||||||
|
|
||||||
Lyagushka is a Rust command-line tool inspired by Fatum Project's 'Zhaba' algorithm (Russian 'жаба': toad) that analyzes a one-dimensional dataset of integers to identify clusters of closely grouped "attractor" points and significant "void" gaps between these clusters. It calculates z-scores for each cluster or gap to measure their statistical significance relative to the dataset's mean density and distance between points. The analysis results, including attractors, voids, and their z-scores, are output as a JSON string.
|
Lyagushka is a Rust command-line tool inspired by Fatum Project's ['Zhaba' algorithm](https://gist.github.com/randogoth/ab5ab9e8665303be176f16241e7b26b5) (Russian 'жаба': toad) and expands upon it for more versatility.
|
||||||
|
|
||||||
|
It is an algorithm that analyzes a one-dimensional dataset of integers to identify clusters of closely grouped "attractor" points and significant "void" gaps between these clusters. It calculates z-scores for each cluster or gap to measure their statistical significance relative to the dataset's mean density and distance between points. The analysis results, including attractors, voids, and their z-scores, are output as a JSON string.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|
@ -20,23 +22,31 @@ $ cargo build
|
||||||
|
|
||||||
### Output
|
### Output
|
||||||
|
|
||||||
The tool outputs a JSON string that includes details about the identified clusters and gaps, along with their respective z-scores. Here's an example of the JSON output format:
|
The tool outputs a JSON string that includes details about the identified attractors and voids, along with their respective z-scores. Here's an example of the JSON output format:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|
||||||
[
|
[
|
||||||
|
...
|
||||||
{
|
{
|
||||||
"span_length": 1.0,
|
"elements": [ 722, 722, 722, 725, 725, 726, 726, 726],
|
||||||
"num_elements": 2,
|
"start": 722,
|
||||||
"centroid": 1.5,
|
"end": 726,
|
||||||
"z_score": -1.23
|
"span_length": 4,
|
||||||
},
|
"num_elements": 8,
|
||||||
{
|
"centroid": 724.0,
|
||||||
"span_length": 8.0,
|
"z_score": 1.19528
|
||||||
"num_elements": 0,
|
},
|
||||||
"centroid": 6.0,
|
{
|
||||||
"z_score": 2.45
|
"elements": [],
|
||||||
}
|
"start": 732,
|
||||||
|
"end": 740,
|
||||||
|
"span_length": 8,
|
||||||
|
"num_elements": 0,
|
||||||
|
"centroid": 736.0,
|
||||||
|
"z_score": -1.13359
|
||||||
|
},
|
||||||
|
...
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue