Teradata Package for Python Function Reference - VarMax - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference

Product
Teradata Package for Python
Release Number
17.00
Published
November 2021
Language
English (United States)
Last Update
2021-11-19
lifecycle
previous
Product Category
Teradata Vantage

 
teradataml.analytics.mle.VarMax = class VarMax(builtins.object)
     Methods defined here:
__init__(self, data=None, response_columns=None, exogenous_columns=None, partition_columns=None, orders=None, seasonal_orders=None, period=None, exogenous_order=None, lag=0, include_mean=False, max_iter_num=100, step_ahead=None, method='SSE', data_orders=None, include_drift=False, order_p=None, order_d=None, order_q=None, seasonal_order_p=None, seasonal_order_d=None, seasonal_order_q=None, data_sequence_column=None, data_orders_sequence_column=None, data_partition_column='1', data_orders_partition_column='1', data_order_column=None, data_orders_order_column=None)
DESCRIPTION:
    VarMax (Vector Autoregressive Moving Average model with eXogenous
    variables) extends the ARMA/ARIMA model in two ways.
 
 
PARAMETERS:
    data:
        Required Argument.
        The teradataml DataFrame that stores the input sequence.
 
    data_partition_column:
        Optional Argument.
        Specifies Partition By columns for data.
        Values to this argument can be provided as a list, if multiple columns
        are used for partition.
        Default Value: 1
        Types: str OR list of Strings (str)
 
    data_order_column:
        Required Argument.
        Specifies Order By columns for data.
        Values to this argument can be provided as a list, if multiple columns
        are used for ordering.
        Types: str OR list of Strings (str)
 
    response_columns:
        Required Argument.
        Specifies the columns containing the response data. Null values are
        acceptable at the end of the series. If step_ahead is specified, the
        function will report predicted values for the missing values, taking
        into account values from the predictor columns for those time periods.
        Types: str OR list of Strings (str)
 
    exogenous_columns:
        Optional Argument.
        Specifies the columns containing the independent (exogenous)
        predictors. If not specified, the model will be calculated without
        exogenous vectors.
        Types: str OR list of Strings (str)
 
    partition_columns:
        Optional Argument.
        Specifies the partition columns that will be passed to the output. If
        not specified, the output will not contain partition columns.
        Types: str OR list of Strings (str)
 
    orders:
        Optional Argument.
        Specifies the parameters p, d, q for VarMax model. This argument
        consists of 3 non-negative int values separated by commas. The p and q
        must be an integer between 0 and 10, inclusive. The d must be between
        0 and 1, inclusive.
        Types: str
 
    seasonal_orders:
        Optional Argument.
        Specifies seasonal parameters sp, sd, sq for VarMax model. This argument
        consists of 3 non-negative integer values separated by commas. The sp
        and sq must be an integer between 0 and 10, inclusive. The sd must be
        between 0 and 3, inclusive. If not specified, the model will be
        treated as a non-seasonal model. If the seasonal_orders argument is
        used, the period argument should also be present.
        Types: str
 
    period:
        Optional Argument.
        Specifies the period of each season. Must be a positive integer
        value. If the period argument is used, the seasonal_orders argument
        must also be present. If not specified, the model will be treated as
        a non-seasonal model.
        Types: int
 
    exogenous_order:
        Optional Argument.
        Specifies the order of exogenous variables. If the current time is t
        and exogenous_order isb, the following values of the exogenous time
        series will be used in calculating the response: Xt Xt-1 ... Xt-b+1.
        If not specified, the model will be calculated without exogenous
        vectors.
        Types: int
 
    lag:
        Optional Argument.
        Specifies the lag in the effect of the exogenous variables on the
        response variables. For example, if lag = 3, and exogenous_order is
        b, Yi will be predicted based on Xi-3 to Xi-b-2.
        Default Value: 0
        Types: int
 
    include_mean:
        Optional Argument.
        Specifies whether mean vector of the response data series (constant c
        in the formula) is added in the VarMax model.
        Note: If this argument is True, the difference parameters d (in the orders
              argument) and sd (in the seasonal_orders argument) should be 0.
        Default Value: False
        Types: bool
 
    max_iter_num:
        Optional Argument.
        A positive integer value. The maximum number of iterations performed.
        Default Value: 100
        Types: int
 
    step_ahead:
        Optional Argument.
        A positive integer value. The number of steps to forecast after the
        end of the time series. If not provided, no forecast values are
        calculated.
        Types: int
 
    method:
        Optional Argument.
        Specifies the method for fitting the model parameters: SSE (Default):
        Sum of squared error. ML: Maximum likelihood
        Default Value: "SSE"
        Permitted Values: SSE, ML
        Types: str
 
    data_orders:
        Optional Argument.
        It is the output teradataml DataFrame from TimeSeriesParameters.
 
    data_orders_partition_column:
        Optional Argument.
        Specifies Partition By columns for data_orders.
        Values to this argument can be provided as a list, if multiple columns
        are used for partition.
        Default Value: 1
        Types: str OR list of Strings (str)
 
    data_orders_order_column:
        Optional Argument.
        Specifies Order By columns for data_orders.
        Values to this argument can be provided as a list, if multiple
        columns are used for ordering.
        Types: str OR list of Strings (str)
 
    include_drift:
        Optional Argument.
        Specifies whether drift term is included in the VarMax model.
        Note: This argument can only be True when d is non-zero and less than 2.
        Default Value: False
        Types: bool
 
    order_p:
        Optional Argument.
        The p value of the non-seasonal order parameter. The p value must be
        an integer between 0 and 10, inclusive.
        Note: "order_p" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    order_d:
        Optional Argument.
        The d value of the non-seasonal order parameter. The d value must be
        an integer between 0 and 1, inclusive.
        Note: "order_d" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    order_q:
        Optional Argument.
        The q value of the non-seasonal order parameter. The q value must be
        an integer between 0 and 10, inclusive.
        Note: "order_q" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    seasonal_order_p:
        Optional Argument.
        The sp value of the seasonal order parameter. The sp value must be an
        integer between 0 and 10, inclusive.
        Note: "seasonal_order_p" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    seasonal_order_d:
        Optional Argument.
        The sd value of the seasonal order parameter. The sd value must be an
        integer between 0 and 3, inclusive.
        Note: "seasonal_order_d" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    seasonal_order_q:
        Optional Argument.
        The sq value of the seasonal order parameter. The sq value must be an
        integer between 0 and 10, inclusive.
        Note: "seasonal_order_q" argument support is only available
              when teradataml is connected to Vantage 1.1 or later.
        Types: int
 
    data_sequence_column:
        Optional Argument.
        Specifies the list of column(s) that uniquely identifies each row of
        the input argument "data". The argument is used to ensure
        deterministic results for functions which produce results that vary
        from run to run.
        Types: str OR list of Strings (str)
 
    data_orders_sequence_column:
        Optional Argument.
        Specifies the list of column(s) that uniquely identifies each row of
        the input argument "data_orders". The argument is used to ensure
        deterministic results for functions which produce results that vary
        from run to run.
        Types: str OR list of Strings (str)
 
