def read_data(file_path='data.txt', verbose=False):
    """
    params:
    - file_path: path to file that contains data (default: 'data.txt')
    - verbose: whether to print information (default: False)

    return: a tuple that consists of the following:
    - n: number of data instances
    - m: number of features of each data instance
    - data: a list of tuple, where each tuple is a data instance
    """
    n, m, data = 0, 0, []

    with open(file_path, 'r') as input_file:
        line = input_file.readline().strip('\n')
        n, m = map(int, line.split(','))

        if verbose:
            print(f'number of data instances: {n}')
            print(f'number of features of each data instance: {m}')
        
        for _ in range(n):
            line = input_file.readline().strip('\n')
            data_instance = tuple(map(float, line.split(' ')))
            data.append(data_instance)

        if verbose:
            print('data:', data)

    return n, m, data