Data and JGAP

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Data and JGAP

manolakis
Hi there
I am interested in programming a Genetic Algorithm for a Classification problem (like a bank loan problem).
What I want to know is how to make a Data Class for JGAP. I have noticed that JGAP has a number of classes for Data. I have a text file with 42.000 lines of data. Each row has 15 attributes. Some of them are numeric attributes (like age), and some others are boolean (true or false), and others are a list of options (like country). What obviously will be needed is a Population Converter or Chromosomes Converter anyway. I can create my own but as I have noticed Jgap also provides a number of Classes for the Genes of a Chromosome (like NumberGene, BooleanGene, etc).
I would be really pleased to anyone that could help and explain me how to start from the beginning.

Many thanks for your time
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

Klaus Meffert-5
Hi,

It seems as if your data contains input values (or maybe output values,
too).
If this is the case, these input and output pairs are the basis for your
fitness function.
If these are only input values you need to know an algorithm for determining
the quality of a GA-computed output.

If this data is not input for an algorithm (that should be found using
GA/GP) to feed in, then I don't have an idea what your data is about.

Maybe looking at the examples (see the examples package) helps understanding
how to build a fitness function and how to configure JGAP.

In any case come back if you have questions.

Best

Klaus


> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf
> Of manolakis
> Sent: Monday, October 15, 2007 12:18 PM
> To: [hidden email]
> Subject: [jgap-users] Data and JGAP
>
>
> Hi there
> I am interested in programming a Genetic Algorithm for a
> Classification problem (like a bank loan problem).
> What I want to know is how to make a Data Class for JGAP. I
> have noticed that JGAP has a number of classes for Data. I
> have a text file with 42.000 lines of data. Each row has 15
> attributes. Some of them are numeric attributes (like age),
> and some others are boolean (true or false), and others are a
> list of options (like country). What obviously will be needed
> is a Population Converter or Chromosomes Converter anyway. I
> can create my own but as I have noticed Jgap also provides a
> number of Classes for the Genes of a Chromosome (like
> NumberGene, BooleanGene, etc).
> I would be really pleased to anyone that could help and
> explain me how to start from the beginning.
>
> Many thanks for your time
> --
> View this message in context:
> http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13210022
> Sent from the jgap-users mailing list archive at Nabble.com.
>
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and
> a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

Sjs Saugier
Manolakis,
What is the goal of your GA problem, and what is your attempted approach?


> From: [hidden email]
> To: [hidden email]; [hidden email]
> Date: Fri, 19 Oct 2007 21:23:04 +0200
> Subject: Re: [jgap-users] Data and JGAP
>
> Hi,
>
> It seems as if your data contains input values (or maybe output values,
> too).
> If this is the case, these input and output pairs are the basis for your
> fitness function.
> If these are only input values you need to know an algorithm for determining
> the quality of a GA-computed output.
>
> If this data is not input for an algorithm (that should be found using
> GA/GP) to feed in, then I don't have an idea what your data is about.
>
> Maybe looking at the examples (see the examples package) helps understanding
> how to build a fitness function and how to configure JGAP.
>
> In any case come back if you have questions.
>
> Best
>
> Klaus
>
>
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf
> > Of manolakis
> > Sent: Monday, October 15, 2007 12:18 PM
> > To: [hidden email]
> > Subject: [jgap-users] Data and JGAP
> >
> >
> > Hi there
> > I am interested in programming a Genetic Algorithm for a
> > Classification problem (like a bank loan problem).
> > What I want to know is how to make a Data Class for JGAP. I
> > have noticed that JGAP has a number of classes for Data. I
> > have a text file with 42.000 lines of data. Each row has 15
> > attributes. Some of them are numeric attributes (like age),
> > and some others are boolean (true or false), and others are a
> > list of options (like country). What obviously will be needed
> > is a Population Converter or Chromosomes Converter anyway. I
> > can create my own but as I have noticed Jgap also provides a
> > number of Classes for the Genes of a Chromosome (like
> > NumberGene, BooleanGene, etc).
> > I would be really pleased to anyone that could help and
> > explain me how to start from the beginning.
> >
> > Many thanks for your time
> > --
> > View this message in context:
> > http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13210022
> > Sent from the jgap-users mailing list archive at Nabble.com.
> >
> >
> > --------------------------------------------------------------
> > -----------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and
> > a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > jgap-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/jgap-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare! Try now!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

