label_import/label_importer.py
def reduce_label_value(label_value):
    """
    For binary classification, reduce the 7 labels to only 2.
    :param label_value: ILabelValue obj
    :return: ILabelValue obj of IN or OUT only
    """
    switcher = {
        lb.ILabelValue.MOVING_IN: lb.ILabelValue.IN,
        lb.ILabelValue.MOVING_OUT: lb.ILabelValue.IN,
        lb.ILabelValue.IN_BETWEEN: lb.ILabelValue.IN,
        lb.ILabelValue.EXIT: lb.ILabelValue.IN,
    }
    return switcher.get(label_value, label_value)

    For binary classification, reduce the 7 labels to only 2.
    :param label_value: ILabelValue obj
    :return: ILabelValue obj of IN or OUT only
    
For binary classification, reduce the 7 labels to only 2.
For binary classification reduce the 7 labels to only 2 .
def reduce_label_value(label_value):
    switcher = {
        lb.ILabelValue.MOVING_IN: lb.ILabelValue.IN,
        lb.ILabelValue.MOVING_OUT: lb.ILabelValue.IN,
        lb.ILabelValue.IN_BETWEEN: lb.ILabelValue.IN,
        lb.ILabelValue.EXIT: lb.ILabelValue.IN,
    }
    return switcher.get(label_value, label_value)
def reduce_label_value ( label_value ) : switcher = { lb . ILabelValue . MOVING_IN : lb . ILabelValue . IN , lb . ILabelValue . MOVING_OUT : lb . ILabelValue . IN , lb . ILabelValue . IN_BETWEEN : lb . ILabelValue . IN , lb . ILabelValue . EXIT : lb . ILabelValue . IN , } return switcher . get ( label_value , label_value )
For binary classification, reduce the 7 labels to only 2.
For binary classification reduce the 7 labels to only 2 .
"""
    For binary classification, reduce the 7 labels to only 2.
    :param label_value: ILabelValue obj
    :return: ILabelValue obj of IN or OUT only
    """
ILabelValue obj of IN or OUT only
ILabelValue obj of IN or OUT only
label_value
None