FLRegrDataPrep: Convert Wide Table to Deep Table in database.

Description Usage Arguments Value Examples

Description

The DB Lytix function called is FLRegrDataPrep. In DB Lytix, data mining functions such as linear regression, logistic regression, Generalized Linear Model (GLM), etc. are performed using stored procedures on a deep table. However, in most situations, the input data is usually stored in wide tables containing multiple columns. The stored procedure FLRegrDataPrep facilitates the conversion of contents stored in wide tables or views to deep tables and also prepares the data for regression analysis.

Usage

1
FLRegrDataPrep(object, depCol = "NULL", ...)

Arguments

object

FLTable object or FLTableMD (if input table has multiple datasets or groups).

DepCol

Name of the column in the wide table which represents the dependent variable

CatToDummy

Transform categorical variables to numerical values either using dummy variables or by using Empirical Logit.

PerformNorm

Perform standardization of data. Standardization is done if the value of this parameter is 1.

PerformVarReduc

Perform variable reduction.Elimination means that the corresponding column is not transformed from the wide format to the deep format. Variables with standard deviation below the specified threshold are eliminated. Similarly, if a pair of columns has correlation above the specified threshold, one of the columns is not transformed.

MakeDataSparse

Make data sparse i.e., only store non-zero values in the deep table for the independent variables. The column values for those observations that are zero are not stored in the deep table. However, for the dependent variable and the intercept, zero values are stored in the deep table.

MinStdDev

Minimum acceptable standard deviation for elimination of variables. Any variable that has a standard deviation below this threshold is eliminated. This parameter is only consequential if the parameter PerformVarReduc = 1.

MaxCorrel

Maximum acceptable absolute correlation between a pair of columns for eliminating variables. If the absolute value of the correlation exceeds this threshold, one of the columns is not transformed. Again, this parameter is only consequential if the parameter PerformVarReduc = 1.

TrainOrTest

if 0 => Create training data set; if 1 => Create test data set using the transformation that has already been done for a prior training data set.

InAnalysisID

provided in case we want to re-run the transformation of a training data set or run the transformation of a testing data set else this value is NULL.

ExcludeCols

character vector specifying columns to be excluded from conversion

ClassSpec

list representing Class specification which identifies then value of the categorical variable to be used a reference

WhereClause

character vector giving where conditions if any to reference the wide table

OutDeepTable

name to be given to the output deep table, possibly including database

OutObsIDCol

name to give to the primary key column name of the output deep table

OutVarIDCol

name to give to the varibales name column of the output deep table

OutValueCol

name to give to the value column of the output deep table

Value

FLRegrDataPrep returns a FLTableDeep referencing the deep table, the original table and AnalysisID giving the AnalysisID of conversion

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Case: when widetable is of class FLTable.
widetable  <- FLTable(getTestTableName("tblAbaloneWide"), 
                     "ObsID", whereconditions= "ObsID <101")
deeptable <- FLRegrDataPrep(widetable,"Diameter")
analysisID <- deeptable@wideToDeepAnalysisID 

# Case: when widetable is of class FLTableMD.
widetableMD <- FLTableMD(getTestTableName("tblAutoMPGMD"),
                     group_id_colname="GroupID",
                     obs_id_colname="ObsID",
                    group_id = c(2,4))
deeptableMD <- FLRegrDataPrep(widetableMD,"Acceleration")
analysisID <- deeptableMD@wideToDeepAnalysisID

Fuzzy-Logix/AdapteR documentation built on May 6, 2019, 5:07 p.m.