def split_data(df, percentage=0.8):
    """
    like train_test_split function in sklearn, it shuffles dataset randomly and return x_train, x_test, y_train, y_test
    :param df: dataset
    :param percentage: required percentage for training dataset and the rest of dataset will be assigned for testing
    :return: x_train, x_test, y_train, y_test
    """
    train = df.sample(frac=percentage)
    test = df.drop(train.index)
    x_train = train.iloc[:, 1:].values
    x_test = test.iloc[:, 1:].values
    y_train = train.iloc[:, 0:1].values
    y_test = test.iloc[:, 0:1].values

    return x_train, x_test, y_train, y_test