initTarget: To initialize target, hierarchical correlation algorithm.

Description Usage Arguments Details Value Author(s) Examples

View source: R/initTarget.R

Description

To initialize target, hierarchical correlation algorithm. It checks if target is valid, if not, it initializes the target

Usage

1
initTarget(target, data)

Arguments

target

is a numeric vector, a matrix or a data frame.

data

is a data frame with the main data.

Details

This function is part of the hierarchical correlation method. The function initializes target and checks if it is a valid target.

The function transforms the target into a matrix. Then, it checks if the target has only one row and the same columns has the main data.

If it is not a valid target, the function will notice the problem and will initialized a new target with every column with value 0.

Value

A cluster.

Author(s)

Roberto Alcántara roberto.alcantara@edu.uah.es

Juan José Cuadrado jjcg@uah.es

Universidad de Alcalá de Henares

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data <- matrix(c(1,2,1,4,5,1,8,2,9,6,3,5,8,5,4),ncol= 3)

dataFrame <- data.frame(data)

target1 <- matrix(c(2,3))

target2 <- matrix(c(2,3,6))

initTarget(target1,dataFrame)

initTarget(target2,dataFrame)

LearnClust documentation built on Nov. 30, 2020, 1:09 a.m.