plot.ICA: Methods for ICA objects.

Description Usage Arguments Details Value Examples

View source: R/plot.ICA.R

Description

Provide standard methods for manipulating ICA objects, namely printing, plotting, summarising and extracting the position of the minimum.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'ICA'
plot(x, ..., xlab = "Iteration", ylab = "Value",
                   main = "ICA History", col = "red")
## S3 method for class 'ICA'
print(x, ...)
## S3 method for class 'ICA'
summary(object, ...)
## S3 method for class 'ICA'
coef(object, ...)

Arguments

x, object

An object of class "ICA".

xlab, ylab, main, col

Graphics parameters.

...

Additional arguments passed on to the method.

Details

Methods for standard generic functions when dealing with objects of class "ICA"

Value

print method: the value is printed and returned invisibly.

summary method: dummy. Returns the object unchanged.

plot method: a plot of the history of the process is produced with a NULL return value.

coef method: extract the location vector for the minimum value.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## --------cost function: f(x,y) = x * sin(4 * x) + 1.1 * y * sin(2 * y)
## --------search region: -10 <= x, y <= 10

cost <- function(x) {
  x[1] * sin(4 * x[1]) + 1.1 * x[2] * sin(2 * x[2])
}

ICAout <- ICA(cost, nvar = 2, ncountries = 80, nimp = 10,
              maxiter = 100, lb = -10, ub = 10, 
              beta = 2, P_revolve = 0.3, zeta = 0.02)

summary(ICAout)     ## same as the print method
coef(ICAout)        ## get the position of the minimum
cost(coef(ICAout))  ## cost at the minimum
plot(ICAout)        ## show the history of the process

ICAFF documentation built on May 19, 2017, 6:59 a.m.

Search within the ICAFF package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.