ValidationResult - Attributes#

This example demonstrates the basic attributes of the ValidationResults object.

Installation

# To install the required package, use the following command:
# !pip install modeva

Authentication

# To get authentication, use the following command: (To get full access please replace the token to your own token)
# from modeva.utils.authenticate import authenticate
# authenticate(auth_code='eaaa4301-b140-484c-8e93-f9f633c8bacb')

Imports

from modeva import DataSet

Load and prepare data

ds = DataSet()
ds.load(name="BikeSharing")

Generate results

result = ds.eda_correlation(features=('hr',
                                      'season',
                                      'hum',
                                      'temp',
                                      'atemp',
                                      'holiday'),
                            dataset="main", method="pearson", sample_size=10000)

Attributes#

Note that not all the attributes are used for a single test result. In this example, only key, data, table, and options are specified.

print(result.__doc__)
A class to handle validation results and plotting functionality.

    This class stores validation data and provides methods to plot and save figures
    using the mocharts library.

    Attributes
    ----------
    key : str
        Name of the validation result
    data : str, default=None
        Data used in the validation
    model : str, default=None
        Model used in the validation
    inputs : dict, default=None
        Input arguments used in the validation
    value : any, default=None
        Detailed validation result values
    table : pd.DataFrame or dict of pd.DataFrame, default=None
        Table data associated with the validation
    func : any, default=None
        Function used in the validation
    options : dict, default=None
        Plotting options and configurations

Attributes - key

result.key
'data_eda_correlation'

Attributes - data

result.data
'BikeSharing'

Attributes - table

result.table
hr season hum temp atemp holiday
hr 1.0000 0.0007 -0.2760 0.1404 0.1354 0.0002
season 0.0007 1.0000 0.0613 0.1888 0.1846 0.0517
hum -0.2760 0.0613 1.0000 -0.0726 -0.0540 0.0034
temp 0.1404 0.1888 -0.0726 1.0000 0.9881 0.0020
atemp 0.1354 0.1846 -0.0540 0.9881 1.0000 0.0026
holiday 0.0002 0.0517 0.0034 0.0020 0.0026 1.0000


Attributes - options

