Learn R Programming

sdpt3r (version 0.1)

dwd: Distance Weighted Discrimination

Description

dwd creates input for sqlp to solve the Distance Weighted Discrimination problem - Given two sets of points An and Ap, find an optimal classification rule to group the points as accurately as possible for future classification.

Usage

dwd(Ap, An, penalty)

Arguments

Ap

An nxp point configuration matrix

An

An nxp point configuration matrix

penalty

A real valued scalar penalty for moving points across classification rule

Value

Returns an object of class sqlp_input, containing the following:

blk

A matrix object describing the block diagonal structure of the SQLP data

At

A matrix object containing constraint matrices for the primal-dual problem

C

A matrix object containing the constant c matrices in the primal objective function

b

A vector containing the right hand side of the equality constraints in the primal problem

OPTIONS

A list object specifying the value of parbarrier

Details

Solves the distance weighted discrimination problem. Mathematical and implementation details can be found in the vignette

Examples

Run this code
# NOT RUN {
data(Andwd)
data(Apdwd)
penalty <- 0.5

out <- dwd(Apdwd,Andwd,penalty)
blk <- out$blk
At <- out$At
C <- out$C
b <- out$b

# }

Run the code above in your browser using DataLab