(X, time_delay, n_bins)
return mutual_information
Calculate the mutual information given the time delay.
Calculate the mutual information given the time delay.
Calculate the mutual information given the time delay .
def _mutual_information(X, time_delay, n_bins):
    """Calculate the mutual information given the time delay."""
    contingency = np.histogram2d(X[:-time_delay], X[time_delay:],
                                 bins=n_bins)[0]
    mutual_information = mutual_info_score(None, None,
                                           contingency=contingency)
    return mutual_information
def _mutual_information ( X , time_delay , n_bins ) : contingency = np . histogram2d ( X [ : - time_delay ] , X [ time_delay : ] , bins = n_bins ) [ 0 ] mutual_information = mutual_info_score ( None , None , contingency = contingency ) return mutual_information