Skip to content

Commit

Permalink
caret multiclass
Browse files Browse the repository at this point in the history
  • Loading branch information
gtesei committed Mar 23, 2016
1 parent 7b24cdf commit 97963a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R-package/R/fastRegression.R
Original file line number Diff line number Diff line change
Expand Up @@ -1197,9 +1197,12 @@ ff.createEnsemble = function(Xtrain,
}

getCaretFactors = function(y) {
stopifnot(sort(unique(y))[1] == 0, sort(unique(y))[2] == 1, length(unique(y)) == 2)
ncl = length(unique(unique(y)))
for (i in 1:ncl) {
stopifnot(sort(unique(y))[i] == (i-1))
}
y.cat = factor(y)
levels(y.cat) = c("class0","class1")
levels(y.cat) = paste0("class",0:(ncl-1))
return(list(y.cat=y.cat,fact.sign="class1"))
}

Expand Down
Binary file modified fastfurious-manual.pdf
Binary file not shown.

0 comments on commit 97963a7

Please sign in to comment.