Library: | xclust |
See also: | svm adaptive divisive cartsplit cartcv |
Quantlet: | svmplot | |
Description: | support quantlet providing graphical output for svm.xpl. |
Usage: | svmplot(AT,AC,V) | |
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 | |
V | (mm x d) matrix, contains d characteristics of mm objects whose classes (+1 or -1) are to be found. | |
n/a | (mm x 1) vector, scores, ouput from svm.xpl. |
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");
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.