TrainParams-class: Parameters for Classifier Training

Description Constructor Author(s) Examples


Collects and checks necessary parameters required for classifier training. The empty constructor is provided for convenience.


TrainParams() Creates a default TrainParams object. The classifier function is DLDA. Users should create an appropriate TrainParams object for the characteristics of their data, once they are familiar with this software.

TrainParams(classifier, transposeExpression, doesTests, ...) Creates a TrainParams object which stores the function which will do the classifier building and parameters that the function will use.


A function which will construct a classifier, and also possibly make the predictions. The first argument must be a matrix object. The second argument must be a vector of classes. If doesTests is TRUE, the third argument must be a matrix of test data. The function must also accept a parameter named verbose The function's return value can be either a trained classifier when doesTests is FALSE or a vector of class predictions if doesTests is TRUE.


Set to TRUE if classifier expects features as columns.


Set to TRUE if classifier also performs and returns predictions.


Character vector. Names of any variables created in prior stages by runTest that need to be passed to classifier.


Other named parameters which will be used by the classifier.


Dario Strbenac


  trainParams <- TrainParams(dlda, transposeExpression = TRUE, doesTests = FALSE)
# sparsediscrim has a separate predict method for trained DLDA objects.
# dlda expects features in columns, and samples in rows.
# It doesn't formally have a verbose parameter, but it is effectively consumed by ... in its formal definition.

Search within the ClassifyR package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.