Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: xclust
See also: svmplot adaptive divisive cartsplit cartcv

Quantlet: svm
Description: returns the vector of scores for the objects represented in AC. AT is a training set where the last column describes the class of an object (must be +1 or -1).

Usage: V=svm(AT,AC,r,c)
Input:
AT (m x d+1) matrix, contains d characteristics of m objects of the training set. The last column of the matrix must describe the class of an object, it can only be +1 or -1. Pararmeter AC
r (mm x d) matrix, contains d characteristics of mm objects whose classes (+1 or -1) are to be found.
c scalar, the coefficient determining the anisotropic radial basis r*Sigma^(1/2), where Sigma is the covariance matrix of the training set.
n/a scalar, capacity of the support vector machine invariant of the number of objects m. The capacity appearing in the SVM Lagrange formulation is C=c*m.
Output:
V (mm x 1) vector, scores.

Note:

Example:
library("xplore");
library("plot");
library("xclust");
AT=read("bankruptcy.dat");
nsteps=100;
origin=#(-0.62, 0.0);
endpoints=#(0.52, 1.5);
steps=(endpoints-origin)/nsteps;
npoints=#(nsteps+1, nsteps+1);
AC=grid(origin,steps,npoints);
V=svm(AT, AC, 2.0, 1.0);
; Try out these values of r and c: ;
; -------------------------------- ;
; r=100 ; c=1   ;
; r=2   ; c=1   ;
; r=0.5 ; c=1   ;
; ------------- ;
; r=2   ; c=300 ;
svmplot(AT,AC,V);
setgopt(svmdi,1,1,"xlabel","Profitability(NI/TA)","ylabel","Leverage(TL/TA)","title","Company Scores");

Result:
A two dimensional plot. Intensity of the background
colour corresponds to the empirically estimated
probability of default: the darker the area, the
higher the company default probabilty.



Author: R.A. Moro, 20040220 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006