decisionStump: Decision Stump Algorithm

Description Usage Arguments Value Author(s) Examples

Description

Do classification with tree method in one step

Usage

1
decisionStump(X, w, y)

Arguments

X

Data matrix / Data frame

w

Weight that given to each observation. Used in calculate cost function.

y

Class label for data points in X, must be -1 or 1

Value

j

The best dimention to cut the tree

theta

Value that seperate tree in the best dimention

m

the routine label value (for now only 1)

Author(s)

Xiaoyao Yang

Examples

1
2
3
4
5
6
7
set.seed(1024)
z <- runif(n=5)
mydata <- fakedata(w=z,n=100)
X<- mydata$S[,1:4]
y <- mydata$y
w <- rep(1/100,100)
pars <- decisionStump(X=X,w=w,y=y)

Example output



freestats documentation built on May 2, 2019, 1:18 p.m.