Learn R Programming

STPGA (version 2.0)

makeonecross: Make a cross from two solutions and mutate.

Description

Given two training sets, identifiers for candidates, this function makes a new solution using crossover and one point mutation with probability mutprob. Only one mutation is allowed.

Usage

makeonecross(x1, x2, Candidates, mutprob)

Arguments

x1
a vector of identifiers selected from the candidate set.
x2
a vector of identifiers selected from the candidate set that has the same length as x1.
Candidates
vector of identifiers for individuals in the candidate set.
mutprob
point mutation probability for each individual generated. Only one mutation per solution is allowed.