2d Gaussian classification (RG plane)

Visualize distributions

which = {1, 2} ; gobj1 = PlotRepresentativeSample2D[data1, 2000, which, pointStyle1] ; gobj2 = ... meLabelNone, nS] ; gbase = Show[g1, g2, nS] ; Show[GraphicsArray[{g1, g2}], imSize, yS] ;

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

Gaussian models

Extract 2d data

d2d1 = ({#[[which[[1]]]], #[[which[[2]]]]} &/@ data1) ; d2d2 = ({#[[which[[1]]]], #[[which[[2]]]]} &/@ data2) ;

Compute pdfs

pdf1 = gaussian[d2d1, {x, y}] ; pdf2 = gaussian[d2d2, {x, y}] ;

Visualize pdfs

ShowTwoGaussianPDFs[pdf1, pdf2, pr, x, y, yS, imSize] ;

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

Classification in 2d

ShowTwoClassificationRegions[pdf1, pdf2, pr, x, y, classColors, gbase, AxesFalse, FrameTrue, FrameTicksFalse, yS] ;

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

Image classification

class1 = ClassifyImage2DAugmented[obj1, pdf1, pdf2, {Red, Green}] ; class2 = ClassifyImage2DAu ... pdf2, {Red, Green}] ; Show[GraphicsArray[{{obj1, class1, obj2, class2}}], ImageSize400] ;

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

class1 = ClassifyImage2DAugmented[obj1T, pdf1, pdf2, {Red, Green}] ; class2 = ClassifyImage2DA ... f2, {Red, Green}] ; Show[GraphicsArray[{{obj1T, class1, obj2T, class2}}], ImageSize400] ;

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

Error plot

cnt1 = CountPixels[class1] ; cnt2 = CountPixels[class2] ;

bar = {cnt1, cnt2} // Transpose ; BarChart[bar[[1]], bar[[2]], BarStyle {pointStyle1[[ ... #62371;FrameTrue, BarLabels {"Coke", "Coke Light"}, imSize] ;

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


Created by Mathematica  (October 9, 2003)