svmofit.Rd
train data must be the data without labels. Labels should be provided in trainLabels
svmofit(train, trainLabels, weights, cost, gamma)
train | Training data of numeric type without labels. |
---|---|
trainLabels | A vector of numeric tags for each instance of training data. |
weights | A boolean indicating whether weights per instance are used. |
cost | numeric value indicating the cost parameter to train the SVM. |
gamma | numeric value indicating the gamma parameter to train the SVM. |
A matrix of 1xn svm trained with weights models.
dattrain<-read.table("train_balance-scale.0", sep=" ")#> Warning: cannot open file 'train_balance-scale.0': No such file or directory#> Error in file(file, "rt"): cannot open the connectionmodelstrain<-svmofit(dattrain[,-ncol(dattrain)],dattrain[,ncol(dattrain)],TRUE,1,1)#> Error in svmofit(dattrain[, -ncol(dattrain)], dattrain[, ncol(dattrain)], TRUE, 1, 1): object 'dattrain' not found