Neural network prediction

Embed Size (px)

Citation preview

  • 8/10/2019 Neural network prediction

    1/54

  • 8/10/2019 Neural network prediction

    2/54

    we get the profile plot - which is really a one dimensional cross section of the high dimensionalIn the Profile sheet you can specify which predictor to vary and the values at which the other preClick Create Profile button to generate the profile.If the predictor you choose to vary is categorical then the other info ( #points to be generated, stwill be ignored and the graph will show you the predicted response for each category of the predi

    Profile plot lets you study the following things:

    (1) Nature of relationship bettween a particular predictor X and the response Y( E.g. Y increases as X increases OR Y decreases as X increasesOR the relationship is non-linear - Y first increases and then decreases with X etc et(2) Profile plots also lets you study the interaction between predictors .Suppose there are two predictors X and Z and we are studying the profile of Y as XSuppose we look at the profile by keeping Z fixed at 1 and varying X between -10 anNow keep Z fixed at 2 instead of 1 and vary X between -10 and 10.If the shape of the profiles in these two scenarios are drastically different(e.g. one is increasing and the other is decreasing) then that says thay X and Z has i

    In other words, the effect of X on the Response is not same at all levels of ZTo study the effect of X, it matters where Z is set.

    A few more points Initial weightsFor the training of the model, we need to start with an initial set of values of the network weights.By default, the weights are initialized with random values between -w and w .where w is a number between 0 and 1 , specified by you in the UserInput page.(A) Once you build a model, the final weights are stored in Calc page.Next time you want to train a model with same architecture and same data,the application will ask you whether to start with the weights already saved in Calc sheet.If you say YES , these wights are used. If you say NO , the weights are re-initialized with random(B) Instead of starting with ramdom weights, you may want to start with our own choice of weighSpecifying your choice of starting weights is a bit non-trivial for this application. Here is how you

    Specify the inputs in the UserInput page and specify the number of training cycle asThis will just setup the Calc page without doing any training.Now go to Calc sheet and write down your choice of weights in the appropriate place

    Now come back to UserInput sheet and specify the number of trining cycles you want and click oWhen the application asks whether to use the already saved weights, click on the YES button.Now your network will be trained with the starting weights specified by you.

  • 8/10/2019 Neural network prediction

    3/54

  • 8/10/2019 Neural network prediction

    4/54

    # Missing Val

    Minus variables. Max

    Average

    iables, sdas output. Intercept

    Slope

    d in UserInput sheet.

    value

    ated as the same category

    he following -

    dation set

    ecified values

  • 8/10/2019 Neural network prediction

    5/54

    urface.ictors should be held fixed.

    rt and end values)ctor you have chosen to vary.

    .

    aries10.

    nteraction.

    values.s.o it..

    of the weight matrices.n the Buil Model button.

  • 8/10/2019 Neural network prediction

    6/54

  • 8/10/2019 Neural network prediction

    7/54

    Cont. Var. Cat. Var. Values Dummy

    ue #Levels

    Lables

  • 8/10/2019 Neural network prediction

    8/54

  • 8/10/2019 Neural network prediction

    9/54

  • 8/10/2019 Neural network prediction

    10/54

  • 8/10/2019 Neural network prediction

    11/54

  • 8/10/2019 Neural network prediction

    12/54

    Network

    Number of

    Number of

    Learning p

    Momentum

    TrainingTotal #row

    Present Inp

    From very last cycle 1 2 Save NetwWith least Training Error 2

    With least Validation Error 3 1 Training /

    Partition data into Training / Validation set 1 If you wantUse whole data as training set 2

    Please fill u

    Save mod

  • 8/10/2019 Neural network prediction

    13/54

  • 8/10/2019 Neural network prediction

    14/54

    10 ) 1

    Hidden 1 Hidden 2

    2 20.5

    00 ) 50

    ) Sequential

    10% of data as Validation set (between 1% and 50%)5 rows of the data as validation set

  • 8/10/2019 Neural network prediction

    15/54

    Enter your Data in this sheetIns t ruc t ions : Start Entering your data from cell AC105 .

    Make sure that the row 104 is blank.Specify variable type in row 102.

    Cont - for continuous Input,Cat - for Categorical Input,Output -for Output var.Omit - if you don't want to usethe variable in the model

    For each continuous Input, there will be 1 neuron in Input Layer.For Each categorical Input with K levels, there will be K neurons in Input Layer Please make sure that there are no more than 50 neurons in Input Layer.There should be at most 10 Output variables - application will treat them all as ContThere should be no more than 40 Categorical Input Variables.

    Var Type Cont Omit Output Cont

    Var Name Cylinder Car MPG Weight8 Buick Estate Wagon 16.9 4.368 Ford Country Squire 15.5 4.0548 Chevy Malibu Wagon 18.5 3.6058 Chrysler Lebaron Wagon 30 3.944 Chevette 27.5 2.1554 Toyota Corona 27.2 2.564 Datsun 510 30.9 2.34 Dodge Omni 20.3 2.235 Audi 5000 20.3 2.836 Volvo 240 GL 17 3.144 Saab 99 GLE 21.6 2.7956 Peugeot 694 SL 16.2 3.416 Buick Century Special 20.6 3.386 Mercury Zephyr 20.8 3.076 Dodge Aspen 18.6 3.626 AMC Concord D/L 18.1 3.418 Chevy Caprice Classic 17 3.848 Ford LTD 17.6 3.7258 Mercury Grand Marquise 16.5 3.9558 Dodge St Regis 18.2 3.834 Ford Mustang 4 26.5 2.5856 Ford Mustang Ghia 21.9 2.91

    4 Mazda GLC 34.1 1.9754 Dodge Colt 35.1 1.9154 AMC Spirit 27.4 2.674 VW Scirocco 31.5 1.994 Honda Accord LX 29.5 2.1354 Buick Skylark 28.4 2.676 Chevy Citation 28.8 2.5956 Olds Omega 26.8 2.74 Pontiac Phoenix 33.5 2.556

  • 8/10/2019 Neural network prediction

    16/54

    4 Plymouth Horizon 34.2 2.24 Datsun 210 31.8 2.024 Fiat Strada 37.3 2.134 VW Dasher 30.5 2.196 Datsun 810 22 2.8154 BMW 320i 21.5 2.64 VW Rabbit 31.9 1.925

  • 8/10/2019 Neural network prediction

    17/54

    Specify variable name in row 103.

    inuous.

    Cont Cont Cont Cat Omit

    Drive_Ratio Horsepower Displacement Country2.73 155 350 US2.26 142 351 US2.56 125 267 US2.45 150 360 US

    3.7 68 98 US3.05 95 134 Japan3.54 97 119 Japan3.37 75 105 US

    3.9 103 131 Europe3.5 125 163 Europe

    3.77 115 121 Europe3.58 133 163 Europe2.73 105 231 US3.08 85 200 US2.71 110 225 US2.73 120 258 US2.41 130 305 US2.26 129 302 US2.26 138 351 US2.45 135 318 US3.08 88 140 US3.08 109 171 US

    3.73 65 86 Japan2.97 80 98 Japan3.08 80 121 US3.78 71 89 Europe3.05 68 98 Japan2.53 90 151 US2.69 115 173 US2.84 115 173 US2.69 90 151 US

  • 8/10/2019 Neural network prediction

    18/54

    3.37 70 105 US3.7 65 85 Japan3.1 69 91 Europe3.7 78 97 Europe3.7 97 146 Japan

    3.64 110 121 Europe3.78 71 89 Europe

  • 8/10/2019 Neural network prediction

    19/54

    Omit Omit Omit Omit Omit

  • 8/10/2019 Neural network prediction

    20/54

  • 8/10/2019 Neural network prediction

    21/54

    Omit Omit Omit Omit Omit

    X18 X19

  • 8/10/2019 Neural network prediction

    22/54

  • 8/10/2019 Neural network prediction

    23/54

    Omit Omit Omit Omit Omit

    X20 X21 X22 X23 X24

  • 8/10/2019 Neural network prediction

    24/54

  • 8/10/2019 Neural network prediction

    25/54

  • 8/10/2019 Neural network prediction

    26/54

  • 8/10/2019 Neural network prediction

    27/54

    Omit Omit Omit Omit Omit

    X30 X31 X32 X33 X34

  • 8/10/2019 Neural network prediction

    28/54

  • 8/10/2019 Neural network prediction

    29/54

    Omit Omit Omit Omit Omit

    X35 X36 X37 X38 X39

  • 8/10/2019 Neural network prediction

    30/54

  • 8/10/2019 Neural network prediction

    31/54

  • 8/10/2019 Neural network prediction

    32/54

  • 8/10/2019 Neural network prediction

    33/54

    Omit Omit Omit Omit Omit

    X45 X46 X47 X48 X49

  • 8/10/2019 Neural network prediction

    34/54

  • 8/10/2019 Neural network prediction

    35/54

    Omit Omit Omit Omit Omit

    X50 X51 X52 X53 X54

  • 8/10/2019 Neural network prediction

    36/54

  • 8/10/2019 Neural network prediction

    37/54

    Omit Omit Omit Omit Omit

    X55 X56 X57 X58 X59

  • 8/10/2019 Neural network prediction

    38/54

  • 8/10/2019 Neural network prediction

    39/54

    Omit

    X60

  • 8/10/2019 Neural network prediction

    40/54

    Neural Network Mod el fo r Pred ic t ion Created On : 14-Aug-02

    MSE(Training) 13.717 MSE(Validation) 6.6302

    Number of Hidden Layers 1Layer Sizes 8 2 0 1

    True Output (if available) RMSE #VALUE!Model (Predicted) Output 20.8014

    ABS( (Tru - Predicted) / Tru ) #DIV/0!Cont Cont Cont

    Bias Cylinder Weight Drive_Ratio

    Raw Input 1 7.9600 2.8629 3.0934

    Bias Cylinder Weight Drive_Ratio

    Transformed Input 1 0.9900 0.3877 0.5082Hdn1_bias 0.0000 0.0000 0.0000 0.0000Hdn1_Nrn1 0.2943 -1.1508 -0.9277 -0.4073

    Hdn1_Nrn2 0.9926 -1.1561 -1.5765 -0.51391.0000 0.0774 0.2088Op_bias 0.0000 0.0000 0.0000 0.0000Op_Nrn1 -1.8890 2.2201 2.7873 -1.1353

    1.0000 0.2432

    Category TableCountry

    31 us2 japan3 europe

  • 8/10/2019 Neural network prediction

    41/54

    ARE #DIV/0!

    Cont Cont Catorsepowe isplaceme Country

    101.7368 177.2895 us

    Horsepower Displacemen

    t Country.usCountry.japa

    n Country.europe

    0.4082 0.3356 1.0000 0.0000 0.0000

    0.0000 0.0000 0.0000 0.0000 0.0000 0.0000

    -1.0479 -0.8085 -0.3676 0.7118 0.1508 -2.4783

    -0.9123 -0.8300 0.3429 0.0155 -0.0342 -1.3324

  • 8/10/2019 Neural network prediction

    42/54

  • 8/10/2019 Neural network prediction

    43/54

  • 8/10/2019 Neural network prediction

    44/54

  • 8/10/2019 Neural network prediction

    45/54

  • 8/10/2019 Neural network prediction

    46/54

    50

  • 8/10/2019 Neural network prediction

    47/54

  • 8/10/2019 Neural network prediction

    48/54

    Epoch MSE (Original Scale) ARE (%) MSE (Original Scale) ARE (%)1 16.452 14.33% 16.826 19.74%2 16.349 14.25% 16.653 19.63%3 16.245 14.15% 16.326 19.41%4 16.144 14.05% 15.959 19.17%5 16.048 13.96% 15.588 18.92%6 15.957 13.87% 15.221 18.68%7 15.870 13.78% 14.862 18.44%8 15.787 13.70% 14.512 18.21%9 15.707 13.62% 14.171 17.98%

    10 15.631 13.54% 13.839 17.75%11 15.558 13.47% 13.518 17.53%12 15.487 13.40% 13.205 17.32%13 15.419 13.34% 12.903 17.11%14 15.353 13.27% 12.610 16.90%15 15.289 13.21% 12.326 16.70%16 15.227 13.15% 12.052 16.50%17 15.167 13.09% 11.787 16.31%18 15.108 13.04% 11.531 16.12%19 15.051 12.98% 11.283 15.94%20 14.996 12.93% 11.044 15.76%21 14.942 12.88% 10.813 15.59%22 14.889 12.83% 10.590 15.42%23 14.837 12.78% 10.375 15.25%

    24 14.786 12.74% 10.167 15.09%25 14.737 12.69% 9.967 14.93%26 14.688 12.65% 9.773 14.78%27 14.641 12.60% 9.586 14.63%28 14.594 12.56% 9.405 14.48%29 14.548 12.52% 9.231 14.34%30 14.503 12.48% 9.063 14.20%31 14.458 12.44% 8.900 14.06%32 14.414 12.40% 8.743 13.92%33 14.371 12.36% 8.591 13.79%34 14.329 12.33% 8.444 13.67%35 14.287 12.29% 8.302 13.54%36 14.246 12.26% 8.164 13.42%37 14.205 12.22% 8.031 13.30%38 14.165 12.19% 7.903 13.19%39 14.125 12.15% 7.778 13.07%40 14.086 12.12% 7.657 12.96%41 14.047 12.09% 7.540 12.85%42 14.009 12.06% 7.427 12.74%43 13.971 12.03% 7.317 12.64%44 13.934 11.99% 7.210 12.54%

    Avg. error per Input (OriginalScale)

    (Training Set)

    Avg. error per Input (OriginalScale)

    (Validation Set)

    13.500

    14.000

    14.500

    15.000

    15.500

    16.000

    16.500

    17.000

    0

    0.0002.0004.0006.0008.000

    10.00012.00014.00016.00018.000

    0

  • 8/10/2019 Neural network prediction

    49/54

    45 13.897 11.96% 7.106 12.44%46 13.860 11.93% 7.005 12.34%47 13.824 11.91% 6.908 12.24%48 13.788 11.88% 6.812 12.15%49 13.753 11.85% 6.720 12.06%50 13.717 11.82% 6.630 11.96%

  • 8/10/2019 Neural network prediction

    50/54

    10 20 30 40 50 60

    Epoch

    MSE (Training)

    10 20 30 40 50 60

    Epoch

    MSE (Validation)

  • 8/10/2019 Neural network prediction

    51/54

    Profile plot for the fitt

    Generate prGenerateby varyingkeeping the

    Outputs Predictors Cylinder Predicted MPGMPG Cylinder 4 25.50382

    Weight 4.04 25.43797Drive_Ratio 4.08 25.37239 Predictor Cylinder Horsepower 4.12 25.3071 Fixed Value 5.395Displacement 4.16 25.24209 Min / Max in Original Data (fCountry 4.2 25.17737 Min 4.00

    4.24 25.11295 Max 8.004.28 25.048844.32 24.985034.36 24.92155

    4.4 24.85838

    4.44 24.795554.48 24.733054.52 24.670884.56 24.60906

    4.6 24.547594.64 24.486474.68 24.425714.72 24.365314.76 24.30528

    4.8 24.245624.84 24.186334.88 24.127414.92 24.068884.96 24.01074

    5 23.95298 Category Table5.04 23.89561 Country5.08 23.83864 35.12 23.78206 us5.16 23.72588 japan

    5.2 23.6701 europe5.24 23.614725.28 23.559755.32 23.505195.36 23.45104

    5.4 23.39735.44 23.343975.48 23.291055.52 23.238555.56 23.18647

    5.6 23.13485.64 23.083555.68 23.032725.72 22.982315.76 22.93231

    0

    5

    10

    15

    20

    25

    30

    0 1 2

  • 8/10/2019 Neural network prediction

    52/54

    5.8 22.882745.84 22.833595.88 22.784865.92 22.736555.96 22.68866

    6 22.64118

    6.04 22.594136.08 22.54756.12 22.501286.16 22.45549

    6.2 22.410116.24 22.365146.28 22.320596.32 22.276466.36 22.23274

    6.4 22.189436.44 22.146536.48 22.10404

    6.52 22.061956.56 22.020286.6 21.979

    6.64 21.938136.68 21.897666.72 21.857596.76 21.81792

    6.8 21.778646.84 21.739766.88 21.701276.92 21.663176.96 21.62545

    7 21.588127.04 21.551177.08 21.514617.12 21.478427.16 21.44261

    7.2 21.407177.24 21.37217.28 21.33747.32 21.303067.36 21.26909

    7.4 21.235487.44 21.202237.48 21.16934

    7.52 21.13687.56 21.1046

    7.6 21.072767.64 21.041267.68 21.01017.72 20.979297.76 20.94881

    7.8 20.918667.84 20.88885

  • 8/10/2019 Neural network prediction

    53/54

    7.88 20.859367.92 20.83027.96 20.80136

  • 8/10/2019 Neural network prediction

    54/54

    d model

    ofile for MPG100 data points

    Cylinder between 4 and 8 other predictors fixed at the specified values

    Weight Drive_Ratio Horsepower Displacement Country

    2.863 3.093 101.737 177.289 us

    r user's reference only)1.91 2.26 65.00 85.004.36 3.90 155.00 360.00

    3 4 5 6 7 8 9

    Predicted MPG