LedPred {LedPred} | R Documentation

## Creates an SVM model given a feature matrix

### Description

The `LedPred` function computes the best SVM parameters, defines the optimal features for creating the SVM model by running sequentially `mcTune`, `rankFeatures`, `tuneFeatureNb` and `createModel`. The performances of this model are then computed usong `evaluateModelPerformance`.

### Usage

    LedPred(data = NULL, cl = 1, ranges = list(gamma = c(1, 10), cost = c(1,
      10)), cost = NULL, gamma = NULL, kernel = "linear", valid.times = 10,
      file.prefix = NULL, numcores = ifelse(.Platform$OS.type == "windows", 1,
      parallel::detectCores() - 1), step.nb = 10, halve.above = 100)

### Arguments

`data` | data.frame containing the training set
`cl` | integer indicating the column number corresponding to the response vector that classify positive and negative regions (default = 1)
`ranges` | list object containing one (linear kernel) or two (radial kernel) vectors of integers corresponding to SVM cost and SVM gamma parameters to test.
`cost` | The SVM cost parameter for both linear and radial kernels. If NULL (default), the function `mcTune` is run.
`gamma` | The SVM gamma parameter for radial kernel. If radial kernel and NULL (default), the function `mcTune` is run.
`kernel` | SVM kernel, a character string: "linear" or "radial". (default = "radial")
`valid.times` | Integer indicating how many times the training set will be split for the cross validation step (default = 10). This number must be smaller than positive and negative sets sizes.
`file.prefix` | A character string that will be used as a prefix for the result files. If it is NULL (default), no plot is returned
`numcores` | Number of cores to use for parallel computing (default: the number of available cores in the machine - 1)
`step.nb` | Number of features to add at each step (default = 10)
`halve.above` | During RFE, all the features are ranked at the first round and the half lowest ranked features (that contribute the least in the model) are removed for the next round. When the number of feauture is lower or equal to halve.above, the features are removed one by one. (default=100)

### Value

A list of the object produced at each step

`best.params` | A list of the parameters giving the lowest misclassification error
`feature.ranking` | List of ordered features from `rankFeatures`
`feature.nb` | he optimal number of feature to use from the list of ordered features from `tuneFeatureNb`
`model.svm` | The best SVM model `createModel`
`probs.label.list` | The cross-validation results from `evaluateModelPerformance`

### Examples

     data(crm.features)
     #cost_vector <- c(1,3,10)
     #gamma_vector <- c(1,3,10)
     #ledpred.list=LedPred(data.granges=crm.features, cl=1, ranges = list(cost=cost_vector,
     #                          gamma=gamma_vector), kernel="linear", halve.above=50)
     #names(ledpred.list)

[Package LedPred version 1.22.0 Index]