Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - best_sampled_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 on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.hyperparameter_tuner.optimizer.RandomSearch.best_sampled_data_
DESCRIPTION:
    Returns the best sampled data used for training the best model.
    Note:
        "best_sampled_data_" is not supported for non-model trainer functions.
 
RETURNS:
    list of DataFrames.
 
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 best sampled data.
    >>> optimizer_obj.best_sampled_data_
        [{'data':       id  MedHouseVal    MedInc  HouseAge  AveRooms  AveBedrms  Population  AveOccup  Latitude  Longitude
        0   5233        0.955 -0.895906  0.680467 -0.387272  -0.202806   -0.125930  2.130214 -0.754303   0.653775
        1  10661        3.839  2.724825 -1.258313  0.876263  -1.142947   -0.751004 -0.187396 -0.878298   0.852744
        2  10966        1.896  0.057849  0.343287 -0.141762  -0.664624   -0.095545  0.588981 -0.829586   0.815727
        3   3687        1.741 -0.383816 -1.679787 -0.849458   0.108000    0.718354  1.083500 -0.630308   0.593621
        4   7114        2.187 -0.245392  0.258993  0.225092  -0.205781   -0.171508 -0.035650 -0.763160   0.755573
        5   5300        3.500 -0.955800 -1.005429 -1.548811  -0.130818    2.630473 -0.601956 -0.696734   0.556604
        6    686        1.578 -0.152084 -0.078186 -0.625426  -0.513581   -0.685892 -0.533101  0.906345  -1.141575
        7   9454        0.603 -1.109609 -0.499660  0.355748   0.379188   -0.364674 -0.356799  1.827451  -1.655193
        8   5202        1.000 -0.307539  1.101940 -0.379623  -0.570271   -0.141123  0.595366 -0.754303   0.635266
        9   5769        2.568 -0.413546  0.343287 -0.922324  -0.028824    1.165456  0.031374 -0.656879   0.626012}, 
        {'newdata':      id  MedHouseVal    MedInc  HouseAge  AveRooms  AveBedrms  Population  AveOccup  Latitude  Longitude
        0  1754        1.651 -0.026315  0.596172  0.454207  -0.027273    0.068320 -0.082765  1.017055  -1.234118
        1  3593        2.676  1.241775  0.090403  1.024283  -0.367626   -0.045626  0.252048 -0.621452   0.542722
        2  7581        1.334 -0.714880 -1.258313 -0.604140  -0.259612    3.058041  0.857406 -0.776445   0.658402
        3  8783        2.500 -0.170156  0.596172  0.163717   0.398242   -0.668529 -0.728130 -0.820729   0.621385
        4  5611        1.587 -0.712366 -0.415366 -1.275716   0.012960    0.860515  0.764870 -0.820729   0.639893
        5   244        1.117 -0.605796  1.101940 -0.160367   0.426668    1.022209  1.041018  0.946201  -1.187846}]