How to create and train a perceptron

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
12/2/2008 8:54:14 AM
comp.soft-sys.matlab 208532 articles. 8 followers. lunamoonmoon (258) is leader. Post Follow

0 Replies
131 Views

Similar Articles

[PageSpeed] 52
Reply:
Similar artilces about - How to create and train a perceptron:

Create/Exception then Destruct
Hi Folks, I have a question about the process of constructing and destructing objects when an exception happens in the constructor. the doc says: ----- When an exception is raised during creation of an object, Destroy is automatically called to dispose of the unfinished object. This means that Destroy must be prepared to dispose of partially constructed objects. Because a constructor sets the fields of a new object to zero or empty values before performing other actions, class-type and pointer-type fields in a partially constructed object are always nil. ----- Is that REALL...

Best HADOOP Online Training
SUN IT LABS Online Training offers HADOOP Online Training. Our trainers are= well experienced and highly talented in their Respective field. Our team t= rainer's expertise in each phase of the eLearning modules. Our online train= ing is one of the best online training in India For any technology. HADOOP = training online is your one stop solution to learn HADOOP at the comfort of= your home with flexible schedules.=20 Some of the HADOOP Course topics that covered by our professionals: 1.Problems with traditional large-scale systems. 2.Data Storage literature survey. 3.Data P...

creating objects type only known at runtime
This weekend I was playing around with some ruby and wanted to create objects whose types were only known at runtime. The method I wound up using was o = eval "#{class_name}.new" Is this a preferred method. I come from (mostly) a perl background, but also a Java background. To me this approach seems inelegant. Thanks for any input. Andy -- Andrew Libby Tangeis, LLC Innovative IT Management Solutions alibby@tangeis.com On 23/10/06, Andrew Libby <alibby@tangeis.com> wrote: > > This weekend I was playing around with some ruby and wanted > to create objects ...

Newbie in creating the fonts.
Hi. I'm a newbie of creating and editing fonts. Now I'm trying program: FontLab. It's great but All this concepts (terms, poperties) which's connected with fonts are a little incomprehensible. For example: glyphs, outlines, hints. Could You please to explain me what are these? Kind regards. -- pozdroovka. Zebik Glyphs are the individual letters. Outlines are just what it sounds like. When you draw a letter you do it just as you would with pen and paper by making the basic shape...the computer colours the inside of the shape when you use the font. Hints are what the ...

Re: Tracking what .sas file created a dataset? #3
You could add the source file to the dataset label... -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Scott D. Sent: Friday, January 12, 2007 1:33 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Tracking what .sas file created a dataset? Is there an automatic way to do know what file created a particular dataset? Say I create a dataset and store it in a library, and I later want to access this dataset but don't remember what .sas file created it. Of course I can grep *.sas, but I want to keep this information with the dataset. Any ideas here would ...

how to create virtual domain with webmin ?
Dear list, I had PLESK 7.5 on a remote server and I used to create domains with plesk . I could also access those domain from internet. Due to the lincese expiration I have discontinue with Plesk and installed webmin. So is it possible to create domain with webmin which can be accessed from internet ? thanks. ...

can not create directories like adump etc
I was trying to create a database instance using DBCA in 10G. After selecting all parameters, small window pops up and says cannot create adump directory. Do I have to create all these directory manually before I run DBCA or what. I am running dbca from oracle login account. It's pretty much giving the same error like cannot create some directories or some files for everything it's supposed to create atutomatically. I am able to create mannually all these directories but why DBCA can't create these automatically otherwise no point in creating database through DBCA. Am I ...

sequence 3 tasks
Hello &nbsp; i use a board 6023E and pc pentium4 3Ghz &nbsp; My problem is how create a delay with few microseconds between two tasks? &nbsp; 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. &nbsp; I dont understand&nbsp;why my program dont work? my program take a lote ...

