CreateTestData: Create Test Data Points

Description Usage Arguments Value Author(s) Examples

View source: R/CreatTestData.R

Description

This function creates test data point by use of uniform distribution and dispersion, and then transform by the rotation matrix along coordinate axes.

Usage

1
CreateTestData(dims, N, disper, angles)

Arguments

dims

dimension of data points

N

Number of data points

disper

dispersion vector for each dimension

angles

angles vector for each dimension

Value

dims-by-N matrix with N data points and dims coordinates for each point (each column is one data point)

Author(s)

Zahra Rezaei

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
dims <- 100  # dimension of data points
N <- 5000     # Number of data points

# Define dispersion of data points
# disper is the vector with size dims.
# for each dimension we define different dispersion.
# we can either same amount of dispersion for each dimension.

disper1 <- rep(0.2,dims)
disper2 <- c(rep(0.2,30),rep(-0.2,40),rep(0.3,30))

# Define angles of data points
# angles is the vector of degrees with size dims
# angles vector creates transformation matrix
# definition of angles has same condition as dispersion.

angles1 <- rep(30,dims)
angles2 <- c(rep(30,30),rep(45,40),rep(-15,30))


data1 <- CreateTestData(dims, N, disper1, angles1)
data2 <- CreateTestData(dims, N, disper2, angles2)

ZahraSajjad/ElasticMap documentation built on July 26, 2020, 12:38 a.m.