@classmethod
def generate_and_download(cls, filename, n_samples, features, target='y',
    noise=10, random_state=0):
    """
        Generates a random dataset for a linear regression model as a pandas dataframe and downloads it as csv.
        :param filename: the name of the file created as output
        :param n_samples: number of samples in the generated dataframe
        :param features: the name of each feature as a list of str
        :param target: the name of the target (as str)
        :param noise:
        :param random_state: for replication of the experiment
        :return: The coefficients array
        """
    df, coef = cls.generate_df(n_samples, features, target, noise, random_state
        )
    df.to_csv(filename, index=False, sep='\t')
    return coef
