50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

FSinR (version 1.0.8)

woa: Whale Optimization Algorithm (Binary Whale Optimization Algorithm)

Description

Binary Whale Optimization Algorithm Kumar2018FSinR is an algorithm that simulates the social behavior of humpback whales. This algorithm employs a binary version of the bubble-net hunting strategy. The algorithm starts with an initial population of individuals, and in each iteration updates the individuals according to several possible actions: Encircling prey, Bubble-net attacking or Search for prey

Usage

woa(data, class, featureSetEval, population = 10, iter = 10, verbose = FALSE)

Arguments

data
  • A data frame with the features and the class of the examples

class
  • The name of the dependent variable

featureSetEval
  • The measure for evaluate features

population
  • The number of whales population

iter
  • The number of iterations of the algorithm

verbose
  • Print the partial results in each iteration

Value

A list is returned containing for each repetition of the algorithm:

bestFeatures

A vector with all features. Selected features are marked with 1, unselected features are marked with 0

bestFitness

Evaluation measure obtained with the feature selection

popIter

List that contains as many elements as iterations has the algorithm. Each of the elements in the list are matrices that represent the population in that iteration. In this matrix the individuals and the evaluation measure of each one are shown

References

Examples

Run this code
# NOT RUN {
## Whale Optimization Algorithm for iris dataset (filter method)
woa(iris, 'Species', roughsetConsistency, population = 10, iter = 5, verbose = TRUE)
# }

Run the code above in your browser using DataLab