hanaml.CovarianceMatrix {hana.ml.r}R Documentation

Computes covariance matrix

Description

hanaml.CovarianceMatrix is a R wrapper for PAL Multivariate Analysis.

Usage

hanaml.CovarianceMatrix(conn.context, data, cols=NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

cols

list of characters, optional
Name of the columns to analyze.
If not given, it defaults to all columns

Details

Computes Covriance matrix between any two data samples (columns)

Value

covariance.matrix : Dataframe Dataframe containing the covariance between any two data samples(columns). structured as follows:

Examples

## Not run: 
> df
   X    Y    Z
1  1  2.4  5.1
2  5  3.5  6.2
3  3  8.9  8.3
4 10 -1.4  9.4
5 -4 -3.5 11.5
6 11 32.8 12.6

> hanaml.CovarianceMatrix(conn, data = df)
  ID        X         Y      Z
1  X 31.86667  44.47333  3.500
2  Y 44.47333 176.67767 17.957
3  Z  3.50000  17.95700  8.555

> hanaml.CovarianceMatrix(conn, data = df, cols = list('X', 'Y'))
  ID        X         Y
1  X 31.86667  44.47333
2  Y 44.47333 176.67767


## End(Not run)

[Package hana.ml.r version 1.0.8 Index]