result.options
{'chart_id': None, 'link_id': None, 'figname': '', 'title': {'show': True, 'text': 'Correlation Heatmap', 'link': '', 'target': 'blank', 'textStyle': {'fontStyle': 'normal', 'fontWeight': 'bolder', 'fontFamily': 'sans-serif', 'fontSize': 15, 'textBorderType': 'solid', 'textShadowColor': 'transparent', 'overflow': 'none', 'ellipsis': '...'}, 'subtext': '', 'sublink': '', 'subtarget': 'blank', 'textAlign': 'center', 'textVerticalAlign': 'auto', 'padding': 0, 'itemGap': 10, 'z': 2, 'left': '50.0%', 'top': '5%', 'right': 'auto', 'bottom': 'auto', 'backgroundColor': 'transparent', 'borderColor': '#ccc', 'changed_name_key': {'id_': 'id'}}, 'grid': {'show': True, 'width': 'auto', 'height': 'auto', 'z': 2, 'left': '5%', 'top': '10%', 'right': '10%', 'bottom': '5%', 'borderColor': '#ccc', 'borderWidth': 1, 'containLabel': True, 'backgroundColor': 'transparent', 'changed_name_key': {'id_': 'id'}}, 'legend': None, 'brush': None, 'yAxis': [{'show': True, 'data': ['hr', 'season', 'hum', 'temp', 'atemp', 'holiday'], 'type': 'category', 'position': 'bottom', 'name': '', 'nameLocation': 'center', 'nameTextStyle': {'color': '#747475', 'fontStyle': 'normal', 'fontWeight': 'normal', 'fontFamily': 'sans-serif', 'fontSize': 12, 'backgroundColor': '', 'borderType': 'solid', 'shadowColor': 'transparent', 'textBorderType': 'solid', 'textShadowColor': 'transparent', 'overflow': 'none', 'ellipsis': '...'}, 'nameGap': 'auto', 'inverse': True, 'splitNumber': 5, 'logBase': 10, 'axisLine': {}, 'axisTick': {'show': True, 'alignWithLabel': 'none', 'interval': 'auto', 'length': 5}, 'axisLabel': {'show': True, 'margin': 8, 'showMinLabel': True, 'fontStyle': 'normal', 'fontWeight': 'normal', 'fontFamily': 'sans-serif', 'fontSize': 12, 'backgroundColor': 'transparent', 'borderType': 'solid', 'shadowColor': 'transparent', 'textBorderType': 'solid', 'textShadowColor': 'transparent', 'overflow': 'none', 'ellipsis': '...', 'width': 40.0}, 'splitLine': {'show': True, 'interval': 'auto'}, 'splitArea': {'show': False, 'interval': 'auto'}, 'axisPointer': {'show': False}, 'dimension': '2d', 'ignored': False, 'changed_name_key': {'min_': 'min', 'max_': 'max', 'type_': 'type', 'name_': 'name'}}], 'xAxis': [{'show': True, 'data': ['hr', 'season', 'hum', 'temp', 'atemp', 'holiday'], 'type': 'category', 'position': 'bottom', 'name': '', 'nameLocation': 'center', 'nameTextStyle': {'color': '#747475', 'fontStyle': 'normal', 'fontWeight': 'normal', 'fontFamily': 'sans-serif', 'fontSize': 12, 'backgroundColor': '', 'borderType': 'solid', 'shadowColor': 'transparent', 'textBorderType': 'solid', 'textShadowColor': 'transparent', 'overflow': 'none', 'ellipsis': '...'}, 'nameGap': 30, 'splitNumber': 5, 'logBase': 10, 'axisLine': {}, 'axisTick': {'show': True, 'alignWithLabel': 'none', 'interval': 'auto', 'length': 5}, 'axisLabel': {'show': True, 'rotate': 90, 'margin': 8, 'showMinLabel': True, 'fontStyle': 'normal', 'fontWeight': 'normal', 'fontFamily': 'sans-serif', 'fontSize': 12, 'backgroundColor': 'transparent', 'borderType': 'solid', 'shadowColor': 'transparent', 'textBorderType': 'solid', 'textShadowColor': 'transparent', 'overflow': 'none', 'ellipsis': '...', 'width': 48.0}, 'splitLine': {'show': True, 'interval': 'auto'}, 'splitArea': {'show': False, 'interval': 'auto'}, 'axisPointer': {'show': False}, 'dimension': '2d', 'ignored': False, 'changed_name_key': {'min_': 'min', 'max_': 'max', 'type_': 'type', 'name_': 'name'}}], 'parallelAxis': None, 'series': [{'type': 'heatmap', 'name': 'heatmap', 'colorBy': 'series', 'z': 2, 'legendHoverLink': True, 'stackStrategy': 'samesign', 'cursor': 'pointer', 'clip': True, 'label': {'show': False, 'fontSize': 12}, 'seriesLayoutBy': 'column', 'data': [[0, 0, 1.0], [0, 1, 0.0007069232358482019], [0, 2, -0.27604510845035524], [0, 3, 0.14035251191539191], [0, 4, 0.13541995570654827], [0, 5, 0.00021112504082323335], [1, 0, 0.0007069232358482019], [1, 1, 1.0], [1, 2, 0.06129566246677624], [1, 3, 0.1887635938666557], [1, 4, 0.18458366509258792], [1, 5, 0.05168332976549405], [2, 0, -0.27604510845035524], [2, 1, 0.06129566246677624], [2, 2, 1.0], [2, 3, -0.07256868277920407], [2, 4, -0.05400321268524999], [2, 5, 0.0033984293947358856], [3, 0, 0.14035251191539191], [3, 1, 0.1887635938666557], [3, 2, -0.07256868277920407], [3, 3, 1.0], [3, 4, 0.9881131988260086], [3, 5, 0.002041522022738862], [4, 0, 0.13541995570654827], [4, 1, 0.18458366509258792], [4, 2, -0.05400321268524999], [4, 3, 0.9881131988260086], [4, 4, 1.0], [4, 5, 0.0025790630388779416], [5, 0, 0.00021112504082323335], [5, 1, 0.05168332976549405], [5, 2, 0.0033984293947358856], [5, 3, 0.002041522022738862], [5, 4, 0.0025790630388779416], [5, 5, 1.0]], 'animation': True, 'animationThreshold': 2000, 'animationDuration': 1000, 'animationEasing': 'cubicOut', 'animationDurationUpdate': 300, 'animationEasingUpdate': 'cubicOut', 'coordinateSystem': 'cartesian2d', 'pointSize': 20, 'blurSize': 10, 'maxOpacity': 1, 'progressive': 400, 'progressiveThreshold': 3000, 'colsize': 1, 'visualmap_type': 'continuous', 'map_range': (-0.27604510845035524, 1.0), 'row_names': ['hr', 'season', 'hum', 'temp', 'atemp', 'holiday'], 'col_names': ['hr', 'season', 'hum', 'temp', 'atemp', 'holiday']}], 'visualMap': {'show': True, 'type': 'continuous', 'color': ['#440154', '#481467', '#482576', '#453781', '#404688', '#39558c', '#33638d', '#2d718e', '#287d8e', '#238a8d', '#1f968b', '#20a386', '#29af7f', '#3dbc74', '#56c667', '#75d054', '#95d840', '#bade28', '#dde318', '#fde725'], 'left': 'auto', 'top': '10%', 'right': '1%', 'bottom': 'auto', 'min': -0.27604510845035524, 'max': 1.0, 'calculable': True, 'realtime': True, 'precision': 1, 'itemWidth': 20, 'itemHeight': 140, 'align': 'auto', 'textGap': 10, 'hoverLink': True, 'z': 4, 'padding': 0, 'backgroundColor': 'rgba(0,0,0,0)', 'borderColor': '#ccc', 'textStyle': {'fontSize': 12, 'width': 35, 'overflow': 'none', 'ellipsis': '..'}, 'indicatorSize': '50%', 'orient': 'vertical', 'changed_name_key': {'id_': 'id', 'type_': 'type', 'min_': 'min', 'max_': 'max', 'range_': 'range'}}, 'toolbox': {'show': True, 'orient': 'horizontal', 'itemSize': 15, 'itemGap': 8, 'showTitle': True, 'feature': {'dataZoom': {}, 'saveAsImage': {}}, 'z': 2, 'left': 'auto', 'top': 'auto', 'right': '1%', 'bottom': 'auto', 'width': 'auto', 'height': 'auto', 'popup': True, 'changed_name_key': {'id_': 'id'}}, 'tooltip': {'show': True, 'custom_tooltip': False, 'trigger': 'item', 'axisPointer': {'show': True}, 'showContent': True, 'triggerOn': 'mousemove|click', 'hideDelay': 100, 'enterable': True, 'renderMode': 'html', 'confine': True, 'transitionDuration': 0.4, 'precision': 4, 'borderColor': '#333', 'padding': 5, 'order': 'seriesAsc'}, 'dataZoom': None, 'event': None, 'graphic': None, 'radar': None, 'figsize': {'height': 600, 'width': 800}, 'color': ['#1f77b4', '#ff7f0e', '#2ca02c', '#e377c2', '#9467bd', '#d62728', '#8c564b', '#bcbd22', '#17becf', '#7f7f7f'], 'save_img': False, 'auto_size': True, 'style': {'overflow': 'auto'}}

Total running time of the script: (0 minutes 1.068 seconds)

Gallery generated by Sphinx-Gallery