Update LSVM classifier

Share:

Description

Update the existing classifier LSVM with a new set of data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  updateLSVM(X.new,
             Y.new,
             X,
             Y,
             A.model.lsvm,
             convexity,
             PLOTSVM = FALSE,
             step.plot.LSVM = 1,
             hyperplanes = FALSE,
             limit.state.estimate = TRUE)

Arguments

X.new

a matrix containing a new data sets

Y.new

a vector containing -1 or +1 that reprensents the class of each elements of X.new.

X

a matrix containing the data sets

Y

a vector containing -1 or +1 that reprensents the class of each elements of X.

A.model.lsvm

a matrix containing the parameters of all hyperplanes.

convexity

Either -1 if the set of data associated to the label "-1" is convex or +1 otherwise.

PLOTSVM

A boolean. If TRUE, plot the data.

step.plot.LSVM

A plot is made each step.plot.LSVM steps.

hyperplanes

A boolean. If TRUE, plot the hyperplanes obtained.

limit.state.estimate

A boolean. If TRUE, plot the estimate of the limit state.

Details

updateLSVM allows to make an update of the classifier LSVM.

Value

An object of class matrix containing the parameters of a set of hyperplanes

Note

The argument PLOTSVM is useful only in dimension 2.

Author(s)

Vincent Moutoussamy

References

  • R.T. Rockafellar:
    Convex analysis
    Princeton university press, 2015.

  • N. Bousquet, T. Klein and V. Moutoussamy :
    Approximation of limit state surfaces in monotonic Monte Carlo settings
    Submitted .

See Also

LSVM modelLSVM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# A limit state function
f <- function(x){  sqrt(sum(x^2)) - sqrt(2)/2 }

# Creation of the data sets

n <- 200
X <- matrix(runif(2*n), nrow = n)
Y <- apply(X, MARGIN = 1, function(w){sign(f(w))})

## Not run: 
  model.A <- modelLSVM(X,Y, convexity = -1)
  M <- 20
  X.new <- matrix(runif(2*M), nrow = M)
  Y.new <- apply(X.new, MARGIN = 1, function(w){ sign(f(w))})

  X.new.S <- X.new[which(Y.new > 0), ]
  Y.new.S <- Y.new[which(Y.new > 0)]
  model.A.new <- updateLSVM(X.new.S, Y.new.S, X, Y,
                            model.A, convexity = -1, PLOTSVM = TRUE, step.plot.LSVM = 5)

## End(Not run)