Artificial Neural Network code for this dataset?

5 visualizaciones (últimos 30 días)
Debalina Pal
Debalina Pal el 31 de Mayo de 2018
Comentada: Debalina Pal el 1 de Jun. de 2018
can anyone send me the code for ANN which is applicable in this dataset?

Respuesta aceptada

Majid Farzaneh
Majid Farzaneh el 31 de Mayo de 2018
Hi, you can use something like this:
I=xlsread('forneuralnetworkdataset.xls');
inputs=I(:,1:3)';
targets=I(:,4)';
net=feedforwardnet(10);
net=train(net,inputs,targets);
  3 comentarios
Majid Farzaneh
Majid Farzaneh el 1 de Jun. de 2018
You're welcome. You have the trained net. Simply use the net as a function:
out=net([28;89;993])
or
test_data=I(1:10,1:3)';
outs=net(test_data);
Note that the output of a default feed-forward network is not integer. You can use round, ceil, floor or fix function to round the output.
out=round(net([28;89;993]))
Debalina Pal
Debalina Pal el 1 de Jun. de 2018
another question is that: I=xlsread('forneuralnetworkdataset.xlsx'); inputs=I(:,1:3)'; targets=I(:,4)'; net=feedforwardnet(10); net=train(net,inputs,targets); display(net); out=round(net([28;89;993])); display(out); In this above code I want to define a function and I want to pass this inputs as input arguments through this function.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by