predict.rfe: Predict Method for RFE Fits

Description Usage Arguments Value Author(s) Examples

View source: R/RecursiveFeatureElimination.R

Description

Obtains predictions from a fitted RFE object.

Usage

1
2
  ## S3 method for class 'rfe'
predict(object, newdata, type = "response", ...)

Arguments

object

a fitted object of class inheriting from 'rfe'

newdata

a matrix with variables to predict

type

response gives the predictions class gives the predicted classes.

...

currently ignored.

Value

the predictions.

Author(s)

Marc Johannes JohannesMarc@gmail.com

Examples

1
2
3
4
5
6
7
## Not run: 
library(pathClass)
data(example_data)
fit = fit.rfe(x[1:5,], y[1:5], DEBUG=T)
predict(fit, newdata=x[6:10,])

## End(Not run)

Example output

Loading required package: svmpath
Loaded svmpath 0.955

Loading required package: kernlab
Loading required package: affy
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: ROCR
Loading required package: gplots

Attaching package: 'gplots'

The following object is masked from 'package:stats':

    lowess

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:BiocGenerics':

    normalize, union

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Loading required package: lpSolve
Warning message:
In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'
500  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.6 , C= 0.001 ,  500 features.
450  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.6 , C= 0.001 ,  450 features.
405  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.6 , C= 0.001 ,  405 features.
365  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.6 , C= 0.001 ,  365 features.
329  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.6 , C= 0.001 ,  329 features.
296  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.001 
Model Updated. Spanbound= 0.4 , C= 0.001 ,  296 features.
266  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 1 
Model Updated. Spanbound= 0.2 , C= 1 ,  266 features.
239  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 1 
Model Updated. Spanbound= 0 , C= 1 ,  239 features.
215  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  215 features.
193  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  193 features.
174  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  174 features.
157  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  157 features.
141  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  141 features.
127  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  127 features.
114  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  114 features.
103  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  103 features.
93  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  93 features.
84  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  84 features.
76  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  76 features.
68  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  68 features.
61  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  61 features.
55  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  55 features.
49  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  49 features.
44  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  44 features.
40  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  40 features.
36  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.01 
Model Updated. Spanbound= 0 , C= 0.01 ,  36 features.
32  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  32 features.
29  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  29 features.
26  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  26 features.
23  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  23 features.
21  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  21 features.
19  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  19 features.
17  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  17 features.
15  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  15 features.
13  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  13 features.
12  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  12 features.
11  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  11 features.
10  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  10 features.
9  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  9 features.
8  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  8 features.
7  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  7 features.
6  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  6 features.
5  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  5 features.
4  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  4 features.
3  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 0.1 
Model Updated. Spanbound= 0 , C= 0.1 ,  3 features.
2  Features left.
Trying C= 0.001 
Trying C= 0.01 
Trying C= 0.1 
Trying C= 1 
Trying C= 10 
Trying C= 100 
Trying C= 1000 
Best C= 1 
Model Updated. Spanbound= 0 , C= 1 ,  2 features.
Best Model is: Spanbound= 0 , C= 1 , 2 features.
        [,1]
F   4.208259
G  19.113883
H -38.972023
I -51.146420
J -15.353622

pathClass documentation built on May 29, 2017, 11:44 p.m.