pathClass (version 0.9.4)

predict.graphSVM: Predict Method for Graph-SVM Fits

Description

Obtains predictions from a fitted graphSVM object.

Usage

"predict"(object, newdata, type = "response", ...)

Arguments

object
a fitted object of class inheriting from 'graphSVM'
newdata
a matrix with variables to predict
type
response gives the predictions class gives the predicted classes.
...
currently ignored.

Value

the predictions.

Examples

Run this code
## Not run: 
# library(pathClass)
# data(example_data)
# matched <- matchMatrices(x=x, adjacency=adjacency.matrix, mapping=mapping)
# dk <- calc.diffusionKernel(L=matched$adjacency, is.adjacency=TRUE, beta=0) # beta should be tuned
# fit <- fit.graph.svm(matched$x[1:5,], y[1:5], DEBUG=TRUE, mapping=matched$mapping, 
# diffusionKernel=dk)
# predict(fit, newdata=matched$x[6:10,])
# ## End(Not run)

Run the code above in your browser using DataLab