get_points {stream} | R Documentation |
Get Points from a Data Stream Generator
Description
Gets points from a DSD object.
Usage
get_points(x, ...)
## S3 method for class 'DSD'
get_points(x, n = 1L, info = TRUE, ...)
remove_info(points)
Arguments
x |
A DSD object. |
... |
Additional parameters to pass to the |
n |
integer; request up to |
info |
return additional columns with information about the data point (e.g., a known cluster assignment). |
points |
a data.frame with points. |
Details
Each DSD object has a unique way for creating/returning data points, but they all are
called through the generic function, get_points()
. This is done by
using the S3 class system. See the man page for the specific DSD class on
the semantics for each implementation of get_points()
.
Additional Point Information
Additional point information (e.g., known cluster/class assignment, noise status) can be requested
with info = TRUE
. This information is returned as additional columns. The column names start with
.
and are ignored by DST implementations. remove_info()
is a convenience function to remove the
information columns.
Examples are
-
.id
for point IDs -
.class
for known cluster/class labels used for plotting and evaluation -
.time
a time stamp for the point (can be in seconds or an index for ordering)
Resetting a Stream
Many streams can be reset using reset_stream()
.
Value
Returns a data.frame with (up to) n
rows and as many columns as x
produces.
Author(s)
Michael Hahsler
See Also
Other DSD:
DSD()
,
DSD_BarsAndGaussians()
,
DSD_Benchmark()
,
DSD_Cubes()
,
DSD_Gaussians()
,
DSD_MG()
,
DSD_Memory()
,
DSD_Mixture()
,
DSD_NULL()
,
DSD_ReadDB()
,
DSD_ReadStream()
,
DSD_Target()
,
DSD_UniformNoise()
,
DSD_mlbenchData()
,
DSD_mlbenchGenerator()
,
DSF()
,
animate_data()
,
close_stream()
,
plot.DSD()
,
reset_stream()
Examples
stream <- DSD_Gaussians()
points <- get_points(stream, n = 5)
points
remove_info(points)