fixed json, added python info
This commit is contained in:
parent
f74d9f0f90
commit
1ebfbf5666
1 changed files with 27 additions and 22 deletions
15
readme.md
15
readme.md
|
|
@ -8,8 +8,10 @@ It is an algorithm that analyzes a one-dimensional dataset of integers to identi
|
|||
|
||||
## Building
|
||||
|
||||
With a Rust and Cargo environment set up, simply run:
|
||||
|
||||
```sh
|
||||
$ cargo build
|
||||
$ cargo build --release
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
|
@ -27,7 +29,7 @@ The tool outputs a JSON string that includes details about the identified attrac
|
|||
```json
|
||||
|
||||
[
|
||||
...
|
||||
//...
|
||||
{
|
||||
"elements": [ 722, 722, 722, 725, 725, 726, 726, 726],
|
||||
"start": 722,
|
||||
|
|
@ -46,7 +48,7 @@ The tool outputs a JSON string that includes details about the identified attrac
|
|||
"centroid": 736.0,
|
||||
"z_score": -1.13359
|
||||
},
|
||||
...
|
||||
//...
|
||||
]
|
||||
```
|
||||
|
||||
|
|
@ -54,7 +56,7 @@ The tool outputs a JSON string that includes details about the identified attrac
|
|||
|
||||
To analyze a dataset from a file, provide the filename as an argument, followed by the factor and minimum cluster size parameters
|
||||
```sh
|
||||
lyagushka filename.txt 1.5 6
|
||||
lyagushka random_values.txt 1.5 6
|
||||
```
|
||||
(= '*Attractor clusters need to have at least 6 numbers with 1.5 times the mean density, void gaps need to be at leat 1.5 times the mean gap size wide*')
|
||||
|
||||
|
|
@ -63,6 +65,9 @@ lyagushka filename.txt 1.5 6
|
|||
Alternatively, you can pipe a list of integers into the tool, followed by the factor and minimum cluster size.
|
||||
|
||||
```sh
|
||||
echo "1\n2\n10\n20" | lyagushka 0.5 2
|
||||
cat random_values.txt | lyagushka 0.5 2
|
||||
```
|
||||
|
||||
## Python Module
|
||||
|
||||
If you need lyagushka in a Python environment, check out the 'Python' branch of this repository
|
||||
Loading…
Add table
Add a link
Reference in a new issue