Learn R Programming

Causata (version 4.2-0)

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

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

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.

Value

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

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:

  • If a name is provided then that is used.
  • If a vector of data is provided then the name attribute of the vector will be used. If the name attribute is not set then the default name of "dependent.variable" will be used.

See Also

CausataVariable, ToPmml, Query, RToCausataNames.

Examples

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

Run the code above in your browser using DataLab