[R] Genetic algorithm workflow Problem..!! Is it right or wrong ??
Rashmi Naik k
rashnaikk at gmail.com
Fri May 22 09:09:05 CEST 2015
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]]
More information about the R-help
mailing list