These programs are for Self-Organizing Map algorithm with high performance and 
low computational costs by Hiroki Kusumoto and Yoshiyasu Takefuji, Keio University.
(kusu@sfc.keio.ac.jp, hiroki.kusumoto@gmail.com, takefuji@sfc.keio.ac.jp)

The idea of these programs are based on following two papers.
"O(log2 M) Self-Organizing Map algorithm without learning of neighborhood vectors", IEEE trans. on neural networks, vol. 17, no. 6, pp. 1656-1661, 2006. 
"Evalation of the performance of O(log2 M) Self-Organizing Map algorithm without neighborhood learning", IJCSNS, pp.104-108, 2006.

 HOW TO USE 

1. Prepare input data file 

***sample input data file***
2,4,7
4,5,-3
1,-3,5
-3,-2,4
****************************
This sample shows 3 dimensional 4 data.
Just write 4 lines and delimit elements by ",".

2. SOM 

 2.1. If your dataset is "int" type, read here. 
     (The dataset will be used without conversion.)

  % gcc ksom_int_1.0.c -o ksom_int.exe
 
  % ./ksom_int.exe (file name of input data) (map size) (seed of random)
  e.g.  % ./ksom_int.exe input.txt 17 1
  Map size must be  2, 3, 5, 9, 17, 33, 65, 129, ...   (2^n +1) n=0,1,2,...

 2.2. If your data is "double" type, read here. 
     (The dataset will be converted into "int" type one using standard deviations by dimensions.)

   2.2.1. (packaged version)
       % gcc ksom_double_1.0.c -o ksom_double.exe
 
       % ./ksom_double.exe (file name of input data) (map size) (seed of random)	
       e.g.  % ./ksom_double.exe input.txt 17 1
       Map size must be  2, 3, 5, 9, 17, 33, 65, 129, ...   (2^n +1) n=0,1,2,...

   2.2.2. (convert into int type before SOM)
      % gcc convert_into_int_1.0.c -o convert.exe

      % ./convert.exe (file name of input data)
      then "int_data.txt" are created.
      Please go to 2.1. with this file.

3. Output
   Two files are created: "ksom_result.txt" and "ksom_map.txt".

***ksom_result.txt***
3,4
0,6
12,4
9,9
*********************
"ksom_result.txt" shows coordinates on the map.

***ksom_map.txt***
600,-1000
800,1200

-100,-400
500,700

900,10000
-200,-400
******************
"ksom_map.txt" shows weight vectors of the map.
This sample is with 2*2 map and 3 dimensional input data.
The weight vector on (1,0) is (800, 500, -200).


Please let us know by email if you have problem, using these programs.

Hiroki Kusumoto (kusu@sfc.keio.ac.jp, hiroki.kusumoto@gmail.com)
Yoshiyasu Takefuji (takefuji@sfc.keio.ac.jp)

Thank you very much.

---------------------
Hiroki Kusumoto Ph.D
Keio University
