stam.predict              package:stam              R Documentation

_P_r_e_d_i_c_t _C_l_a_s_s_i_f_i_c_a_t_i_o_n_s _o_f _N_e_w _D_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     StAM analysis on new data using a given model fit.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

     fit: stamFit object containing a trained model

expression.matrix: matrix or 'exprSet' or 'ExpressionSet', 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

_D_e_t_a_i_l_s:

     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.

_V_a_l_u_e:

     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.

_A_u_t_h_o_r(_s):

     Claudio Lottaz

_S_e_e _A_l_s_o:

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

_E_x_a_m_p_l_e_s:

     ## Not run: 
     # load and prepare data
     library(golubEsets)
     data(Golub_Merge)
     golubTest <- Golub_Merge[,39:72]
     data(golubTrain.fit)

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

     # further investigate
     print(golubTest.pred)
     plot(golubTest.pred)
     ## End(Not run)
     ## 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)

