CausataData: Creates an object of class CausataData for scoring in...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Used for creating an object of class CausataData for scoring in Causata. This is essentially a dataframe with modeling data and a list of objects of class CausataVariable. Note that the variable names in the data frame must match

Usage

1
CausataData(dataframe, dependent.variable=NULL, query=NULL)

Arguments

dataframe

A data frame containing independent variables for modeling.

dependent.variable

An array of dependent variable values, or the name of a column in the data frame that will be used as the dependent variable. If NULL then dataframe must have a column named dependent.variable.

query

An optional Query object that can be stored with the data.

Details

A CausataData object is a container for objects from the CausataVariable class. The CausataData object is passed into ToPMML to create a PMML representation of a model.

Note that column names in the dataframe have to follow Causata naming conventions so that they can be matched to variables in Causata when scoring. See RToCausataNames for details. Columns that do not follow conventions will remain in the data frame, but will not have a corresponding CausataVariable generated.

The dependent variable name is set depending on the dependent.variable argument:

Value

CausataData returns an object of class CausataData. The object has the following fields:

df

The dataframe. If there is not a column for the dependent variable then it is added.

variableList

A list of variables of class CausataVariable.

dvName

The name of the dependent variable.

skippedVariables

Variables in df with names that don't meet naming conventions and do not have corresponding CausataVariable objects.

query

The object passed in through the query argument is stored here.

GetQuery returns the query object.

Author(s)

Justin Hemann <[email protected]>

See Also

CausataVariable, ToPmml, Query, RToCausataNames.

Examples

1
2
df <- data.frame(f1__AP=factor(c("a","b",NA)), f2__AP=factor(c("x","y",NA)))
causataData <- CausataData(df, rep(0,nrow(df)))

Causata documentation built on May 2, 2019, 3:26 a.m.