install.packages("stream")
library(stream, quietly = TRUE)
set.seed(100)
gaussian.stream <- DSD_Gaussians(k = 3, d = 3, noise = .01)
gaussian.stream
data <- get_points(gaussian.stream, n = 100, class = TRUE)
head(data)
library(plotly)
p <- plot_ly(data, x = ~X1, y = ~X2, z = ~X3, color = ~class) %>%
add_markers() %>%
layout(scene = list(xaxis = list(title = 'X1'),
yaxis = list(title = 'X2'),
zaxis = list(title = 'X3')))
p
# Drift generators
drift.stream <- DSD_MG(dim = 2)
cluster.1 <- MGC_Linear(dim = 2)
add_keyframe(cluster.1, time=1, dens=50, par=5, center=c(0,0))
add_keyframe(cluster.1, time=20, dens=50, par=5, center=c(50,50))
add_keyframe(cluster.1, time=40,dens=50, par=5, center=c(50,100))
add_cluster(drift.stream,cluster.1)
drift.stream
data <- get_points(drift.stream, n = 1000)
plot_ly(data, x = ~X1, y= ~X2) %>% add_markers() %>% layout(title = 'time around 1')
drift.stream
data...