'Check if a dataset has a valid feature set and labels.
Parameters
features: array-like {n_samples, n_features}
Feature matrix
target: array-like {n_samples}
List of class labels for prediction
Returns
None'

def _check_dataset(self, features, target):

    try:
        check_X_y(features, target, accept_sparse=False)
    except (AssertionError, ValueError):
        raise ValueError('Error:    Input    data    is    not    in    a    valid    format.    Please    confirm    that    the    input    data    is    scikit-learn    compatible.    For    example,    the    features    must    be    a    2-D    array    and    target    labels    must    be    a    1-D    array.')
