I'm have to create a neural network concerning a work about Milling process, I have my inputs and outputs (cutting speed, cutting force, depth of cut, feed rate and surace roughness) but I have no idea what to put in Target ??
If you can help me please...
The target, t, is the desired output for the given input x.
Train with x and t.
The output of the resulting design, given the input x, is y.
The error is e = t-y.
The most common goal of training is to minimize the
mean-squared-error.
What software are you using?
Is there a manual with examples?
Hope this helps.
Greg
Yes
doc newff
help newff
size(p) = [nvarin nobs]
size(t) = [nvarout nobs]
XOR example
p = [ 0 1 1 0; 0 0 1 1]; t = [ 1 0 1 0 ];
I'm using Matlab 6.1. I tried the tutorial but it doesn't work... :s
It didn't work because .. Oh! You didn't explain what you did!
Greg
In matlab I enter " nntool" to get the Data Manager box, then I import my inputs:
Cutting speed: [600.04 600.04 600.04 750.06 750.06]
Feed rate: [229.2 229.2 229.2 286.5 286.5]
Depth of cut: [3 6 10 3 6]
and my targets:
Surface roughness: [0.274 0.718 0.472 0.296 0.276]
Cutting force: [12 38 38 14 26]
Then I create a new network, I clcik on train, I have to select my inputs and targets but I can just select one for each ( ??), finally I click on "Train network" and I have this:
"error using => network/train imputs are incorrectly sized for network. Matrices must all have 2 rows."
The basic problem is that you are not intimate with your date
(... sorry, I meant data!).
Go to comp.soft-sys.matlab in Google Groups and
search for my post on pre training advice for newbies.
"greg heath" pre training advice
p = [600.04 600.04 600.04 750.06 750.06;...
229.2 229.2 229.2 286.5 286.5;...
3 6 10 3 6]
t = [0.274 0.718 0.472 0.296 0.276;...
12 38 38 14 26]
Check the size, rank and condition numbers of p and t.
If cond(p) is too large a subset of inputs is highly
correlated and dimensionality reduction may be necessary.
Although plots of tj vs pi may add to your understanding,
I recommend first checking the all variable correlation
coefficient matrix
q = [p;t];
Cqq = corrcoef(q')
and plotting the standardized variables
help zscore
Do you see anything significant?
Before designing the NN investigate the
performance of the constant model
y00 = repmat(mean(t,2),1,N)
...
MSE00 = ... % Mean-squared-error
and the linear model
W = t/[ones(1,N);p]
y0 = W*[ones(1,N);p]
...
MSE0 = ...
NMSE0 = MSE0/MSE00 % Normalized MSE
R20 = 1-NMSE0 % R-squared statistic
R0 = sqrt(R20) % Regression correlation coefficent
Do the values in W reveal anything important?
How does R0 compare with the
input/output correlation coefficients
in the last two rows of Cqq?
The knowledge obtained from above should
help in diagnosing your problem.
Hope this helps.
Greg
Each input must have a output. Using this input-output pair a network is supposed to learn.
If you have 3 inputs and 2 outputs then use 2 inputs (and respective 2 outputs) to train the network and use the remaining input in "sim" function after training the network. The output from "sim" function will be the simulated output for your 3rd input.
Is that clear? I think Greg may give you a better answer.
To train any of the supervised learning algorithms you have
to specify a target for each input training vector.
>Because I have 3 inputs and only 2 outputs... If I reduce at 2 inputs it works.
You are jumping to false conclusions because you did not follow
my advice.
Look at Cqq(1,2) and W(:,3)
What do those values mean?
> Each input must have a output. Using this input-output pair a network is supposed to learn.
> If you have 3 inputs and 2 outputs then use 2 inputs (and respective 2 outputs) to >train the network and use the remaining input in "sim" function after training the >network. The output from "sim" function will be the simulated output for your 3rd >input.
> Is that clear?
NO.
You are confusing output variable with output vector.
Validation and Test vectors are withheld from training;
not input variables.
Hope this helps.
Greg
Are you having difficulty in running the network or the results from the network doesn't make sense to you?
I tried this:
q = [p;t];
Cqq = corrcoef(q')
Cqq =
Columns 1 through 6
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
Columns 7 through 12
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
Columns 13 through 18
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
-1.0000 -1.0000 -1.0000 -1.0000 -1.0000 -1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
Columns 19 through 20
-1.0000 -1.0000
-1.0000 -1.0000
-1.0000 -1.0000
-1.0000 -1.0000
-1.0000 -1.0000
-1.0000 -1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
1.0000 1.0000
And then: y00 = repmat(mean(t,2),1,N) :
y00 =
6.1370
19.3590
19.2360
7.2360
13.1480
23.3800
12.6580
25.6910
42.6890
18.1550
Do this results make sense or not at all ?
No.
>> p = [600.04 600.04 600.04 750.06 750.06;...
229.2 229.2 229.2 286.5 286.5;...
3 6 10 3 6] ;
t = [0.274 0.718 0.472 0.296 0.276;...
12 38 38 14 26] ;
q = [p;t];
Cqq = corrcoef(q')
Cqq =
1 1 -0.34855 -0.57496 -0.40825
1 1 -0.34855 -0.57496 -0.40825
-0.34855 -0.34855 1 0.44752 0.86763
-0.57496 -0.57496 0.44752 1 0.79955
-0.40825 -0.40825 0.86763 0.79955 1
%%%%%%%%%%%%%
>> N = size(t,2)
y00 = repmat(mean(t,2),1,N)
N = 5
y00 =
0.4072 0.4072 0.4072 0.4072 0.4072
25.6 25.6 25.6 25.6 25.6
Hope this helps.
Greg
For nonlarge data files I create and debug programs by
typing or pasting the data into the assignment statements
of the *.m file. Then I click on the debug button.
Otherwise I use the LOAD command. Type
help load
Hope this helps.
Greg
P.S. Do you have a MATLAB manual?
hi Greg, I am trying to do some image classification on a feedforward neural net but have little idea of how to do it using the matlab nueral net.
i have a set of image 10x10 pixels (black and white binary image) that i want to give to a NN to output a vector target of [0 0 0 0 0 1 0 0 0 0 0]. The "1" may shift in position depending on the image given to the NN.
Can u please tell me how to apply this?
Thanks.