How to create and train a perceptron

  • Permalink
  • submit to reddit
  • Email
  • Follow


Hy,
I've to create a perceptron and I tried with the followind code:

clc
clear all
close all
dati=xlsread('datilab5.xls','Sheet1','B2:AH2049');

p(1,:)=min(dati);
p(2,:)=max(dati);
p=p(:,1:32);
net=newp(p',32,'hardlim','learnp');
net.trainParam.epochs = 20;

P=dati(:,1:32);
T=dati(:,33);
net = train(net, P',T')


In the excel datasheet I've the data from the column 1 to 32 (these are 
the features) in 2048 rows and the check class for supervising in the 
column 33.

The fault is in the target matrix dimension but i donn't understand the 
problem source.
I read the newp help and S is the numeber neurons but this is for the 
number of input layer or number of output layer?
Thank you to everybody for suggests.
Bye


0
Reply sittinghorse (2) 12/2/2008 8:54:14 AM

See related articles to this posting

comp.soft-sys.matlab 202631 articles. 520 followers. Post

0 Replies
54 Views

Similar Articles

[PageSpeed] 17


Reply:

Similar Artilces:

sequence 3 tasks
Hello   i use a board 6023E and pc pentium4 3Ghz   My problem is how create a delay with few microseconds between two tasks?   I need creat three tasks. Fisrt create a finte pulse train for this i use a counter. Second create a delay for this i use again a conter to creat a pulse train in witch the delay is equal to frequency x number of pulses. Third measure pulses for this i use again a counter but in this case is a counter input. In attachment i send a picture with my program.   I dont understand why my program dont work? my program take a lote ...

Perceptron training question
Greetings, For an ANN course we got as homework to write code that trains a 2 inputs perceptron with AND/OR functions. I have seen in some books a simple algorithm that converges quickly (bipolar input and output, at each step correct weights for training inputs that don't produce the right result). However I had to implement a variation of this algorithm : binary input & output and at each step select a random training vector and adjust weights if the output is wrong. This worked too but now I have to improve this algorithm with a learning factor gamma and use this gamma and the sign...

create a perceptron in Matlab
Hy, I've to create a perceptron and I tried with the followind code: clc clear all close all dati=xlsread('datilab5.xls','Sheet1','B2:AH2049'); p(1,=min(dati); p(2,=max(dati); p=p(:,1:32); net=newp(p',32,'hardlim','learnp'); net.trainParam.epochs = 20; P=dati(:,1:32); T=dati(:,33); net = train(net, P',T') In the excel datasheet I've the data from the column 1 to 32 (these are the features) in 2048 rows and the check class for supervising in the column 33. The fault is in the target matrix dimension but i donn't understand ...

