Description Usage Arguments Author(s) Examples
Classifies from variables X
Classifies from variables X
1 2 3 |
theta |
numeric vector of parameters |
X |
design matrix: an array of numeric variables or features including intercepts |
thres |
decision boundry |
type |
type of predictions on logit scale ("logit") or "reponse" or as classification ("class")? Defaults to response |
theta |
numeric vector of parameters |
dX |
design matrix: an array of numeric variables or features |
X |
original variables or features |
y |
original classification including intercepts |
thres |
decision boundry |
Marco D. Visser
Marco D. Visser
1 2 3 4 5 6 7 8 9 10 | X<-array(runif(2000),dim=c(1000,2))
y<-sqrt(2*X[,2]^2+2.4*X[,1]^2)<.5
designX<-mapFeat(X)
designX<-cbind(rep(1,100),designX)
theta<-rep(0,ncol(designX))
lambda<-1
logisCost(theta,designX,y,lambda)
logisGrad(theta,designX,y,lambda)
par<-optim(theta,logisCost,logisGrad,X=designX,y=y,lambda=.01,method="BFGS")$par
decPlot(par,designX,X,y,thres=.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.