Skip to content

Commit 21da965

Browse files
committed
Merge branch 'release/0.2.0'
2 parents cd4e297 + 0f3ffa2 commit 21da965

28 files changed

Lines changed: 7724 additions & 309 deletions

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kohonen"
3-
version = "0.1.6"
3+
version = "0.2.0"
44
authors = ["m-lange <martin_lange_@gmx.net>"]
55
edition = "2018"
66

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# kohonen
22
A Rust Self-organizing Maps (SOM) / Kohonen networks library and command line tool.
33

4-
This project is in a very experimental state and does not yet provide much useful
5-
functionality except a plain multilayered Kohonen map (aka Super-SOM) implementation.
4+
_Warning:_ This project is in a very experimental state.
5+
6+
## Self-organizing maps
7+
8+
* [SOM on Wikipedia](https://en.wikipedia.org/wiki/Self-organizing_map)
9+
* For Super-SOMs, see [this paper](https://www.jstatsoft.org/article/view/v021i05) about a respective R package.
10+
11+
## Command line tool
12+
13+
### Installation
14+
15+
* Download the [latest binaries](https://github.com/mlange-42/kohonen/releases/latest).
16+
* Unzip somewhere with write privileges (only required for running examples in place).
17+
18+
### Usage
19+
20+
* Try the examples in sub-directory `cmd_examples`.
21+
* To view the full list of options, run `kohonen --help`
22+
23+
## Library / crate
24+
25+
To use this crate as a library, add the following to your `Cargo.toml` dependencies section:
26+
```
27+
kohonen = { git = "https://github.com/mlange-42/kohonen.git" }
28+
```
29+
See the included examples for usage details.
30+
31+
## Development version
32+
33+
For the latest development version, see branch [`dev`](https://github.com/mlange-42/kohonen/tree/dev).

cmd_examples/countries.bat

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
..\target\release\kohonen.exe ^
22
--file ..\example_data\countries.csv ^
33
--size 16 12 ^
4-
--episodes 5000 ^
5-
--layers "child_mort_2010 birth_p_1000 GNI LifeExpectancy PopGrowth PopUrbanized PopGrowthUrb AdultLiteracy PrimSchool Income_low_40 Income_high_20" "continent" ^
4+
--epochs 2500 ^
5+
--layers "child_mort_2010 birth_p_1000 log_GNI LifeExpectancy PopGrowth PopUrbanized PopGrowthUrb AdultLiteracy PrimSchool Income_low_40 Income_high_20" "continent" ^
66
--preserve Country code ^
7-
--categ 0 1 ^
7+
--labels Country ^
8+
--label-length 10 ^
9+
--categ false true ^
810
--norm gauss none ^
9-
--weights 1 1 ^
11+
--weights 1 0.5 ^
1012
--alpha 0.2 0.01 lin ^
11-
--radius 10 0.8 lin ^
13+
--radius 6 0.8 lin ^
1214
--decay 0.2 0.001 exp ^
1315
--neigh gauss ^
1416
--no-data - ^
1517
--fps 1 ^
16-
--output ..\example_data\countries
18+
--output ..\example_data\_countries

cmd_examples/iris.bat

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
..\target\release\kohonen.exe ^
22
--file ..\example_data\iris.csv ^
3-
--size 20 16 ^
4-
--episodes 2500 ^
3+
--size 16 12 ^
4+
--epochs 250 ^
55
--layers "sepal_length sepal_width petal_length petal_width" "species" ^
6-
--categ 0 1 ^
6+
--labels species ^
7+
--categ false true ^
78
--norm gauss none ^
8-
--weights 1 1 ^
9+
--weights 1 0.5 ^
910
--alpha 0.2 0.01 lin ^
1011
--radius 8 0.7 lin ^
1112
--decay 0.2 0.001 exp ^
1213
--neigh gauss ^
13-
--output ..\example_data\iris
14+
--output ..\example_data\_iris

cmd_examples/us-congress-votes.bat

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
..\target\release\kohonen.exe ^
2+
--file ..\example_data\us-congress-votes.csv ^
3+
--size 16 12 ^
4+
--epochs 1000 ^
5+
--layers "handicapped-infants water-project-cost-sharing adoption-of-the-budget-resolution physician-fee-freeze el-salvador-aid religious-groups-in-schools anti-satellite-test-ban aid-to-nicaraguan-contras mx-missile immigration synfuels-corporation-cutback education-spending superfund-right-to-sue crime duty-free-exports export-administration-act-south-africa" "party" ^
6+
--labels label ^
7+
--label-length 10 ^
8+
--categ false true ^
9+
--norm none none ^
10+
--weights 1 0.5 ^
11+
--alpha 0.2 0.01 lin ^
12+
--radius 6 0.8 lin ^
13+
--decay 0.2 0.001 exp ^
14+
--neigh gauss ^
15+
--no-data - ^
16+
--fps 1 ^
17+
--output ..\example_data\_us-congress-votes

cmd_examples/winequality-red.bat

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
..\target\release\kohonen.exe ^
2+
--file ..\example_data\winequality-red.csv ^
3+
--size 16 12 ^
4+
--epochs 1000 ^
5+
--layers "fixed-acidity volatile-acidity citric-acid residual-sugar chlorides free-sulfur-dioxide total-sulfur-dioxide density pH sulphates alcohol" "quality" ^
6+
--labels quality ^
7+
--categ false false ^
8+
--norm gauss unit ^
9+
--weights 1 0.5 ^
10+
--alpha 0.2 0.01 lin ^
11+
--radius 6 0.8 lin ^
12+
--decay 0.2 0.001 exp ^
13+
--neigh gauss ^
14+
--no-data - ^
15+
--fps 1 ^
16+
--output ..\example_data\_winequality-red

cmd_examples/winequality-white.bat

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
..\target\release\kohonen.exe ^
2+
--file ..\example_data\winequality-white.csv ^
3+
--size 16 12 ^
4+
--epochs 1000 ^
5+
--layers "fixed-acidity volatile-acidity citric-acid residual-sugar chlorides free-sulfur-dioxide total-sulfur-dioxide density pH sulphates alcohol" "quality" ^
6+
--labels quality ^
7+
--categ false false ^
8+
--norm gauss unit ^
9+
--weights 1 0.5 ^
10+
--alpha 0.2 0.01 lin ^
11+
--radius 6 0.8 lin ^
12+
--decay 0.2 0.001 exp ^
13+
--neigh gauss ^
14+
--no-data - ^
15+
--fps 1 ^
16+
--output ..\example_data\_winequality-white

example_data/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*-out.csv
2+
*-units.csv
3+
*-som.json

0 commit comments

Comments
 (0)