 |
|
| Computers Forum Index » Computer Artificial Intelligence - Genetic » Genetic Algorithms for factorize multivariate... |
|
Page 1 of 1 |
|
| Author |
Message |
| Jeremy Watts... |
Posted: Sat Jun 06, 2009 7:49 pm |
|
|
|
Guest
|
Hi,
I am attempting to use a GA to factorize a multivariate polynomial
(polynomials having more than one variable) with integer coefficients.
The first step I have used 'normalises' the polynomial, so that all of its
coefficients lie in the range -1 to +1. This works by dividing out by the
highest magnitude coefficient.
I then use two 'template' factors as candidate solutions to the
factorization. These multivariate templates consist of a combination of
'all possible' polynomial terms that the fators could possibly have.
Random coefficients in the range -1 to +1 are then produced for each of the
candidate factors. I have initially set this step to produce an initial
population of 10,000 solutions.
Each of these solutions are then assessed according to how fit they are by
choosing random values for the variables used, and evaluating the input
polynomial, and both of the candidate factor polynomials for these values.
The fitness function is then defined as being the 'value for the evaluated
input polynomial' minus the product of the 'evaluated factor polynomials'.
Clearly the closer this value is to zero, then the better the candidate
solution is.
At this stage I then take the best 10% of solutions to go on to breed with
them.
I have to say this is the first time I've attempted to use a GA, and so my
question is one of representing solutions.
How could I represent the solutions here in terms of binary? Could I convert
each of the coefficients of the candidate factors to binary and string them
together to form a 'chromosome'?
Is binary strictly necessary? Could I not simply stick with ordinay
floating numbers here and use selection/recombination/mutation with them?
Regards
Jeremy Watts |
|
|
| Back to top |
|
|
|
| ... |
Posted: Sun Jun 07, 2009 2:25 pm |
|
|
|
Guest
|
On Jun 6, 11:49 am, "Jeremy Watts" <rtur... at (no spam) jhfhgfd.com> wrote:
Quote: Hi,
I am attempting to use a GA to factorize a multivariate polynomial
(polynomials having more than one variable) with integer coefficients.
The first step I have used 'normalises' the polynomial, so that all of its
coefficients lie in the range -1 to +1. This works by dividing out by the
highest magnitude coefficient.
I then use two 'template' factors as candidate solutions to the
factorization. These multivariate templates consist of a combination of
'all possible' polynomial terms that the fators could possibly have.
Random coefficients in the range -1 to +1 are then produced for each of the
candidate factors. I have initially set this step to produce an initial
population of 10,000 solutions.
Each of these solutions are then assessed according to how fit they are by
choosing random values for the variables used, and evaluating the input
polynomial, and both of the candidate factor polynomials for these values..
The fitness function is then defined as being the 'value for the evaluated
input polynomial' minus the product of the 'evaluated factor polynomials'.
Clearly the closer this value is to zero, then the better the candidate
solution is.
At this stage I then take the best 10% of solutions to go on to breed with
them.
I have to say this is the first time I've attempted to use a GA, and so my
question is one of representing solutions.
How could I represent the solutions here in terms of binary? Could I convert
each of the coefficients of the candidate factors to binary and string them
together to form a 'chromosome'?
Is binary strictly necessary? Could I not simply stick with ordinay
floating numbers here and use selection/recombination/mutation with them?
Regards
Jeremy Watts
Hi Jeremy:
You might want to consider using differential evolution (DE)
techniques for this problem. DE was originally designed to optimize
continuous, real-valued, multivariate functions and avoids the need to
represent solutions as binary strings. You'll find that your
understanding of GAs translates very well into an understanding of DE
(the mutation and cross-over concepts are very similar). Furthermore,
the "Differential Evolution Homepage" (http://www.icsi.berkeley.edu/
~storn/code.html) contains sample implementations in many different
languages and for several different platforms. The SciLab
implementation, for example, is quite fast. In addition, DE's
creators have written a great book entitled, "Differential Evolution
-- A Practical Guide to Global Optimization". It is well written and
easy to follow.
Best,
Jaymar |
|
|
| Back to top |
|
|
|
| Jeremy Watts... |
Posted: Mon Jun 08, 2009 12:07 pm |
|
|
|
Guest
|
Looks exactly what I need, many thanks!
Jeremy
<jaymar4 at (no spam) gmail.com> wrote in message
news:9cfa37d9-5020-4806-b3f7-eba354167062 at (no spam) z5g2000vba.googlegroups.com...
On Jun 6, 11:49 am, "Jeremy Watts" <rtur... at (no spam) jhfhgfd.com> wrote:
Quote: Hi,
I am attempting to use a GA to factorize a multivariate polynomial
(polynomials having more than one variable) with integer coefficients.
The first step I have used 'normalises' the polynomial, so that all of its
coefficients lie in the range -1 to +1. This works by dividing out by the
highest magnitude coefficient.
I then use two 'template' factors as candidate solutions to the
factorization. These multivariate templates consist of a combination of
'all possible' polynomial terms that the fators could possibly have.
Random coefficients in the range -1 to +1 are then produced for each of
the
candidate factors. I have initially set this step to produce an initial
population of 10,000 solutions.
Each of these solutions are then assessed according to how fit they are by
choosing random values for the variables used, and evaluating the input
polynomial, and both of the candidate factor polynomials for these values.
The fitness function is then defined as being the 'value for the evaluated
input polynomial' minus the product of the 'evaluated factor polynomials'.
Clearly the closer this value is to zero, then the better the candidate
solution is.
At this stage I then take the best 10% of solutions to go on to breed with
them.
I have to say this is the first time I've attempted to use a GA, and so my
question is one of representing solutions.
How could I represent the solutions here in terms of binary? Could I
convert
each of the coefficients of the candidate factors to binary and string
them
together to form a 'chromosome'?
Is binary strictly necessary? Could I not simply stick with ordinay
floating numbers here and use selection/recombination/mutation with them?
Regards
Jeremy Watts
Hi Jeremy:
You might want to consider using differential evolution (DE)
techniques for this problem. DE was originally designed to optimize
continuous, real-valued, multivariate functions and avoids the need to
represent solutions as binary strings. You'll find that your
understanding of GAs translates very well into an understanding of DE
(the mutation and cross-over concepts are very similar). Furthermore,
the "Differential Evolution Homepage" (http://www.icsi.berkeley.edu/
~storn/code.html) contains sample implementations in many different
languages and for several different platforms. The SciLab
implementation, for example, is quite fast. In addition, DE's
creators have written a great book entitled, "Differential Evolution
-- A Practical Guide to Global Optimization". It is well written and
easy to follow.
Best,
Jaymar |
|
|
| Back to top |
|
|
|
| ... |
Posted: Mon Jun 08, 2009 12:22 pm |
|
|
|
Guest
|
Looks exactly what I need, many thanks!
Jeremy
<jaymar4 at (no spam) gmail.com> wrote in message
news:9cfa37d9-5020-4806-b3f7-
eba354167062 at (no spam) z5g2000vba.googlegroups.com...
On Jun 6, 11:49 am, "Jeremy Watts" <rtur... at (no spam) jhfhgfd.com> wrote:
Quote: Hi,
I am attempting to use a GA to factorize a multivariate polynomial
(polynomials having more than one variable) with integer coefficients.
The first step I have used 'normalises' the polynomial, so that all of its
coefficients lie in the range -1 to +1. This works by dividing out by the
highest magnitude coefficient.
I then use two 'template' factors as candidate solutions to the
factorization. These multivariate templates consist of a combination of
'all possible' polynomial terms that the fators could possibly have.
Random coefficients in the range -1 to +1 are then produced for each of
the
candidate factors. I have initially set this step to produce an initial
population of 10,000 solutions.
Each of these solutions are then assessed according to how fit they are by
choosing random values for the variables used, and evaluating the input
polynomial, and both of the candidate factor polynomials for these values.
The fitness function is then defined as being the 'value for the evaluated
input polynomial' minus the product of the 'evaluated factor polynomials'.
Clearly the closer this value is to zero, then the better the candidate
solution is.
At this stage I then take the best 10% of solutions to go on to breed with
them.
I have to say this is the first time I've attempted to use a GA, and so my
question is one of representing solutions.
How could I represent the solutions here in terms of binary? Could I
convert
each of the coefficients of the candidate factors to binary and string
them
together to form a 'chromosome'?
Is binary strictly necessary? Could I not simply stick with ordinay
floating numbers here and use selection/recombination/mutation with them?
Regards
Jeremy Watts |
|
|
| Back to top |
|
|
|
| Jeremy Watts... |
Posted: Mon Jun 08, 2009 1:25 pm |
|
|
|
Guest
|
Looks exactly what I need, many thanks!
Jeremy
<jaymar4 at (no spam) gmail.com> wrote in message
news:9cfa37d9-5020-4806-b3f7-eba354167062 at (no spam) z5g2000vba.googlegroups.com...
On Jun 6, 11:49 am, "Jeremy Watts" <rtur... at (no spam) jhfhgfd.com> wrote:
Quote: Hi,
I am attempting to use a GA to factorize a multivariate polynomial
(polynomials having more than one variable) with integer coefficients.
The first step I have used 'normalises' the polynomial, so that all of its
coefficients lie in the range -1 to +1. This works by dividing out by the
highest magnitude coefficient.
I then use two 'template' factors as candidate solutions to the
factorization. These multivariate templates consist of a combination of
'all possible' polynomial terms that the fators could possibly have.
Random coefficients in the range -1 to +1 are then produced for each of
the
candidate factors. I have initially set this step to produce an initial
population of 10,000 solutions.
Each of these solutions are then assessed according to how fit they are by
choosing random values for the variables used, and evaluating the input
polynomial, and both of the candidate factor polynomials for these values.
The fitness function is then defined as being the 'value for the evaluated
input polynomial' minus the product of the 'evaluated factor polynomials'.
Clearly the closer this value is to zero, then the better the candidate
solution is.
At this stage I then take the best 10% of solutions to go on to breed with
them.
I have to say this is the first time I've attempted to use a GA, and so my
question is one of representing solutions.
How could I represent the solutions here in terms of binary? Could I
convert
each of the coefficients of the candidate factors to binary and string
them
together to form a 'chromosome'?
Is binary strictly necessary? Could I not simply stick with ordinay
floating numbers here and use selection/recombination/mutation with them?
Regards
Jeremy Watts
Hi Jeremy:
You might want to consider using differential evolution (DE)
techniques for this problem. DE was originally designed to optimize
continuous, real-valued, multivariate functions and avoids the need to
represent solutions as binary strings. You'll find that your
understanding of GAs translates very well into an understanding of DE
(the mutation and cross-over concepts are very similar). Furthermore,
the "Differential Evolution Homepage" (http://www.icsi.berkeley.edu/
~storn/code.html) contains sample implementations in many different
languages and for several different platforms. The SciLab
implementation, for example, is quite fast. In addition, DE's
creators have written a great book entitled, "Differential Evolution
-- A Practical Guide to Global Optimization". It is well written and
easy to follow.
Best,
Jaymar |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Sat Nov 28, 2009 6:27 am
|
|