manolakis
In reply to this post by manolakis
Thanks both of you for your replies. To make more clear what my data is all about, imagine a flat dataset or better a multidimensional array which holds attributes like categorical, nominal, or continuous. The last attribute (column) of each row of that matrix holds a categorical value (0 or 1). In general we classify each row according to the last attribute (Class). What i really now want to do is to use a GA for rule learning.
An example could be the following:
 if Attribute1=Sunny AND Attribure2>=17Celcious
then
LastAttribute = HOT

This was a simple arbitrary example. LastAttribute in that case can vary  from HOT to COLD. I am not interested in a multivariate classification or things like basket analysis.
I would be really obliged to you if you could give my any tips. Although that I have seen the hierarchy of the fundamental jgap classes I still can't make a start in coding my problem.

Thanks for your time
manolakis

manolakis wrote
Hi there
I am interested in programming a Genetic Algorithm for a Classification problem (like a bank loan problem).
What I want to know is how to make a Data Class for JGAP. I have noticed that JGAP has a number of classes for Data. I have a text file with 42.000 lines of data. Each row has 15 attributes. Some of them are numeric attributes (like age), and some others are boolean (true or false), and others are a list of options (like country). What obviously will be needed is a Population Converter or Chromosomes Converter anyway. I can create my own but as I have noticed Jgap also provides a number of Classes for the Genes of a Chromosome (like NumberGene, BooleanGene, etc).
I would be really pleased to anyone that could help and explain me how to start from the beginning.

Many thanks for your time
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

manolakis
In reply to this post by Sjs Saugier
If you could have a look in the following web site (titanic.dataset) then you will understand what the problem is all about. I have to use a genetic algorithm to derive logic-rules so to classify each individual in the dataset (sank or not sank). There a lot of articles in the web especially on google. If you are really interested to help me I would be obliged if you could google (Concept learning with Genetic algorithms filetype:pdf) , what is the parenthesis or an alternative ( dli.iiit.ac.in/ijcai/IJCAI-91-VOL2/PDF/007.pdf ).
I just want to know how to program with Jgap chromosomes. How can I make a chromosome with a rule in it?
An other example to be more clear imagine that in the case of the titanic dataset a rule could be expessed as '00-0-0->0'. '-' is lets say an AND operator and -> is the implication sign. Therefore 00 expresses the person who was in the 1st class in titanic, and the 2nd zero that he was adult, and the third that he was male and that implies (->) that he wasn't sank (1 if he was sank).
Is it something like that possible to be done with jgap?

Many thanks for your time and your interest.
Manolakis
Sjs Saugier wrote
Manolakis,
What is the goal of your GA problem, and what is your attempted approach?


> From: jgap@klaus-meffert.de
> To: agnostos_7@hotmail.com; jgap-users@lists.sourceforge.net
> Date: Fri, 19 Oct 2007 21:23:04 +0200
> Subject: Re: [jgap-users] Data and JGAP
>
> Hi,
>
> It seems as if your data contains input values (or maybe output values,
> too).
> If this is the case, these input and output pairs are the basis for your
> fitness function.
> If these are only input values you need to know an algorithm for determining
> the quality of a GA-computed output.
>
> If this data is not input for an algorithm (that should be found using
> GA/GP) to feed in, then I don't have an idea what your data is about.
>
> Maybe looking at the examples (see the examples package) helps understanding
> how to build a fitness function and how to configure JGAP.
>
> In any case come back if you have questions.
>
> Best
>
> Klaus
>
>
> > -----Original Message-----
> > From: jgap-users-bounces@lists.sourceforge.net
> > [mailto:jgap-users-bounces@lists.sourceforge.net] On Behalf
> > Of manolakis
> > Sent: Monday, October 15, 2007 12:18 PM
> > To: jgap-users@lists.sourceforge.net
> > Subject: [jgap-users] Data and JGAP
> >
> >
> > Hi there
> > I am interested in programming a Genetic Algorithm for a
> > Classification problem (like a bank loan problem).
> > What I want to know is how to make a Data Class for JGAP. I
> > have noticed that JGAP has a number of classes for Data. I
> > have a text file with 42.000 lines of data. Each row has 15
> > attributes. Some of them are numeric attributes (like age),
> > and some others are boolean (true or false), and others are a
> > list of options (like country). What obviously will be needed
> > is a Population Converter or Chromosomes Converter anyway. I
> > can create my own but as I have noticed Jgap also provides a
> > number of Classes for the Genes of a Chromosome (like
> > NumberGene, BooleanGene, etc).
> > I would be really pleased to anyone that could help and
> > explain me how to start from the beginning.
> >
> > Many thanks for your time
> > --
> > View this message in context:
> > http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13210022
> > Sent from the jgap-users mailing list archive at Nabble.com.
> >
> >
> > --------------------------------------------------------------
> > -----------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and
> > a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > jgap-users mailing list
> > jgap-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/jgap-users
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> jgap-users mailing list
> jgap-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jgap-users