Q: Create a console for a GUI app
Hi! I want to create a console for a GUI application. I am using AllocConsole, which also works as expected. But then I still cannot use printf etc to write to the console, even though the documentation for AllocConsole tells me "AllocConsole initializes standard input, standard output, and standard error handles for the new console.". So what am I missing? Thanks in advance! -- jb (replace y with x if you want to reply by e-mail) "cfx" <u.t.o@wanadoo.fr> wrote in message news:bf36o3$khl$1@news-sop.inria.fr... > "Jakob Bieling&quo...

How to Create an Uninstall?
Hi, How can I get Windows to recognize an installed app so the user can uninstall it through the Control Panel? I'm not using MSIE, InstallShield, or any other off the shelf product, but a home-brewed installation program written in VC++ 6.0. Thanks. xmp333@yahoo.com wrote: > How can I get Windows to recognize an installed app so the user can > uninstall it through the Control Panel? Rather that re-inventing the wheel, I suggest taking a look at the Inno Setup program: http://www.jrsoftware.org/isinfo.htm Not only is it a fantastic installer it ...

Training and Placement Opportunity In TABLEAU !!
Training and Placement Opportunity In TABLEAU !! This is a fantastic opportunity for energetic IT-Grads with little or no experience and for experienced Professionals (IT or Non-IT). Ideal Candidates should have experience or knowledge on the following skills. Any RDBMS, Data Warehouse Tools, Hadoop, Hive, Bigdata, SQL/PLSQL, Advanced Excel Skills, Any Reporting Tools, Shell Scripting & Java This opportunity will provide valuable career development and progression for someone who wants to enjoy an exciting career coupled with high income. Want to know more? Read on.......

Dragging text to create a file?
I thought that there was a way to drag text off of a document or web page and drop it on a finder window to create a file. Something is created by the finder, but it is not the kind of file I was anticipating. Is there some way to do this?? I am hoping for something like the OS/2 WPS Drag Text SOM Class that would just extend the Finder. Thanks in advance, -- John Holt John Holt <jdholt77_evomer@remove_earthlink.net> wrote: > I thought that there was a way to drag text off of a document or web > page and drop it on a finder window to create a file. Something is >...

Create Subsystem command
Hi, is there any way to perform an "pre create subsystem" funktion or script? Means clicking on the "Create Subsystem" Button first executes a script and then Draws the Subsystem. Or is there a commandline command that creates a subsystem from the selected blocks and lines? Thanks in advance Nils ...

Loadrunner Online Training in India | UK | USA | Canad
Sun IT Labs, one of the leading online training institute located in India.= We are providing best online training on Loadrunner Online Training. Becau= se we have highly dedicated and experienced IT professionals for our studen= t requirements and needs. Our Faculty from Top MNC's with highly skilled an= d certified domain expertise. So they are covered each and every topic rela= ted to Loadrunner. We also give interview support & Technical support after= completion of the Loadrunner course. Some of Loadrunner Covered by our professionals: * Introduction to LoadRunner *...

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

Tools for creating Draw files
For a work project I may need to find a way of drawing vector art in a turnkey, embedded system. Given that I'm going to have to write all this code myself, I'm rather attracted to the idea of using Acorn drawfiles as the file format --- they're simple, reasonably compact, and dead easy to parse. However, I still need some way of creating them. Does anyone know of any tools for converting, say, SVG to !Draw, or something similar? This is most likely going to have to run on a Unix-oid command line system, so I won't be able to use anything RISC OS-based, alas. -- David Given...

Best Online MANGO DB Training
SUN IT LABS is specialized in providing best online classes for online MANG= O DB training. Training classes are delivered by real time experienced trai= ners having more than 7 years experience. We provide affordable training on= MANGO DB with placements. Our online course covers huge topics from basic = to in-depth to work on real time projects with end to end solutions. Some of the MANGO DB Course topics that covered by our professionals: 1.Introduction. 2.What is MongoDB? 3.JSON primer. 4.CRUD. 5.When / why should you use MongoDB? 6.Installation and Administration. 7.Ins...

MySQL
The other day, for unfathomable reasons, I lost control over tables which I create. There was no concurrent change of anything on the machine, such as an update. So I have no suspect. Does the following action log suggest any recommendation to experienced SQL programmers? 1. A table: mysql> select * from expenses; +----+------------+-------+----------+--------+-------------+-------+ | id | date | place | stuff | amount | category | flags | +----+------------+-------+----------+--------+-------------+-------+ | 38 | 2013-01-15 | ATT | Sim card | 25.00 | Visa...

Re: How to automatically create a lot of lags? #6 1556226
Yiyu, Here is way to have your LAGS. Muthia Kachirayan. data a; do price = 1 to 100; output; end; run; data b(drop = m prv); do m = 1 to 100; set a; array v[100] lag1-lag100; if m = 1 then v[m] = .; else v[m] = prv; output; prv = price; end; run; proc print data = b ; run; On 9/14/06, Yiyu <shenyiyu@gmail.com> wrote: > > Hi, I have a dataset with a lot of observations with a single variable > called Price, and I want to create , for example, 100 additional > variables representing lag1 to lag 100, what's the si...

Can I use FTP to create a CSV File?
Hi all Using Client Access/Express I can download a file straight into csv format for Excel. It works really well but we have some customers that use BOS and I want one method of creating the csv file. The file itself is just text with all of the numeric fields treated as formulae. Using FTP is it possible to download the file straight to a pc as a ..csv? We don't have the IFS. Thanks, in advance, for any help Neil Newbie_Neil wrote: > Hi all > > Using Client Access/Express I can download a file straight into csv > format for Excel. It works really well but we have som...

Problem Trying to Create Procedure
I am a newbie, so this may be a simple question. I have a sql script called p_chp_proc.sql, which creates a procedure called p_chp: CREATE OR REPLACE PROCEDURE p_chp( encoded IN VARCHAR ) IS len int := length(encoded); i int; new_password varchar(30); BEGIN -- decode password for i IN 1..len loop new_password := substr(encoded, i*2, 1); end loop; -- change password EXECUTE IMMEDIATE 'ALTER USER db_audit IDENTIFIED BY ' || new_password; END p_chp; When I try and run the script I get the error "SP2-0042: unknown command "cr_p_chp" - rest of lin...

SELENIUM Online Training #5
SUN IT LABS is offering the best SELENIUM Online Training for fresher's and= software developers by excellent IT professors who have experience for abo= ve 10 years in SELENIUM. In SUN IT LABS this course is structured in such a= way so that students can easily learn and gain good knowledge in SELENIUM.= Students who are trained here will step out with complete knowledge in the= particular course they are trained. Some of the SELENIUM Course topics that covered by our professionals: 1.Introduction to Selenium. 2.What is Selenium? 3.Use of Selenium. 4.When Selenium can be ...

Re: Creating multiple datasets from one dataset based on value of #10
Ian, I agree that hash is very handy. But it requires SAS9.1. :-( On 11/14/06, Ian Whitlock <iw1junk@comcast.net> wrote: > Summary: Lex's SAS search tool > #iw-value=1 > > Mike, > > I used the search engine at > > http://www.lexjansen.com/sugi/ > > with the words "hash split" to find > > [PDF] 236-30: DATA Step Hash Objects as Programming ToolsFile > Format: PDF/Adobe Acrobat > Use this functionality to "extrude" input through hash object(s) > to split it in a number of SAS files with SAS-variable-. governed > ...

Creating a linear trend line in Excel
There has been some debate in COLA as to the correct way to create a linear trendline in Excel. Someone in the forum kindly made a video to show what he thought was the correct method http://tmp.gallopinginsanity.com/LinearTrendLineCreation.mov A couple of other people in the group say that the video skips a number of steps but when I look at the directions from Microsoft I do not see any they could be referring to. Does anyone see any missing steps for the creation of a linear trend line? I admit this is a bit over my head so any input would be welcome. ...

How to create texture coordinates?
Dear all, I have a 3D face model and its corresponding texture image. How can I create texture coordinates for each cell on the 3D model? Many thanks in advance. I look forward to hear from you. Best wishes Long ...