Histogram modeling

Number of centroids for each class (2^m)

m = 5 ;

Compute data-dependent centroids

vqCentroids1 = VQ[data1, m] ; vqCentroids2 = VQ[data2, m] ; vqCentroids = vqCentroids1 ~ Join ~ vqCentroids2 ;

Visualize data

gCentroids = PlotData2D[vqCentroids, pr, centroidStyle, FrameTicksNone] ;

[Graphics:../HTMLFiles/index_24.gif]

Visualize resultant partitioning of input space

gpart1 = DrawPartitioning[vqCentroids, pr, nS] ; Show[gpart1, gCentroids, yS, FrameTicksNone] ;

[Graphics:../HTMLFiles/index_26.gif]

Histograms for two classes

Compute histograms based on data-dependent centroids

h1 = Histogram[data1, vqCentroids, pr, 150] ; h2 = Histogram[data2, vqCentroids, pr, 150] ;

Visualize two histograms

gh1 = DrawHistogram[h1, pr, nS, AxesFalse] ; gh2 = DrawHistogram[h2, pr, nS, AxesFalse] ; Show[GraphicsArray[{gh1, gh2}], yS, imSize] ;

[Graphics:../HTMLFiles/index_29.gif]

New classification of input space

gdnoFrame = Show[gd, FrameFalse, nS] ; gclass = DrawHistogramClass[{h1, h2}, {class1Color, class2Color}, nS] ; Show[GraphicsArray[{gdnoFrame, gclass}], yS, imSize] ;

[Graphics:../HTMLFiles/index_31.gif]


Created by Mathematica  (October 9, 2003)