summary.de-method: Summary for Differential Evolution

Description Usage Arguments Value Author(s) See Also Examples

Description

Summary method for class de-class.

Usage

1
2
3
4
5
## S4 method for signature 'de'
summary(object, ...)

## S3 method for class 'summary.de'
print(x, digits = getOption("digits"), ...)

Arguments

object

an object of class de-class.

x

an object of class summary.de.

digits

number of significant digits.

...

further arguments passed to or from other methods.

Value

The summary function returns an object of class summary.de which can be printed by the corresponding print method. The function also returns invisibly a list with the information from the differential evolution search.

Author(s)

Luca Scrucca

See Also

de

Examples

1
2
3
4
5
6
f <- function(x) abs(x)+cos(x)
DE <- de(fitness = function(x) -f(x), 
         lower = -20, upper = 20, run = 50)
out <- summary(DE)
print(out)
str(out)

Example output

Loading required package: foreach
Loading required package: iterators
Package 'GA' version 3.2
Type 'citation("GA")' for citing this R package in publications.

Attaching package: 'GA'

The following object is masked from 'package:utils':

    de

-- Differential Evolution -------------- 

DE settings: 
Type                  =  real-valued 
Population size       =  10 
Number of generations =  100 
Elitism               =  0 
Stepsize              =  0.8 
Crossover probability =  0.5 
Mutation probability  =  0 
Search domain = 
       x1
lower -20
upper  20

DE results: 
Iterations             = 98 
Fitness function value = -1 
Solution = 
     x1
[1,]  0
List of 12
 $ type       : chr "real-valued"
 $ popSize    : num 10
 $ maxiter    : num 100
 $ elitism    : num 0
 $ stepsize   : num 0.8
 $ pcrossover : num 0.5
 $ pmutation  : num 0
 $ domain     : num [1:2, 1] -20 20
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:2] "lower" "upper"
  .. ..$ : chr "x1"
 $ suggestions: NULL
 $ iter       : int 98
 $ fitness    : num -1
 $ solution   : num [1, 1] 0
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : NULL
  .. ..$ : chr "x1"
 - attr(*, "class")= chr "summary.de"

GA documentation built on May 2, 2019, 9:57 a.m.