Gets points from a DSD object.
get_points(x, ...)# S3 method for DSD
get_points(x, n = 1L, info = TRUE, ...)
remove_info(points)
Returns a data.frame with (up to) n
rows and as many columns as x
produces.
A DSD object.
Additional parameters to pass to the get_points()
implementations.
integer; request up to n
points from the stream. n = -1
returns
all remaining points from limited streams.
return additional columns with information about the data point (e.g., a known cluster assignment).
a data.frame with points.
Michael Hahsler
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()
.
Other 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()
,
DSD()
,
DSF()
,
animate_data()
,
close_stream()
,
plot.DSD()
,
reset_stream()
stream <- DSD_Gaussians()
points <- get_points(stream, n = 5)
points
remove_info(points)
Run the code above in your browser using DataLab