SharkBSGDPredict: Budgeted SGD Predict.

Description Usage Arguments Note Examples

Description

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

Usage

1
SharkBSGDPredict(x, model, verbose = FALSE)

Arguments

x

matrix with input data

model

a model trained with BSGD Train

verbose

verbose output?

Note

Currently works only for binary classification. Uses only RBF kernel.

Examples

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")

aydindemircioglu/RcppShark documentation built on May 11, 2019, 4:13 p.m.