[R] Genetic algorithm workflow Problem..!! Is it right or wrong ??
Collin Lynch
cflynch at ncsu.edu
Fri May 22 16:20:00 CEST 2015
Rashmi, I think that this might be beyond the scope of this list as it
is focused on issues with the R language specifically. It does not
look like you have any R errors although we would need to see some
output to be sure.
With respect to the general GA workflow it appears that you are doing
it right although the exact function of your fitness operator is not
clear to me. I recommend looking at "An Introduction to Genetic
Algorithms" by Melanie Mitchell. That is a good resource for more
general GA advice.
Sincerely,
Collin Lynch.
On Fri, May 22, 2015 at 3:09 AM, Rashmi Naik k <rashnaikk at gmail.com> wrote:
> I'm actually looking for a way to use a genetic algorithm to optimize
> product price's in an e-commerce store. and im doing it in R language.
>
> I'm using GA package in r and below is my data set.
>
> library(GA)
> dataset-------input1
>
> Production.Cost Product.Price Product.Quality Delivery.Time
> After.Sales.Service Sellers.Reputation Selling.Price
>
> [1,] 871.1901 879.99 1139.99
> 895.13 1029.98 986.2725 1066
>
> [2,] 296.9901 299.99 329.95
> 329.73 334.99 323.6650 321
>
>
> ---------------------------------------------------------
> and this is my fitness function
>
> f <-function(x) x * runif(1)
> fitness <-function(x) f(x)
> --------------------------------------------------
> and i have generated a random population
>
> pop<-gareal_Population(rp,input1)
> -----------------------------------------------------
> i have used roulette wheel selection
>
> sel<-gareal_rwSelection(rp,pop$population)
> ---------------------------------------------------------------
>
> I have Used Single point Crossover
>
> cross<-gareal_spCrossover(rp,sel$population)
> ----------------------------------------------------------------------------------
>
> I Don't know whether i'm doing it right or not..!! But i don't know how to
> optimize a products price using Genetic algorithm.
> Can any body suggest me on this.. and take me to a right direction.
>
> Any Suggestions accepted..!! Please do help me on this
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list