Teradata Package for Python Function Reference | 17.10 - ScaleMap - 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.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
Product Category
Teradata Vantage

 
teradataml.analytics.mle.ScaleMap = class ScaleMap(builtins.object)
     Methods defined here:
__init__(self, data=None, input_columns=None, miss_value='KEEP', data_sequence_column=None, data_order_column=None)
DESCRIPTION:
    The ScaleMap function is designed for internal use only; its output
    is not intended for human interpretation. The ScaleMap function
    calculates and outputs statistical information for a data set at the
    vworker level. The output of the ScaleMap function is intended to be
    input to the functions Scale (which calculates scaled values for the
    data set) and ScaleSummary (which calculates global statistics for
    the data set).
 
 
PARAMETERS:
    data:
        Required Argument.
        Specifies the input teradataml DataFrame for which statistical information
        is to be calculated.
 
    data_order_column:
        Optional 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)
 
    input_columns:
        Required Argument.
        Specifies the input teradataml DataFrame columns that contain the
        attribute values of the samples. The attribute values must be numeric
        values between -1e308 and 1e308. If a value is outside this range,
        the function treats it as infinity.
        Types: str OR list of Strings (str)
 
    miss_value:
        Optional Argument.
        Specifies how the Scale, ScaleMap, and ScaleByPartition
        functions are to process NULL values in input:
            KEEP: Keep NULL values.
            OMIT: Ignore any row that has a NULL value.
            ZERO: Replace each NULL value with zero.
            LOCATION: Replace each NULL value with its location value.
        Default Value: "KEEP"
        Permitted Values: KEEP, OMIT, ZERO, LOCATION
        Types: str
 
    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)
 
RETURNS:
    Instance of ScaleMap.
    Output teradataml DataFrames can be accessed using attribute
    references, such as ScaleMap Obj.<attribute_name>.
    Output teradataml DataFrame attribute name is:
        result
 
 
RAISES:
    TeradataMlException
 
 
EXAMPLES:
    # Load example data.
    # The table 'scale_housing' contains house properties
    # like the number of bedrooms, lot size, the number of bathrooms, number of stories etc.
    load_example_data("scalemap", "scale_housing")
 
    # Create teradataml DataFrame objects.
    scale_housing = DataFrame.from_table("scale_housing")
 
    # Example 1 - This example calculates and outputs statistical information.
    scale_map_out = ScaleMap(data = scale_housing,
                             input_columns = ['price','lotsize','bedrooms','bathrms','stories'],
                             miss_value = "omit"
                            )
    # Print the result DataFrame
    print(scale_map_out)
__repr__(self)
Returns the string representation for a ScaleMap 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.