simulatedAnnealing: Simulated Annealing

Description Usage Arguments Value Author(s) References Examples

View source: R/metaheuristic.R

Description

Generates a search function based on simulated annealing. This function is called internally within the searchAlgorithm function. The simulatedAnnealing method \insertCiteKirkpatrickGelattVecchi1983FSinR starts with a certain set of features and in each iteration modifies an element of the previous feature vector and decreases the temperature. If the energy of the new feature vector is better than that of the old vector, it is accepted and moved towards it, otherwise it is moved towards the new vector according to an acceptance probability. The algorithm ends when the minimum temperature has been reached. Additionally, a number of internal iterations can be performed within each iteration of the algorithm. In this case, the same temperature value of the outer iteration is used for the inner iterations

Usage

1
2
3
4
5
6
7
8
simulatedAnnealing(
  start = NULL,
  temperature = 1,
  temperature_min = 0.01,
  reduction = 0.6,
  innerIter = 1,
  verbose = FALSE
)

Arguments

start

Binary vector with the set of initial features

temperature

Temperature initial

temperature_min

Temperature to stops in the outer loop

reduction

Temperature reduction in the outer loop

innerIter

Number of iterations of inner loop. By default no inner iterations are established

verbose

Print the partial results in each iteration

Value

Returns a search function that is used to guide the feature selection process.

Author(s)

Francisco Aragón Royón

References

\insertAllCited

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run:  

## The direct application of this function is an advanced use that consists of using this 
# function directly and performing a search process in a feature space
## Classification problem

# Generates the filter evaluation function
filter_evaluator <- filterEvaluator('determinationCoefficient')

# Generates the search function with Simulated annealing
sa_search <- simulatedAnnealing()
# Performs the search process directly (parameters: dataset, target variable and evaluator)
sa_search(iris, 'Species', filter_evaluator)

## End(Not run)

FSinR documentation built on Nov. 23, 2020, 5:10 p.m.