(dat, skipDiscrete=False, skipContinuous=False)
return distributions
Get the distributions of all variables in the data.
Get the distributions of all variables in the data.
Get the distributions of all variables in the data .
def get_distributions(dat, skipDiscrete=False, skipContinuous=False):
    """Get the distributions of all variables in the data."""
    vars = dat.domain.variables
    if skipDiscrete:
        if skipContinuous:
            return []
        columns = [i for i, var in enumerate(vars) if var.is_continuous]
    elif skipContinuous:
        columns = [i for i, var in enumerate(vars) if var.is_discrete]
    else:
        columns = None
    try:
        dist_unks = dat._compute_distributions(columns)
        if columns is None:
            columns = np.arange(len(vars))
        distributions = []
        for col, (dist, unks) in zip(columns, dist_unks):
            distributions.append(get_distribution(dist, vars[col], unks))
    except NotImplementedError:
        if columns is None:
            columns = np.arange(len(vars))
        distributions = [get_distribution(dat, i) for i in columns]
    return distributions
def get_distributions ( dat , skipDiscrete = False , skipContinuous = False ) : vars = dat . domain . variables if skipDiscrete : if skipContinuous : return [ ] columns = [ i for i , var in enumerate ( vars ) if var . is_continuous ] elif skipContinuous : columns = [ i for i , var in enumerate ( vars ) if var . is_discrete ] else : columns = None try : dist_unks = dat . _compute_distributions ( columns ) if columns is None : columns = np . arange ( len ( vars ) ) distributions = [ ] for col , ( dist , unks ) in zip ( columns , dist_unks ) : distributions . append ( get_distribution ( dist , vars [ col ] , unks ) ) except NotImplementedError : if columns is None : columns = np . arange ( len ( vars ) ) distributions = [ get_distribution ( dat , i ) for i in columns ] return distributions