Creating/Calling NN Train Function
Hi all. I am creating a series of functions to implement a type of neural network. One of the functions is called to train the already created network. It is defined: function [best_net,best_tr]=AANN_train(net,Ptrain,Train,val,test,trials) .. .. .. Within that function, saved as an .m file called "AANN_train", is the call to the built-in neural network toolbox function "train": .. .. .. [net,tr] = train(net,Ptrain,Ttrain,[],[],val,test); .. .. .. But when I try to call my function AANN_train, I get an error message: [best_net,best_tr] = AANN_train(net,Ptrain,Trai...

Create a semi-random pulse train
Hi there! I'm trying to simulate a real-life situation for a Smart Grid system. I need to recognize a given pulse train in a transmission line and differentiate it from random pulses that also come at any given time in the line. The pulse train to be recognized is a simple 1:1 pulse train of say 5 pulses of same amplitude, 4 Ampere for example. I'm using the autocorrelation function to analyze the signal and see if the pulse trains distinctive triangle-shaped ACF is found. My problem right now is in the simulation of the random pulses that also come in the line, something li...

Can I create pulse train above 167s?
I need to generate pulse train with pulse width longer than 167.7 sec. using card 7030/6030E. Can anybody help me? Thanks The 167.7 sec limitation is caused by dividing 100 kHz by 2^24. So all you have to do is use two counters instead of one. Use the first counter to generate a pulse train slower than 100kHz and you can use the second counter to generate a very slow pulse train if you set its source to the out of the previous counter. You will have to use the pulse specs on the second counter, because it is going to be used to divide down the initial pulse train. I hope this helps. Jos...

Need some recomendations for creating training set.
Hello all. I am going to build a neural network for approximating a smooth continuous function. This function has values ranging from 0 to 100 (a percent of concentration). I have lots of training samples, where target concentration is 0% or 100% and much less trainig samples with intermediate concentration values. The amount of samples with target concentrations of 0% or 100% is about 9000-10000 times greater, than amount of samples with other target concentration values. For example, 10940 samples with target=0% 209 samples with target=1% .... 44 samples with target=12% .... 31 samples wit...

Suitable Training Algorithms for A Multilayer Perceptron Network
Hi, I am new to neural network. Recently, I have encountered a problem where I need to train a 2-nodes-hidden-layered MLP with 8 nodes on each layer and 5 input nodes and 2 output nodes. I have tried different parameters for Backpropagation algorithm and the best confusion matrix results I got is the following: a b <----classified as 30 17 a (true 0 245 b classes) The training data set contains 292 instances. I used the training data to test the network. I want to have 100% accuracy for my problem, because I want a perfect fit of the model to the data. Then I will extract ru...

creating one-off samples from full training set
Hii, I have a training dataset of size 1000*30 . I want it to train 10 different neural nets. Now I Do Not want to use the entire training dataset rather have different subsamples for each net. I am using probability measure to create such training samples. Example for net 1 I have probability of 0.60, implies each pattern of training set has 60 percent chance of being there in training sample of net 1, for net 2, prob = .5, implies 50% chances of each pattern being there in training sample of net 2. I do not how to implement this using NN toolbox. Kindly help me in doing so. Thanks ...

Seek recommendation, idea or solution for creating training manuals
We have a department that specializes in training our field staff. Employees of the department (our customer) maintain approximately 200 training manuals. Right now, for each manual they maintain separate documents: 1. The student guide (called the participant guide), AND 2. The instructor guide (called the facilitator guide) The facilitator guide includes all the content of the participant guide - but also announcements and question answers which appear on separate pages and in the margins. The page numbers of the facilitator guide and the participant guide are in sync. ...

QOM TPU Questions, creating pulse train for stepper motor
Hello, I am using the QOM TPU function to produce a pulse train for a stepper motor. Currently I am using the function in Loop mode, changing the offsets and loop count in order to change the motor speed during the interrupt that is generated when the loop finishes. This is limiting the speed of the motor because the ISR takes time and if I try to put out pulses too fast I get gaps in the pulse train while the ISR runs. I'm looking to have offset numbers in the order of 2 to 5 (two offsets to make a 50% duty cycle). My question is this : can the offsets be changed while ...

SAP Training,Training,Training.
Experienced and certified faculties in NJ, offer SAP BW (Business Information Warehouse), SAP CRM (Customer Relationship Management), SAP Net weaver Training, SAP ABAP, SAP Functional (FI/CO, HR, SD/MM). Resume preparation assistance. Rigorous training followed by regular tests, mock interviews. Limited enrollment in each batch. 24 hrs Lab access. DOL approved Institute. 2 month sap free access after training with online help. Classes over the weekends on Saturday and Sunday Placement assistance provided, we have lots of Open positions with our clients, Training fee:4000$(80 h...

Noob: Creating (create)
I'm playing with win32forth, trying to figure out how I could make the word (create) which would work inside a colon definition. So I could do: : makeit (create) foo 1 cell allot ; I'm figuring that (create) must be an immediate word - the problem is how to look ahead to get the foo. What's the answer? Mark Carter wrote: > I'm playing with win32forth, trying to figure out how I could make the > word (create) which would work inside a colon definition. So I could do: > : makeit (create) foo 1 cell allot ; > > I'm figuring that (create) must be an immedi...

Best PHP Training | PHP Development Training | PHP Training Institute
Tops Technologies provides php and mysql certification courses in ahmedabad, baroda, surat, Rajkot, Udaipur, Gujarat, india.PHP Training with MySQL is an introductory course in the PHP and MySQL technology. Mysql and php training course, php for beginners, sql training courses, PHP Training courses, php courses, mysql training courses, php mysql course. For More Details :- http://www.tops-int.com ...

.Net Online Training | Online .Net Training | Training .Net Online
..Net Online Training Worldwide providing by Sun IT labs is the most efficie= nt leading Online Training Institute in the world. We are not giving advert= isement we just giving genuine information. Because we have highly dedicate= d and Experienced IT professionals for our Student requirements and needs. = Definitely you will satisfy with our Online Training services just try it o= nce then you will know about our services. Please call us for the Demo Classes we have regular batches and weekend bat= ches. Contact Number : India :+91 9030328000, Email : sunitlabs@gmail.com, W...

Qlikview Online Training | Online Qlikview Training | Training Qlikview Online
Qlikview Online Training Worldwide providing by Sun IT labs is the most eff= icient leading Online Training Institute in the world. We are not giving ad= vertisement we just giving genuine information. Because we have highly dedi= cated and Experienced IT professionals for our Student requirements and nee= ds. Definitely you will satisfy with our Online Training services just try = it once then you will know about our services. Please call us for the Demo Classes we have regular batches and weekend bat= ches. Contact Number : India :+91 9030328000 , Email : sunitlabs@gmail.com ,...

Qlikview Online Training | Online Qlikview Training | Training Qlikview Online
Qlikview Online Training Worldwide providing by Sun IT labs is the most eff= icient leading Online Training Institute in the world. We are not giving ad= vertisement we just giving genuine information. Because we have highly dedi= cated and Experienced IT professionals for our Student requirements and nee= ds. Definitely you will satisfy with our Online Training services just try = it once then you will know about our services. Please call us for the Demo Classes we have regular batches and weekend bat= ches. Contact Number : India :+91 9030328000 , Email : sunitlabs@gmail.com ,...

Qlikview Online Training | Online Qlikview Training | Training Qlikview Online
Qlikview Online Training Worldwide providing by Sun IT labs is the most eff= icient leading Online Training Institute in the world. We are not giving ad= vertisement we just giving genuine information. Because we have highly dedi= cated and Experienced IT professionals for our Student requirements and nee= ds. Definitely you will satisfy with our Online Training services just try = it once then you will know about our services. Please call us for the Demo Classes we have regular batches and weekend bat= ches. Contact Number : India :+91 9030328000 , Email : sunitlabs@gmail.com ,...

MSBI Online Training | Online MSBI Training | Training MSBI Online
Tekson IT Services offers MSBI Online Training. Our MSBI trainers are highl= y talented and well experienced trainers. Our MSBI online training is one o= f the best online training in India.All our students were happy with our on= line training and able to find Jobs quickly in USA, UK, Singapore, Japan, a= nd Europe. Online training is your one stop solution to learn MSBI at your = home with flexible schedules. MSBI Online Training Course Content *Modeling source schemas--stars and snowflakes *Understanding dimensional modeling-- Dimensions (Type 1, 2, or 3) or rapid= ly changing ...

Loadrunner Online Training | Online Loadrunner Training | Training Loadrunner Online
SUN IT Labs is the best leading Online Training Institute in the World we a= re providing Loadrunner Online Training with efficient Loadrunner professio= nal trainers. Every one says this about their Institutes but they many not = reach your expectation because they have not efficient resources like profe= ssional trainers and materials related to the course. We have more than 10 = years experienced professional Loadrunner trainers and we are also providin= g complete material that covers each and every topic related to Loadrunner.= We have completed more than 200 Loadrunner batches thr...

Loadrunner Online Training | Online Loadrunner Training | Training Loadrunner Online
SUN IT Labs is the best leading Online Training Institute in the World we a= re providing Loadrunner Online Training with efficient Loadrunner professio= nal trainers. Every one says this about their Institutes but they many not = reach your expectation because they have not efficient resources like profe= ssional trainers and materials related to the course. We have more than 10 = years experienced professional Loadrunner trainers and we are also providin= g complete material that covers each and every topic related to Loadrunner.= We have completed more than 200 Loadrunner batches thr...

Sharepoint Online Training | Online Sharepoint Training | Training Sharepoint Online
SUN IT Labs is the best leading Online Training Institute in the World we a= re providing Sharepoint Online Training with efficient Sharepoint professio= nal trainers. Every one says this about their Institutes but they many not = reach your expectation because they have not efficient resources like profe= ssional trainers and materials related to the course. We have more than 10 = years experienced professional Sharepoint trainers and we are also providin= g complete material that covers each and every topic related to Sharepoint.= We have completed more than 200 Sharepoint batches thr...

Datastage Online Training | Online Datastage Training | Training Datastage Online
Datastage Online Training by Biginfosys is the best opportunity for student= s. Datastage is one of the most in demand data analysis module. Datastage O= nline Training is mostly preferred by on job professionals because they can= do the course from their home, irrespective of where they are located, and= at their flexi time. All our faculty is dedicated so that we can complete = your course as per the schedule given we also also you to record the classe= s from your end so that you can refer the classes once again when ever is r= equired.We have completed more than 200 Datastage batc...

create tablespace creating a problem
Hi, I am using the following query to create a tablespace, but it is giving me an error, I thik it is becaue of the uniform size. Any6 help? CREATE TABLESPACE INDEX02 DATAFILE 'c:\oracle\product\10.2.0\oradata\INST1\INDEX02.dbf' SIZE 2M REUSE AUTOEXTEND ON NEXT 500K MAXSIZE 5M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 4K PERMANENT ONLINE; thanks. <mail2atulmehta@yahoo.com> a �crit dans le message de news: 1130774069.998681.285620@g49g2000cwa.googlegroups.com... | Hi, | | I am using the following query to create a tablespace, but it is giving ...