Gaussian fitting of ALVINN output

This notebook illustrates how the Gaussian fitting approach that is used in ALVINN is very robust to noisy neural network outputs.

Definitions

Simulation parameters

Simulated NN error

RowBox[{RowBox[{noise,  , =, 0.3}], ;}]

Sample steering direction

RowBox[{RowBox[{steering,  , =,  , 0.5}], ;}]

Width of Gaussian function

RowBox[{RowBox[{width,  , =,  , 0.2}], ;}]

Gaussian fitting

Plot idealized output of ALVINN

gActual = Plot[f[x, steering, width], {x, -1, 1}, FrameTrue, PlotRangeAll, GridLines {{0, steering}, None}, AxesNone, PlotStyle {RGBColor[1, 0, 1]}] ;

[Graphics:HTMLFiles/index_8.gif]

Idealized training data

data = Table[{x, f[x, steering, width]}, {x, -1, 1, 2/29}] // N // Chop ; gTraining = Show[Graphics[{RGBColor[1, 0, 1], PointSize[.02], Point[#]} & /@ data], FrameTrue] ;

[Graphics:HTMLFiles/index_10.gif]

Simulated NN output

RowBox[{RowBox[{nn,  , =,  , RowBox[{RowBox[{RowBox[{{, RowBox[{#[[1]], ,, RowBox[{Max, [, Row ...  = Show[Graphics[{RGBColor[1, 0, 0], PointSize[.02], Point[#]} & /@ nn], FrameTrue] ;

[Graphics:HTMLFiles/index_12.gif]

gOut1 = Show[gTraining, gNN] ;

[Graphics:HTMLFiles/index_14.gif]

Best Gaussian fit

Function to optimize

tmp1 = {f[#[[1]], μ, width], #[[2]]} & /@ nn ; tmp2 = ((#[[1]] - #[[2]])^2) & /@ tmp1 ; err = Plus @@ tmp2

RowBox[{RowBox[{, ^, RowBox[{(, RowBox[{RowBox[{-, 50.}],  , RowBox[{RowBox[{(, RowBox ... owBox[{(, RowBox[{RowBox[{0.931034, }], -, μ}], )}], ^, 2}]}], )}]}]}], )}], ^, 2}]}]

Plot optimization function

gOut2 = Plot[err, {μ, -1, 1}, FrameTrue, PlotRangeAll, AxesFalse, GridLines {{0, steering}, None}] ;

[Graphics:HTMLFiles/index_18.gif]

Find minimum of optimization function

bestFit = μ /. FindMinimum[err, {μ, steering}][[2]]

0.555351

Plot resulting steering hypothesis

gBestFit = Plot[f[x, bestFit, width], {x, -1, 1}, FrameTrue, PlotRangeAll, GridLines {{0, steering}, None}, AxesNone, PlotStyle {RGBColor[1, 0, 0]}] ;

[Graphics:HTMLFiles/index_22.gif]

gOut3 = Show[gActual, gBestFit] ;

[Graphics:HTMLFiles/index_24.gif]

Summary of results

Show[gOut2] ; Show[gOut1, gOut3, PlotRangeAll] ;

[Graphics:HTMLFiles/index_26.gif]

[Graphics:HTMLFiles/index_27.gif]


Created by Mathematica  (September 29, 2003)