Hi,

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...

If I remember correctly, what you are referring to as outputs are actually the targets. The outputs are what your training set actually yields when run through the network.

An example (largely artificial) say you have a network that will add, so your inputs would look like:

[1 1 1 1;
 3 5 6 9]

Your target would look like this:

[4 6 7 10]   (1+3 = 4, 1+5 = 6)

Say the net is error prone when the second factor is even, so the output could be:

[4 5 9 10]

So in calculating the mean squared error (in reality this would depend on if you were training it by epoch or not) you would use the values

[4 6 7 10] and [4 5 9 10]

Thanks for your answer.

I think I'm a bit lost... :s If I understand I have to put all the ouputs in targets right ?

So I will have 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]

and then I do the simulation ?

Sorry if it's not clear but it's not clear for me either..

What type of network are you using? For something like the backprop you have a training set of vectors and an "ideal" set of results for them to train the system. So based on what you are saying for a vector

[600.4;
 229.2;
      3]

you'd expect and output of:
[0.274;
    12]

Then you run it and the system will adjust itself based on the error. Normally people split their data up into training and testing sets. The training you have the outputs of (your targets) and the testing you are seeking the output. Hopefully you have many more training data as sometimes it takes quite a bit to get a nice low error. There's a balance to be struck though because you don't want your net to overgeneralize either.

I tried again and when I click on "Train network" it doesn't work and I have this:

"error using => network/train imputs are incorrectly sized for network. Matrices must all have 2 rows." :(

All my data are in .txt files so I tried to put them in just one file for the inputs and one for the outputs but still doesn't work...

Check the number of inputs units you have set up. It's probably defaulted to 2. Which topology are you using?

hum sorry but I can't tell you what topology am I using... what are the different types ?? I want to create an artificial neural network with 2 layers that's all I know

By topology I meant like backpropagation (which is probably what you are using) or Learning Vector Quantization there are many others in the Matlab toolbox too. Luckily once the dreaded part of getting the data in is over you can move it between different ones. You'll have to decide the relationship between the layers (by 2 layers do you mean inputs right to an output layer or a hidden layer in between?). Try to figure out how to change the setting for the size of the input layer. I no longer have access to Matlab (and I haven't used the NN toolbox in quite a few years) so I'm afraid I can't give you anything more than the overall theory and what I remember.

(If you haven't already) You should definitely read the pdf that goes with the Neural Network toolbox, there's a ton of information there and a good bibliography. It's available over the internet too I believe.

Unfortunately training and using these things can be more of an artform than a science.

Yes I'm using backpropagation, but I think I might be wrong with my data... I wrote them in .txt files, for the inputs I have 3 columns and 2 for the outputs and it says
" All rows in the bracketed expression must have the same number of columns."

any ideas ? :s

What you are probably going to have to do is read your text file into the workspace using fscanf or using the import command on the file menu (versus importing them into the NN GUI) and manufacture the matrices at the prompt.
From your example:

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]

Take in cutting speed values into vector cs, take in feed rate to vector fr, take in depth of cut to dc. trainingmat = [cs;fr;dc]; (my syntax may be off but you get the idea)
Then, import trainingmat from the workspace into the NN GUI. Make sure you have the input units set to 3. Do the same thing with the
output data.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.