def _generate_filepath(
        window_size, step, correlation_method, sequential, outdir, kind, **
        kwargs):
    """Computes a filepath for the reward csv file that allows us to identify
    the properties of the experiment.

    Args:
      window_size (int): Size of the sliding window
      step (int): Step of the sliding window
      correlation_method (string): One of 'pearson',
      sequential (bool): If the experiment is for the sequential or concurrent
      metrics data.
      outdir (string): Directory where to write the csv file
      kind (string): One of 'continous', 'top' or 'threshold'

    Returns:
      string: The filepath of the reward csv file
    """
    seq_or_con = 'seq' if sequential else 'con'
    if kind == 'top':
        kind += '_' + str(kwargs['L'])
    elif kind == 'threshold':
        kind += '_' + str(kwargs['threshold'])
    filepath = (
        "%s%s_rewards_w%d_s%d_%s_%s.csv" %
        (outdir, seq_or_con, window_size, step, correlation_method, kind))

    return filepath