Teradata Package for Python Function Reference | 20.00 - get_input_data - 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 - 20.00

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00.00.03
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-19
dita:id
TeradataPython_FxRef_Enterprise_2000
lifecycle
latest
Product Category
Teradata Vantage
teradataml.hyperparameter_tuner.optimizer.RandomSearch.get_input_data = get_input_data(self, data_id)
DESCRIPTION:
    Function to get the input data used by model trainer functions.
    Unique identifiers (data_id) is used to get the training data.
    In case of unlabeled data such as single dataframe or tuple of 
    dataframe, default unique identifiers are assigned. Hence, unlabeled
    training data is retrieved using default unique identifiers.
    Notes:
        * Function only returns input data for model trainer functions.
        * Train and Test sampled data are returned for supervised 
          model trainer function (evaluatable functions).
        * Train data is returned for unsupervised-model trainer function 
          (non-evaluatable functions).
 
PARAMETERS:
    data_id:
        Required Argument.
        Specifies the unique data identifier used for model training.
        Types: str
 
RETURNS:
    teradataml DataFrame
 
RAISES:
    ValueError
 
EXAMPLES:
    >>> # Create an instance of the search algorithm called "optimizer_obj" 
    >>> # by referring "__init__()" method.
    >>> # Perform "fit()" method on the optimizer_obj to populate model records.
    >>> # Retrieve the training data.
    >>> optimizer_obj.get_input_data(data_id="DF_1")
        [{'data':       id  MedHouseVal    MedInc  HouseAge  AveRooms  AveBedrms  Population  AveOccup  Latitude  Longitude
        0  19789        0.660 -1.154291 -0.668250  0.862203   7.021803   -1.389101 -1.106515  2.367716  -1.710719
        1  17768        1.601 -0.447350 -0.162481 -0.431952  -0.156872    2.436223  2.172854  0.755780  -1.016640
        2  19722        0.675 -0.076848  1.439120  1.805547   1.944759   -1.186169  0.326739  1.459894  -0.974996
        3  18022        3.719  1.029892  0.343287  0.635952  -0.480133   -0.914869 -0.160824  0.711496  -1.067540
        4  15749        3.500 -0.182247  1.776299 -0.364226   0.035715   -0.257239 -0.970166  0.941772  -1.294272
        5  11246        2.028 -0.294581 -0.583955 -0.265916  -0.270654    0.182266 -0.703494 -0.807444   0.764827
        6  16736        3.152  0.943735  1.439120 -0.747066  -1.036053   -1.071138 -0.678411  0.906345  -1.234118
        7  12242        0.775 -1.076758 -0.752545 -0.424517   0.460470    0.742228 -0.597809 -0.838443   1.241428
        8  14365        2.442 -0.704218  1.017646 -0.428965  -0.367301   -1.014707 -1.333045 -1.294568   1.121121
        9  18760        1.283  0.019018 -1.258313  0.754993   0.013994    0.094365  0.222254  2.195008  -1.201728}, 
        {'newdata':       id  MedHouseVal    MedInc  HouseAge  AveRooms  AveBedrms  Population  AveOccup  Latitude  Longitude
        0  16102        2.841  0.206284  1.270530 -0.248620  -0.224210   -0.059733 -0.242386  0.937344  -1.317408
        1  15994        3.586  0.306050  1.439120  0.255448  -0.334613   -0.160657 -0.426510  0.937344  -1.303526
        2  15391        2.541  0.423107 -1.595492  0.951807  -0.061005    1.955480  0.517572 -1.055434   1.236801
        3  18799        0.520 -0.677565 -0.415366  0.548756   1.254406   -0.883398 -0.534060  2.358859  -1.035149
        4  19172        1.964  0.247152 -0.162481  0.428766  -0.427459   -0.175849 -0.451380  1.238475  -1.396070
        5  18164        3.674  0.295345 -1.258313 -1.078181   0.175885    0.045531 -1.298667  0.760208  -1.099930
        6  13312        1.598  0.484475 -1.342608  0.767557  -0.229585    0.113899  0.361520 -0.692306   0.949915
        7  12342        1.590 -0.520029 -0.246776  0.973345   1.407755    2.325532 -0.406887 -0.798587   1.445024}]