opt3bin {rWMBAT} | R Documentation |
This function takes an array of continuous sample data of size cases (rows) by variables (columns), along with a class vector of integers, each integer specifying the class. The class vector has the same number of cases as the data. The function outputs the position of the 2 bin boundaries (3 bins) that optimize the mutual information of each variable's data vector with the class vector.
opt3bin(data, class)
data |
double array of continuous values, cases in rows and variables in columns. Distribution is unknown |
class |
double column vector, values 1:c representing classification of each case |
l |
double row vector of left boundary position for each var |
r |
double row vector of right boundary position for each var |
binned |
double data array discretized using boundaries in l and r |
mi |
double row vector of mutual info between each discr. variable and class |
Karl Kuschner, Qian Si and William Cooke, College of William and Mary, Dept. of Physics, 2009
http://kwkusc.people.wm.edu/dissertation/dissertation.htm
data(traingrp,traingrpclass) #load example data in package result <- opt3bin(traingrp,traingrpclass)