_________________________________________________________________
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
jgap-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

Sjs Saugier
In reply to this post by manolakis
Manolakis,
A Genetic Algorithm is used to find an optimal solution to a problem, given some variety of possible inputs (I'm sorry if I'm telling you something you already know). From reading your problem description, I can't understand what your goal is. It looks like you are trying to generate data, which is not really what a GA does. Is HOT better than COLD? Are you trying to figure out what attributes produce the most HOT days? I know those were arbitrary examples, but I'm trying to understand what problem you are trying to solve...

> Date: Fri, 26 Oct 2007 15:32:20 -0700
> From: [hidden email]
> To: [hidden email]
> Subject: Re: [jgap-users] Data and JGAP
>
>
> Thanks both of you for your replies. To make more clear what my data is all
> about, imagine a flat dataset or better a multidimensional array which holds
> attributes like categorical, nominal, or continuous. The last attribute
> (column) of each row of that matrix holds a categorical value (0 or 1). In
> general we classify each row according to the last attribute (Class). What i
> really now want to do is to use a GA for rule learning.
> An example could be the following:
> if Attribute1=Sunny AND Attribure2>=17Celcious
> then
> LastAttribute = HOT
>
> This was a simple arbitrary example. LastAttribute in that case can vary
> from HOT to COLD. I am not interested in a multivariate classification or
> things like basket analysis.
> I would be really obliged to you if you could give my any tips. Although
> that I have seen the hierarchy of the fundamental jgap classes I still can't
> make a start in coding my problem.
>
> Thanks for your time
> manolakis
>
>
> manolakis wrote:
> >
> > Hi there
> > I am interested in programming a Genetic Algorithm for a Classification
> > problem (like a bank loan problem).
> > What I want to know is how to make a Data Class for JGAP. I have noticed
> > that JGAP has a number of classes for Data. I have a text file with 42.000
> > lines of data. Each row has 15 attributes. Some of them are numeric
> > attributes (like age), and some others are boolean (true or false), and
> > others are a list of options (like country). What obviously will be needed
> > is a Population Converter or Chromosomes Converter anyway. I can create my
> > own but as I have noticed Jgap also provides a number of Classes for the
> > Genes of a Chromosome (like NumberGene, BooleanGene, etc).
> > I would be really pleased to anyone that could help and explain me how to
> > start from the beginning.
> >
> > Many thanks for your time
> >
>
> --
> View this message in context: http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13436574
> Sent from the jgap-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


Help yourself to FREE treats served up daily at the Messenger Café. Stop by today!
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: Data and JGAP

Klaus Meffert-5
In reply to this post by manolakis
Manolakis,

a chromosome just holds data, nothing more. You have to interpret a chromosome's data (or a set of chromosome's data) in the fitness function. For instance, you could take a look at the examples provided with JGAP, e.g. the "minimizing make change" example where for a given amount (like 93) the mimimum number of coins available is to be determined for matching the amount.

Best

Klaus
----- original Nachricht --------

Betreff: Re: [jgap-users] Data and JGAP
Gesendet: So, 28. Okt 2007
Von: manolakis<[hidden email]>

