annotate toolboxes/MIRtoolbox1.3.2/somtoolbox/somtoolbox.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 % SOM Toolbox
Daniel@0 2 % Version 2.0beta, May 30 2002
Daniel@0 3 %
Daniel@0 4 % Copyright 1997-2000 by
Daniel@0 5 % Esa Alhoniemi, Johan Himberg, Juha Parhankangas and Juha Vesanto
Daniel@0 6 % Contributed files may contain copyrights of their own.
Daniel@0 7 %
Daniel@0 8 % SOM Toolbox comes with ABSOLUTELY NO WARRANTY; for details
Daniel@0 9 % see License.txt in the program package. This is free software,
Daniel@0 10 % and you are welcome to redistribute it under certain conditions;
Daniel@0 11 % see License.txt for details.
Daniel@0 12 %
Daniel@0 13 %
Daniel@0 14 % Demos
Daniel@0 15 %
Daniel@0 16 % som_demo1 SOM Toolbox demo 1: basic properties
Daniel@0 17 % som_demo2 SOM Toolbox demo 2: basic usage
Daniel@0 18 % som_demo3 SOM Toolbox demo 3: visualization
Daniel@0 19 % som_demo4 SOM Toolbox demo 4: data analysis
Daniel@0 20 %
Daniel@0 21 % Creation of structs
Daniel@0 22 %
Daniel@0 23 % som_set create & set (& check) values to structs
Daniel@0 24 % som_info print out information on a given struct
Daniel@0 25 % som_data_struct create & initialize a data struct
Daniel@0 26 % som_map_struct create & initialize a map struct
Daniel@0 27 % som_topol_struct create & initialize a topology struct
Daniel@0 28 % som_train_struct create & initialize a train struct
Daniel@0 29 % som_clstruct create a cluster struct
Daniel@0 30 % som_clset set properties in a cluster struct
Daniel@0 31 % som_clget get stuff from a cluster struct
Daniel@0 32 %
Daniel@0 33 % Struct conversion and file I/O
Daniel@0 34 %
Daniel@0 35 % som_vs1to2 converts a version 1.0 struct to version 2.0 struct
Daniel@0 36 % som_vs2to1 converts a version 2.0 struct to version 1.0 struct
Daniel@0 37 % som_read_data reads a (SOM_PAK format) ASCII data file
Daniel@0 38 % som_write_data writes a SOM_PAK format codebook file
Daniel@0 39 % som_write_cod writes a SOM_PAK format data file
Daniel@0 40 % som_read_cod reads a SOM_PAK format codebook file
Daniel@0 41 %
Daniel@0 42 % Data preprocessing
Daniel@0 43 %
Daniel@0 44 % som_normalize normalize data set
Daniel@0 45 % som_denormalize denormalize data set
Daniel@0 46 % som_norm_variable (de)normalize one variable
Daniel@0 47 % preprocess preprocessing GUI
Daniel@0 48 %
Daniel@0 49 % Initialization and training functions
Daniel@0 50 %
Daniel@0 51 % som_make create, initialize and train a SOM
Daniel@0 52 % som_randinit random initialization algorithm
Daniel@0 53 % som_lininit linear initialization algorithm
Daniel@0 54 % som_seqtrain sequential training algorithm
Daniel@0 55 % som_batchtrain batch training algorithm
Daniel@0 56 % som_gui SOM initialization and training GUI
Daniel@0 57 % som_prototrain a simple version of sequential training: easy to modify
Daniel@0 58 %
Daniel@0 59 % Clustering algorithms
Daniel@0 60 %
Daniel@0 61 % som_kmeans k-means algorithm (was earlier kmeans)
Daniel@0 62 % kmeans_clusters try and evaluate several k-means clusterings
Daniel@0 63 % neural_gas neural gas vector quantization algorithm
Daniel@0 64 % som_linkage hierarchical clustering algorithms
Daniel@0 65 % som_cllinkage hierarchical clustering of SOM
Daniel@0 66 % som_dmatminima local minima from distance (or U-) matrix
Daniel@0 67 % som_dmatclusters distance (or U-) matrix based clustering
Daniel@0 68 % som_clspread spreads clusters to unassinged map units
Daniel@0 69 % som_cldist calculate distances between clusters
Daniel@0 70 % som_gapindex gap validity index of clustering
Daniel@0 71 % db_index Davies-Bouldin validity index of clustering
Daniel@0 72 %
Daniel@0 73 % Supervised/classification algorithms
Daniel@0 74 %
Daniel@0 75 % som_supervised supervised SOM algorithm
Daniel@0 76 % lvq1 LVQ1 algorithm
Daniel@0 77 % lvq3 LVQ3 algorithm
Daniel@0 78 % knn k-NN classification algorithm
Daniel@0 79 % knn_old k-NN classification algorithm (old version)
Daniel@0 80 %
Daniel@0 81 % SOM error measures
Daniel@0 82 %
Daniel@0 83 % som_quality quantization and topographic error of SOM
Daniel@0 84 % som_distortion SOM distortion measure
Daniel@0 85 % som_distortion3 elements of the SOM distortion measure
Daniel@0 86 %
Daniel@0 87 % Auxiliary functions
Daniel@0 88 %
Daniel@0 89 % som_bmus calculates BMUs for given data vectors
Daniel@0 90 % som_eucdist2 pairwise squared euclidian distances between vectors
Daniel@0 91 % som_mdist calculates pairwise distances between vectors
Daniel@0 92 % som_divide extract subsets of data based on map
Daniel@0 93 % som_label give labels to map units
Daniel@0 94 % som_label2num rcodes string data labels to interger class labels
Daniel@0 95 % som_autolabel automatically labels the SOM based on given data
Daniel@0 96 % som_unit_coords calculates coordinates in output space for map units
Daniel@0 97 % som_unit_dists distances in output space between map units
Daniel@0 98 % som_unit_neighs units in 1-neighborhood for each map unit
Daniel@0 99 % som_neighborhood calculates neighborhood matrix for the given map
Daniel@0 100 % som_neighbors calculates different kinds of neighborhoods
Daniel@0 101 % som_neighf calculates neighborhood function values
Daniel@0 102 % som_select GUI for manual selection of map units
Daniel@0 103 % som_estimate_gmm create Gaussian mixture model on top of SOM
Daniel@0 104 % som_probability_gmm evaluate Gaussian mixture model
Daniel@0 105 % som_ind2sub from linear index to subscript index
Daniel@0 106 % som_sub2ind from subscript index to linear index
Daniel@0 107 % som_ind2cod from linear index to SOM_PAK linear index
Daniel@0 108 % som_cod2ind from SOM_linear index to SOM_PAK linear index
Daniel@0 109 % nanstats mean, std and median which ignore NaNs
Daniel@0 110 % som_modify_dataset add, remove, or extract samples and components
Daniel@0 111 % som_fillnans fill NaNs in a data set based on given SOM
Daniel@0 112 % som_stats statistics of a data set
Daniel@0 113 % som_drmake calculate descriptive rules for a cluster
Daniel@0 114 % som_dreval evaluate descriptive rules for a cluster
Daniel@0 115 % som_drsignif rule significance measures
Daniel@0 116 %
Daniel@0 117 % Using SOM_PAK from Matlab
Daniel@0 118 %
Daniel@0 119 % som_sompaktrain uses SOM_PAK to train a map
Daniel@0 120 % sompak_gui GUI for using SOM_PAK from Matlab
Daniel@0 121 % sompak_init call SOM_PAK's initialization programs from Matlab
Daniel@0 122 % sompak_init_gui GUI for using SOM_PAK's initialization from Matlab
Daniel@0 123 % sompak_rb_control an auxiliary function for sompak_*_gui functions.
Daniel@0 124 % sompak_sammon call SOM_PAK's Sammon program from Matlab
Daniel@0 125 % sompak_sammon_gui GUI for using SOM_PAK's Sammon program from Matlab
Daniel@0 126 % sompak_train call SOM_PAK's training program from Matlab
Daniel@0 127 % sompak_train_gui GUI for using SOM_PAK's training program from Matlab
Daniel@0 128 %
Daniel@0 129 % Visualization
Daniel@0 130 %
Daniel@0 131 % som_show basic visualization
Daniel@0 132 % som_show_add add labels, hits and trajectories
Daniel@0 133 % som_show_clear remove extra markers
Daniel@0 134 % som_recolorbar refresh/reconfigure colorbars
Daniel@0 135 % som_show_gui GUI for using som_show and associated functions
Daniel@0 136 % som_grid visualization of SOM grid
Daniel@0 137 % som_cplane component planes and U-matrices
Daniel@0 138 % som_barplane bar chart visualization of map
Daniel@0 139 % som_pieplane pie chart visualization of map
Daniel@0 140 % som_plotplane plot chart visualization of map
Daniel@0 141 % som_trajectory launches a GUI for presenting comet-trajectories
Daniel@0 142 % som_dendrogram visualization of clustering tree
Daniel@0 143 % som_plotmatrix pairwise scatter plots and histograms
Daniel@0 144 % som_order_cplanes order and visualize the component planes
Daniel@0 145 % som_clplot plots of clusters (based on cluster struct)
Daniel@0 146 % som_projections_plot projections plots (see som_projections)
Daniel@0 147 % som_stats_plot plots of statistics (see som_stats)
Daniel@0 148 %
Daniel@0 149 % Auxiliary functions for visualization
Daniel@0 150 %
Daniel@0 151 % hits calculates hits, or sum of values for each map unit
Daniel@0 152 % som_hits calculates the response of data on the map
Daniel@0 153 % som_umat calculates the U-matrix
Daniel@0 154 % cca curvilinear component analysis projection algorithm
Daniel@0 155 % pcaproj principal component projection algorithm
Daniel@0 156 % sammon Sammon's mapping projection algorithm
Daniel@0 157 % som_connection connection matrix for map
Daniel@0 158 % som_vis_coords map unit coordinates used in visualizations
Daniel@0 159 % som_colorcode create color coding for map/2D data
Daniel@0 160 % som_bmucolor colors of the BMUs from a given map color code
Daniel@0 161 % som_normcolor simulate indexed colormap
Daniel@0 162 % som_clustercolor color coding which depends on clustering structure
Daniel@0 163 % som_kmeanscolor color coding according to k-means clustering
Daniel@0 164 % som_kmeanscolor2 a newer version of the som_kmeanscolor function
Daniel@0 165 % som_fuzzycolor a fuzzy color coding
Daniel@0 166 % som_coloring a SOM-based color coding
Daniel@0 167 % som_projections calculates a default set of projections
Daniel@0 168 %
Daniel@0 169 % Report generation stuff
Daniel@0 170 %
Daniel@0 171 % som_table_struct creates a table struct
Daniel@0 172 % som_table_modify modifies a table struct
Daniel@0 173 % som_table_print print a table in various formats
Daniel@0 174 % rep_utils various utilities for printing report elements
Daniel@0 175 % som_stats_table a table of data set statistics
Daniel@0 176 % som_stats_report report on data set statistics
Daniel@0 177 %
Daniel@0 178 % Low level routines used by visualization functions
Daniel@0 179 %
Daniel@0 180 % vis_patch defines hexagonal and rectangular patches
Daniel@0 181 % vis_som_show_data returns UserData and subplot handles stored by som_show.m
Daniel@0 182 % vis_valuetype used for type checks
Daniel@0 183 % vis_footnote adds a movable text to the current figure
Daniel@0 184 % vis_trajgui the actual GUI started by som_trajectory.m
Daniel@0 185 % vis_PlaneAxisProperties set axis properties in visualization functions
Daniel@0 186 % vis_footnoteButtonDownFcn callback function for vis_footnote.m
Daniel@0 187 % vis_planeGetArgs converts topol struct to lattice, msize argument pair
Daniel@0 188 % vis_show_gui_comp internal function used by som_show_gui.m
Daniel@0 189 % vis_show_gui_tool internal function used by som_show_gui.m
Daniel@0 190 %
Daniel@0 191 % Other
Daniel@0 192 %
Daniel@0 193 % somtoolbox this file
Daniel@0 194 % iris.data IRIS data set (used in demos)
Daniel@0 195 % License.txt GNU General Public License
Daniel@0 196 % Copyright.txt Copyright notice