Description Usage Arguments Note Examples
This will do prediction with a support vector machine trained by BSGD. See more on http://image.diku.dk/shark/sphinx_pages/build/html/rest_sources/tutorials/algorithms/kernelBudgetedSGD.html
1 | SharkBSGDPredict(x, model, verbose = FALSE)
|
x |
matrix with input data |
model |
a model trained with BSGD Train |
verbose |
verbose output? |
Currently works only for binary classification. Uses only RBF kernel.
1 2 3 4 5 6 7 8 | x = as.matrix(iris[,1:4])
y = as.vector(as.numeric(iris[,5]))
y = replace(y, y == 2, 0)
y = replace(y, y == 3, 0)
model = SharkBSGDTrain (x, y, C = 0.0001,
budget = 5, gamma = 1, epochs = 1, strategy = "Merge")
results = SharkBSGDPredict (x, model)
cat ("BSGD training error is ", sum(abs(y - results$predictions))/length(y), "\n")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.