def read_data(data_file):
    """
    Reads in whitespace delimited data points
    of the form:
    2.345 0.87
    3.141 6.77
    where the last column is the dependent variable
    and all columns before are indepndent variables.

    param str data_file: path to training data
    returns: list of training data instances.
    rtype: list(list(float))
    """
    data = open(data_file).readlines()
    data = [x.strip() for x in data]
    data = [x.split() for x in data]
    data = [[float(attribute) for attribute in instance]
            for instance in data]
    return data