classifySupv | R Documentation |
Supervised classification of record pairs based on a trained model.
classifySupv(model, newdata, ...) ## S4 method for signature 'RecLinkClassif,RecLinkData' classifySupv(model, newdata, convert.na = TRUE, ...) ## S4 method for signature 'RecLinkClassif,RLBigData' classifySupv(model, newdata, convert.na = TRUE, withProgressBar = (sink.number()==0), ...)
model |
Object of class |
newdata |
Object of class |
convert.na |
Logical. Whether to convert missing values in the comparison patterns to 0. |
withProgressBar |
Whether to display a progress bar |
... |
Further arguments for the |
The record pairs in newdata
are classified by calling
the appropriate predict
method for model$model
.
By default, the "RLBigDataDedup"
method displays a
progress bar unless output is diverted by sink
, e.g. when processing
a Sweave file.
For the "RecLinkData"
method, a S3 object
of class "RecLinkResult"
that represents a copy
of newdata
with element rpairs$prediction
, which stores
the classification result, as addendum.
For the "RLBigData"
method, a S4 object of class
"RLResult"
.
Andreas Borg, Murat Sariyar
trainSupv
for training of classifiers,
classifyUnsup
for unsupervised classification.
# Split data into training and validation set, train and classify with rpart data(RLdata500) pairs=compare.dedup(RLdata500, identity=identity.RLdata500, blockfld=list(1,3,5,6,7)) l=splitData(pairs, prop=0.5, keep.mprop=TRUE) model=trainSupv(l$train, method="rpart", minsplit=5) result=classifySupv(model=model, newdata=l$valid) summary(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.