Description Usage Arguments Details Value Author(s) References See Also Examples
Generates a functional dataset for 2-6 clusters.
1 2 3 4 5 6 7 |
obsNr |
Number of curves. |
k |
Number of classes. |
timeNr |
Number of time points for regular datasets in Format2 (see |
timeNrMax |
Maximal number of time points for irregular datasets in Format1 (see |
timeNrMin |
Minimal number of time points for irregular dataset in Format1 (see |
timeInterval |
Time interval where time points are drawn from. |
nrGridPts |
Time interval is divided into nrGridPts grid points where time points are randomly drawn from. |
sd |
Standard deviation from the center curves. |
reg |
Regular dataset in Format2 or irregular dataset in Format1 (see |
object |
An object of class |
... |
Not used. |
Curves are generated by adding a normally distributed error term with mean 0 and standard deviation sd to the center functions. The center functions are sampled from
x^2
√{x}
sin(2*π*x)
x^3
-x^2
x-1
If reg
=TRUE
all curves are
evaluated on the same time points. If reg
=FALSE
evaluation place
and number can differ for each curve.
[sampleFuncy]
A list with entries data
and clusters
.
[Cluster] Retrieve vector of cluster assignments
[Data] Retrieve matrix of dataset
Christina Yassouridis
Christina Yassouridis and Dominik Ernst and Friedrich Leisch. Generalization, Combination and Extension of Functional Clustering Algorithms: The R Package funcy. Journal of Statistical Software. 85 (9). 1–25. 2018
1 2 3 4 5 6 7 8 9 | ##sample a regular dataset
set.seed(2705)
ds <- sampleFuncy(obsNr=100, k=4, timeNr=20, reg=TRUE)
plotFuncy(ds)
##sample an irregular dataset
set.seed(2705)
ds <- sampleFuncy(obsNr=100, k=4, timeNrMin=3, timeNrMax=10, reg=FALSE)
plotFuncy(ds, lty=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.