Description Usage Arguments Value Examples
Training by using gradient descent on a linear model with logistic loss . Return a matrix of weight vector for each iteration to the max iteration.
1 | LMLogisticLossIterations(X.mat, y.vec, max.iterations, step.size)
|
X.mat |
train feature matrix of size [n x p] |
y.vec |
train label vector of size [n x 1] |
max.iterations |
integer scalar greater than 1 |
step.size |
a numeric scalar greater than zero |
W.mat matrix of weight vectors of size [(p + 1) x max.iterations]
1 2 3 4 5 | data(spam, package = "ElemStatLearn")
X.mat <- as.matrix(spam[, 1:57])
y.vec <- ifelse(spam$spam == "spam", 1, -1)
W.mat <- LMLogisticLossIterations(X.mat, y.vec, max.iterations = 100L, step.size = 0.5)
(W.mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.