initTarget {LearnClust}R Documentation

To initialize target, hierarchical correlation algorithm.

Description

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

Usage

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


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)


[Package LearnClust version 1.1 Index]