2d mixture-of-Gaussians one-class 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_26.gif]

EM experiment #1: object 1 (Kellogs car)

Extract 2d data

RowBox[{RowBox[{d2d1, =, RowBox[{(, RowBox[{{#[[which[[1]]]], #[[which[[2]]]]} &, /@,  , RowBox[{(, RowBox[{data1, /, 255.}], )}]}], )}]}], ;}]

Choose number of Gaussians in mixture model

k = 4 ;

Assumes full covariance matrices

initFull = EMInitializationFull[d2d1, k] ;

Compute EM algorithm

RowBox[{Timing, [, RowBox[{RowBox[{em,  , =,  , RowBox[{EM, [, RowBox[{d2d1, ,, initFull, ,, 0.001}], ]}]}], ;}], ]}]

RowBox[{{, RowBox[{RowBox[{2.38,  , Second}], ,, Null}], }}]

Save solution

model1 = em // Last ;

Final model

EMAllPlot[model1, g1] ;

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

One-class image classification for different thresholds (0.5 to 5.0)

RowBox[{RowBox[{thresholdList, =, RowBox[{{, RowBox[{.5, ,, 1., ,, 1.5, ,, 2., ,, 2.5, ,, 3.,  ...  ; Show[GraphicsArray[{{obj1, #[[1]]}, {obj2, #[[2]]}}], ImageSize400] & /@ results ;

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

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

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

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

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

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

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

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

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

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

Error plot for different threshold (0.5 to 5.0)

OneClassError[#[[1]], #[[2]]] &/@results ;

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

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

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

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

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

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

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

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

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

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


Created by Mathematica  (October 9, 2003)