Description Usage Arguments Author(s) References Examples
This implements the transductive prediction for an spa object. It performs regularization/region approach for transductive prediction. In addition it can also updates an existing spa object with new transductive estimate.
1 2 3 4 5 |
object |
an object of type |
ynew |
an object of type |
xnew |
an object of type |
gnew |
an object of type |
type |
the type of predictions in classification, classes, probabilities or both. In the case of both the object will return an additional penalty vector corresponding to the rate function for each case. |
reg |
for regression it is automatically taken as a ridge penalty. In the case of classification one can use either ridge or the hyperbolic l1 penalty (hlasso). |
trans.update |
comming soon |
verbose |
comming soon |
dat |
data driven estimation routine consists of list k for the number of vertex sets, and l for the regularization (see reference). default dat=list(k=0,l=Inf) |
FUN |
measure used to sort WUL, the unlabeled-labeled partition. The FUN=sum multiplies WUL times a vector of ones, others may include max. |
... |
additional arguments passed into the function |
Mark Culp
M. Culp (2011). spa: A Semi-Supervised R Package for Semi-Parametric Graph-Based Estimation. Journal of Statistical Software, 40(10), 1-29. URL http://www.jstatsoft.org/v40/i10/.
1 2 3 4 5 6 7 8 9 10 | ## Use simulated example (two moon)
set.seed(100)
dat=spa.sim(type="moon")
##Use spa to train with a supervised/transductive kernel smoother
gsemi<-spa(dat$y,graph=as.matrix(daisy(dat[,-1])))
##Use spa to update the object with new data
dat<-rbind(dat,spa.sim(100,0))
gsemi<-update(gsemi,ynew=dat$y,,as.matrix(daisy(dat[,-1])),trans.update=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.