>
> If you could have a look in the following web site (titanic.dataset) then
> you
> will understand what the problem is all about. I have to use a genetic
> algorithm to derive logic-rules so to classify each individual in the
> dataset (sank or not sank). There a lot of articles in the web especially
> on
> google. If you are really interested to help me I would be obliged if you
> could google (Concept learning with Genetic algorithms filetype:pdf) , what
> is the parenthesis or an alternative (
> dli.iiit.ac.in/ijcai/IJCAI-91-VOL2/PDF/007.pdf ).
> I just want to know how to program with Jgap chromosomes. How can I make a
> chromosome with a rule in it?
> An other example to be more clear imagine that in the case of the titanic
> dataset a rule could be expessed as '00-0-0->0'. '-' is lets say an AND
> operator and -> is the implication sign. Therefore 00 expresses the person
> who was in the 1st class in titanic, and the 2nd zero that he was adult,
> and
> the third that he was male and that implies (->) that he wasn't sank (1 if
> he was sank).
> Is it something like that possible to be done with jgap?
>
> Many thanks for your time and your interest.
> Manolakis
>
> Sjs Saugier wrote:
> >
> >
> > Manolakis,
> > What is the goal of your GA problem, and what is your attempted approach?
> >
> >
> >> From: [hidden email]
> >> To: [hidden email]; [hidden email]
> >> Date: Fri, 19 Oct 2007 21:23:04 +0200
> >> Subject: Re: [jgap-users] Data and JGAP
> >>
> >> Hi,
> >>
> >> It seems as if your data contains input values (or maybe output values,
> >> too).
> >> If this is the case, these input and output pairs are the basis for your
> >> fitness function.
> >> If these are only input values you need to know an algorithm for
> >> determining
> >> the quality of a GA-computed output.
> >>
> >> If this data is not input for an algorithm (that should be found using
> >> GA/GP) to feed in, then I don't have an idea what your data is about.
> >>
> >> Maybe looking at the examples (see the examples package) helps
> >> understanding
> >> how to build a fitness function and how to configure JGAP.
> >>
> >> In any case come back if you have questions.
> >>
> >> Best
> >>
> >> Klaus
> >>
> >>
> >> > -----Original Message-----
> >> > From: [hidden email]
> >> > [mailto:[hidden email]] On Behalf
> >> > Of manolakis
> >> > Sent: Monday, October 15, 2007 12:18 PM
> >> > To: [hidden email]
> >> > Subject: [jgap-users] Data and JGAP
> >> >
> >> >
> >> > Hi there
> >> > I am interested in programming a Genetic Algorithm for a
> >> > Classification problem (like a bank loan problem).
> >> > What I want to know is how to make a Data Class for JGAP. I
> >> > have noticed that JGAP has a number of classes for Data. I
> >> > have a text file with 42.000 lines of data. Each row has 15
> >> > attributes. Some of them are numeric attributes (like age),
> >> > and some others are boolean (true or false), and others are a
> >> > list of options (like country). What obviously will be needed
> >> > is a Population Converter or Chromosomes Converter anyway. I
> >> > can create my own but as I have noticed Jgap also provides a
> >> > number of Classes for the Genes of a Chromosome (like
> >> > NumberGene, BooleanGene, etc).
> >> > I would be really pleased to anyone that could help and
> >> > explain me how to start from the beginning.
> >> >
> >> > Many thanks for your time
> >> > --
> >> > View this message in context:
> >> > http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13210022
> >> > Sent from the jgap-users mailing list archive at Nabble.com.
> >> >
> >> >
> >> > --------------------------------------------------------------
> >> > -----------
> >> > This SF.net email is sponsored by: Splunk Inc.
> >> > Still grepping through log files to find problems?  Stop.
> >> > Now Search log events and configuration files using AJAX and
> >> > a browser.
> >> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> > _______________________________________________
> >> > jgap-users mailing list
> >> > [hidden email]
> >> > https://lists.sourceforge.net/lists/listinfo/jgap-users
> >>
> >>
> >>
> -------------------------------------------------------------------------
> >> This SF.net email is sponsored by: Splunk Inc.
> >> Still grepping through log files to find problems?  Stop.
> >> Now Search log events and configuration files using AJAX and a browser.
> >> Download your FREE copy of Splunk now >> http://get.splunk.com/
> >> _______________________________________________
> >> jgap-users mailing list
> >> [hidden email]
> >> https://lists.sourceforge.net/lists/listinfo/jgap-users
> >
> > _________________________________________________________________
> > Boo! Scare away worms, viruses and so much more! Try Windows Live
> OneCare!
> >
> http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailn
> ews
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?  Stop.
> > Now Search log events and configuration files using AJAX and a browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > _______________________________________________
> > jgap-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/jgap-users
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Data-and-JGAP-tf4626067.html#a13446413
> Sent from the jgap-users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users
>

--- original Nachricht Ende ----


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users