stam.predict {stam} | R Documentation

## Predict Classifications of New Data

### Description

StAM analysis on new data using a given model fit.

### Usage

    stam.predict(fit, expression.matrix, classifications = NULL,
                 testset = NULL)

### Arguments

`fit` | stamFit object containing a trained model
`expression.matrix` | matrix or exprSet containing new data
`classifications` | character vector specifying class names per sample. You may either specify one class per sample in the expression.matrix, or one class per training sample (all but the testset).
`testset` | indeces of samples not yued in training

### Details

stam.predict uses an object returned by stam.fit to perform a structured analysis of the new expression data provided. Thereby, it uses all classifiers in the leaf nodes to provide classification results in these for each sample. In addition, weighted sums in inner nodes are computed to provide classification results for the whole graph.

### Value

An object of type stamPrediction is returned. You may use print, plot and image functions to further investigate the results. Information on node classifiers are obtained through the print methods on elements of the `nodes` slot.

### Author(s)

Claudio Lottaz

### See Also

`stamPrediction-class`, `plot.stamPrediction`, `image.stamPrediction`, `stam.fit`, `stam.writeHTML`

### Examples

    # load and prepare data
    golubTest <- golubNorm[,39:72]
    data(golubTrain.fit)

    # compute predictions
    golubTest.pred <- stam.predict(golubTrain.fit, golubTest,
                                   pData(golubTest)[,"ALL.AML"])
    golubMerge.pred <- stam.predict(golubTrain.fit, golubNorm,
                                    pData(golubNorm)[,"ALL.AML"], testset=39:72)

    # further investigate
    print(golubTest.pred)
    plot(golubTest.pred)
    ## Not run:
    map <- image(golubMerge.pred, outfile="golubMerge")
    cat("<HTML><BODY><MAP NAME='image_map'>", map, "</MAP>",
        "<IMG SRC='golubMerge_pred_img.png' USEMAP='#image_map'></BODY></HTML>\n",
        file="pred_img.html")
    browseURL(paste("file://", getwd(), "/pred_img.html", sep=""))
    ## End(Not run)

[Package stam version 1.0.3 Index]