get_envrdata: Construction of the data for the co-clustering procedures

Description Usage Arguments Value Examples

View source: R/rcoclust.R

Description

Function which takes as en entry a matrix A_ijx in a sparse format for the rows, and adds in a variable of type environment: the data vectors in format coordinate list for the columns while aggregating the number of rows (n), columns (d), non null elements in total (nnz), per rows (nnzi) and per columns (nnzj), plus the name and the true labels (lbs) of the corresponding dataset.

Usage

1

Arguments

A_ijx

an object of class matrix with three columns corresponding to the format called coordinate list (COO) (row, column, value).

lbs

integer vector with the true class labels for the rows.

name

char array with the name of the dataset.

datacol

integer with value 0 or 1 if it is added the three vectors for the column-wise data.

Value

As a result an object of class environment which contains the data for the co-clustering procedures.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  library(Rcoclust);
  
  #load data
  data(data_cstr);
  
  #library(Matrix); 
  #A = sparseMatrix(i=A_ijx[,1]+1,j=A_ijx[,2]+1,
  #                  x=A_ijx[,3]);
  envrdata = get_envrdata(A_ijx,lbs,name,1);
  
  #retrieve matrix size and number of classes
  n=envrdata$n;
  d=envrdata$d;
  g=length(unique(envrdata$lbs));

Rcoclust documentation built on May 6, 2017, 3:34 a.m.