0% found this document useful (0 votes)
62 views7 pages

2 14 1

The document discusses training a neural network (net) on input data P to predict target values T. It defines the network with 2 layers and trains it over 10000 epochs with a learning rate of 0.01 and goal of 0.001. It then simulates the network on the inputs P and outputs a, the error e between predictions and targets, and the performance Perf, showing the network was trained successfully.

Uploaded by

yogi ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views7 pages

2 14 1

The document discusses training a neural network (net) on input data P to predict target values T. It defines the network with 2 layers and trains it over 10000 epochs with a learning rate of 0.01 and goal of 0.001. It then simulates the network on the inputs P and outputs a, the error e between predictions and targets, and the performance Perf, showing the network was trained successfully.

Uploaded by

yogi ahmad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Warning: MATLAB Toolbox Path Cache is out of date and is not being used.

Type 'help toolbox_path_cache' for more info

>> P = [0.26245 0.10000 0.26372 0.90000;

0.39466 0.18398 0.35531 0.85135]

T = [0.52306 0.14019 0.31301 0.82025]

P=

0.2625 0.1000 0.2637 0.9000

0.3947 0.1840 0.3553 0.8514

T=

0.5231 0.1402 0.3130 0.8203

>> net = newff(minmax(P),[14,1],{'tansig','purelin'},'traingd');

Warning: NEWFF used in an obsolete way.

> In obs_use at 18

In newff>create_network at 127

In newff at 102

See help for NEWFF to update calls to the new argument list.

>> net.lw{1,1};

net.b{1};

net.lw{2,1};

net.b{2};
net.trainParam.epochs = 10000;

net.trainParam.goal = 0.001;

net.trainParam.Lr = 0.01;

net.trainparam.show = 1000;

>> net = train(net,P,T)

net =

Neural Network

name: 'Custom Neural Network'

efficiency: .cacheDelayedInputs, .flattenTime,

.memoryReduction

userdata: (your custom info)

dimensions:

numInputs: 1

numLayers: 2

numOutputs: 1

numInputDelays: 0

numLayerDelays: 0

numFeedbackDelays: 0

numWeightElements: 57

sampleTime: 1

connections:
biasConnect: [1; 1]

inputConnect: [1; 0]

layerConnect: [0 0; 1 0]

outputConnect: [0 1]

subobjects:

inputs: {1x1 cell array of 1 input}

layers: {2x1 cell array of 2 layers}

outputs: {1x2 cell array of 1 output}

biases: {2x1 cell array of 2 biases}

inputWeights: {2x1 cell array of 1 weight}

layerWeights: {2x2 cell array of 1 weight}

functions:

adaptFcn: 'adaptwb'

adaptParam: (none)

derivFcn: 'defaultderiv'

divideFcn: (none)

divideParam: (none)

divideMode: 'sample'

initFcn: 'initlay'

performFcn: 'mse'

performParam: .regularization, .normalization, .squaredWeighting

plotFcns: {'plotperform', plottrainstate,


plotregression}

plotParams: {1x3 cell array of 3 params}

trainFcn: 'traingd'

trainParam: .showWindow, .showCommandLine, .show, .epochs,

.time, .goal, .min_grad, .max_fail, .lr

weight and bias values:

IW: {2x1 cell} containing 1 input weight matrix

LW: {2x2 cell} containing 1 layer weight matrix

b: {2x1 cell} containing 2 bias vectors

methods:

adapt: Learn while in continuous use

configure: Configure inputs & outputs

gensim: Generate Simulink model

init: Initialize weights & biases

perform: Calculate performance

sim: Evaluate network outputs given inputs

train: Train network with examples

view: View diagram

unconfigure: Unconfigure inputs & outputs

evaluate: outputs = net(inputs)

>> [a,Pf,Af,e,Perf] = sim(net, P,[],[],T)


a=

0.4802 0.1364 0.3593 0.8201

Pf =

[]

Af =

[]

e=

0.0429 0.0038 -0.0463 0.0002

Perf =

9.9972e-004
>>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy