Skip to search.
neat · NEAT Users Group

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

  Messages Help
Advanced
Example of Training based on a DataSet   Message List  
Reply Message #5766 of 5820 |
Re: Example of Training based on a DataSet

Major bug in my code when setting input array values:

    for (Int32 j = 0; j < box.InputCount; j++)
    {
    box.InputSignalArray[0] = Convert.ToDouble(dr[j]);
    }

should be

    for (Int32 j = 0; j < box.InputCount; j++)
    {
    box.InputSignalArray[j] = Convert.ToDouble(dr[j]);
    }

So if you are following my example, fix the bug.  The bug leads to a complete lack of convergence.


--- In neat@yahoogroups.com, "gotnobluemilk" <gotnobluemilk@...> wrote:
>
> I probably should have elaborated on MakeDecision().
>
> public void MakeDecision(DataRow dr)
> {
> // Clear the network
> box.ResetState();
>
> // Reset all inputs.
> inputArr.Reset();
> // set all inputs.
> for (Int32 j = 0; j < box.InputCount; j++)
> {
> box.InputSignalArray[0] = Convert.ToDouble(dr[j]);
> }
>
> // Activate the network
> box.Activate();
>
> }
>
>
> --- In neat@yahoogroups.com, "gotnobluemilk" gotnobluemilk@ wrote:
> >
> > Well, I didn't expect much reponse since the other posts about this subject received no reponses. Anyway, he is the approach I took. I just put the needed changes in the Evaluate function:
> >
> > public FitnessInfo Evaluate(IBlackBox box)
> > {
> > double fitness = 0;
> >
> > foreach (DataRow dr in dtTrain.Rows)
> > {
> > // Make decision
> > MakeDecision(dr);
> > if (!brainTrain.Brain.IsStateValid)
> > return FitnessInfo.Zero;
> >
> > // Update the fitness score of the network
> > fitness += getScore();
> > }
> >
> > // Update the evaluation counter.
> > _evalCount++;
> >
> > // Return the fitness score
> > return new FitnessInfo(Math.Max(0, fitness), Math.Max(0, fitness));
> > }
> >
> > --- In neat@yahoogroups.com, "gotnobluemilk" <gotnobluemilk@> wrote:
> > >
> > > I'm using SharpNeat V2 and doing my first experiment. Lot's to learn trying to understand both the concept and the software.
> > >
> > > All of the experiments I have seen deal with robots of some sort. I'm looking for an experiment based on training off of a data set. For example, I have 5,000 cases in an XML DataSet, I want to use 6 inputs, predict two outputs. I would run through all 5,000 cases as one generation of the training and base my fitness off of how accurately it predicted the correct output for the 5,000 cases.
> > >
> > > If anyone is aware of an experiment or posting that would point me in the right direction I would appreciate it.
> > >
> > > Thanks.
> > >
> >
>



Mon Feb 13, 2012 5:30 pm

gotnobluemilk
Offline Offline
Send Email Send Email

Message #5766 of 5820 |
Expand Messages Author Sort by Date

I'm using SharpNeat V2 and doing my first experiment. Lot's to learn trying to understand both the concept and the software. All of the experiments I have...
gotnobluemilk Offline Send Email Jan 30, 2012
5:23 pm

Well, I didn't expect much reponse since the other posts about this subject received no reponses. Anyway, he is the approach I took. I just put the needed...
gotnobluemilk Offline Send Email Feb 4, 2012
9:00 pm

I probably should have elaborated on MakeDecision(). public void MakeDecision(DataRow dr) { // Clear the network box.ResetState(); // Reset all inputs. ...
gotnobluemilk Offline Send Email Feb 4, 2012
9:05 pm

Major bug in my code when setting input array values: for (Int32 j = 0; j < box.InputCount; j++) { box.InputSignalArray[0] = Convert.ToDouble(dr[j]); } should...
gotnobluemilk Offline Send Email Feb 13, 2012
5:30 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help