RETURNS:
    Instance of VarMax.
    Output teradataml DataFrames can be accessed using attribute
    references, such as VarMaxObj.<attribute_name>.
    Output teradataml DataFrame attribute name is:
        result
 
 
RAISES:
    TeradataMlException
 
 
EXAMPLES:
    # Load the data to run the example.
    load_example_data("VarMax",["finance_data3","orders_ex"])
 
    # Create teradataml DataFrame objects.
    finance_data3 = DataFrame.from_table("finance_data3")
    orders_ex = DataFrame.from_table("orders_ex")
 
    # Example 1 -
    varmax_out1 = VarMax(data = finance_data3,
                         data_partition_column = ["id"],
                         data_order_column = ["period"],
                         response_columns = ["expenditure","income","investment"],
                         partition_columns = ["id"],
                         orders = "1,1,1",
                         include_mean = False,
                         step_ahead = 3
                         )
    # Print the results.
    print(varmax_out1.result)
 
    # Example 2 -
    varmax_out2 = VarMax(data = finance_data3,
                         data_partition_column = ["id"],
                         data_order_column = ["period"],
                         response_columns = ["expenditure"],
                         exogenous_columns = ["income","investment"],
                         partition_columns = ["id"],
                         orders = "1,1,1",
                         exogenous_order = 3,
                         lag = 3,
                         include_mean = False,
                         step_ahead = 3
                         )
    # Print the results.
    print(varmax_out2.result)
 
    # Example 3 -
    varmax_out3 = VarMax(data = finance_data3,
                         data_partition_column = ["id"],
                         data_order_column = ["period"],
                         response_columns = ["expenditure"],
                         exogenous_columns = ["income","investment"],
                         partition_columns = ["id"],
                         orders = "1,1,1",
                         seasonal_orders = "1,0,0",
                         period = 4,
                         exogenous_order = 3,
                         lag = 3,
                         include_mean = False,
                         step_ahead = 3
                         )
    # Print the results.
    print(varmax_out3.result)
 
    # Example 4 -
    varmax_out4 = VarMax(data = finance_data3,
                         data_partition_column = ["id"],
                         data_order_column = ["period"],
                         response_columns = ["expenditure"],
                         partition_columns = ["id"],
                         max_iter_num = 1000,
                         method = "ML",
                         data_orders = orders_ex,
                         data_orders_partition_column = ["id"]
                         )
    # Print the results.
    print(varmax_out4.result)
__repr__(self)
Returns the string representation for a VarMax class instance.
get_build_time(self)
Function to return the build time of the algorithm in seconds.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
get_prediction_type(self)
Function to return the Prediction type of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
get_target_column(self)
Function to return the Target Column of the algorithm.
When model object is created using retrieve_model(), then the value returned is
as saved in the Model Catalog.
show_query(self)
Function to return the underlying SQL query.
When model object is created using retrieve_model(), then None is returned.