predict | R Documentation |
predict()
for data stream mining tasks DST.
## S3 method for class 'DST'
predict(object, newdata, ...)
## S3 method for class 'DSC'
predict(
object,
newdata,
type = c("auto", "micro", "macro"),
method = "auto",
...
)
object |
The DST object. |
newdata |
The points to make predictions for as a data.frame. |
... |
Additional arguments are passed on. |
type |
Use micro- or macro-clusters in DSC for assignment. |
method |
assignment method
|
A data.frame with columns containing the predictions. The columns depend on the type of the data stream mining task.
Michael Hahsler
Other DST:
DSAggregate()
,
DSC()
,
DSClassifier()
,
DSOutlier()
,
DSRegressor()
,
DST()
,
DST_SlidingWindow()
,
DST_WriteStream()
,
evaluate
,
stream_pipeline
,
update()
Other DSC:
DSC()
,
DSC_Macro()
,
DSC_Micro()
,
DSC_R()
,
DSC_SlidingWindow()
,
DSC_Static()
,
DSC_TwoStage()
,
animate_cluster()
,
evaluate.DSC
,
get_assignment()
,
plot.DSC()
,
prune_clusters()
,
read_saveDSC
,
recluster()
set.seed(1500)
stream <- DSD_Gaussians(k = 3, d = 2, noise = .1)
dbstream <- DSC_DBSTREAM(r = .1)
update(dbstream, stream, n = 100)
plot(dbstream, stream, type = "both")
# find the assignment for the next 100 points to
# micro-clusters in dsc. This uses the model's assignment function
points <- get_points(stream, n = 10)
points
pr <- predict(dbstream, points, type = "macro")
pr
# Note that the clusters are labeled in arbitrary order. Check the
# agreement.
agreement(pr[,".class"], points[,".class"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.