Description Usage Arguments Value Author(s) References See Also Examples
Prediction of test data using oblique random forest.
1 2 |
object |
an object of class |
newdata |
a matrix containing new data. |
type |
one of |
proximity |
should proximity measures be computed (based on all data)? |
... |
not used currently. |
pred
, which can be the following, depending on type
:
response |
|
prob |
|
votes |
|
If proximity=TRUE
, the returned object is a list with two components: pred
is the prediction (as described above) and proximity
is the proximitry matrix.
Bjoern Menze <menze@csail.mit.edu> and D.N. Splitthoff <nico.splitthoff@gmx.de>.
Menze BH, Kelm BM, Splitthoff DN, Koethe U, Hamprecht F. On oblique random forests. Proc ECML/PKDD 2011. LNAI, 16p. http://people.csail.mit.edu/menze/papers/menze_11_oblique.pdf.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Classification:
require(obliqueRF);
data(iris);
#sample some cases
s<-sample(150,100);
#extract feature matrix
x_train<-as.matrix(iris[s,1:4]);
#convert to 0/1 class labels
y_train<-(as.numeric(iris[s,5])>1)*1;
iris.orf <- obliqueRF(x_train,y_train);
#extract feature matrix
x<-as.matrix(iris[-s,1:4]);
#convert to 0/1 class labels
y<-(as.numeric(iris[-s,5])>1)*1;
pred <- predict(iris.orf,x,type="response",proximity=TRUE);
sum(pred$pred!=y)
|
Loading required package: ROCR
Loading required package: gplots
Attaching package: 'gplots'
The following object is masked from 'package:stats':
lowess
Loading required package: pls
Attaching package: 'pls'
The following object is masked from 'package:stats':
loadings
Loading required package: mda
Loading required package: class
Loaded mda 0.4-9
Loading required package: e1071
obliqueRF 0.3
Type orfNews() to see new features/changes/bug fixes.
obliqueRF: using fast ridge regression with SVD as node model,
does not scale data at the node,
tests regularization parameter "lambda" for 10^(c(-5:5)).
In case of problems with the SVD variant try training_method="ridge_slow" for separate ridge regressions (slower).
obliqueRF: no test set defined. Will use training data.
[1] 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.