Library: | xclust |
See also: | svm adaptive divisive cartsplit cartcv |
Quantlet: | svmplotcol | |
Description: | support quantlet providing graphical output for svm.xpl. |
Usage: | svmplotcol(AT,AC,V,colini,colend,dir) | |
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. | |
colini | (mm x 1) vector, scores, ouput from svm.xpl. | |
colend | scalar, initial colour in the HLS space. | |
dir | scalar, final colour in the HLS space. | |
n/a | scalar, direction of the colour change, +1 if RGB, -1 if RBG. |
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 ; svmplotcol(AT,AC,V,0,120,1); 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.