ecdf_estimator
|
Functions | |
def | empirical_cumulative_distribution_vector (distance_list, bins) |
Create list of ECDF values. More... | |
def | create_distance_matrix (dataset_list, distance_fct, start_index_list=None, end_index_list=None) |
Assemble list of (generalized) distances between elemenst of datasets. More... | |
def | empirical_cumulative_distribution_vector_list (dataset, bins, distance_fct, subset_indices, compare_all=True) |
Assemble ecdf vector, whose elements are list of values for all subset combinations. More... | |
def | empirical_cumulative_distribution_vector_list_bootstrap (dataset, bins, distance_fct, n_elements_a, n_elements_b, n_samples) |
Same as empirical_cumulative_distribution_vector_list, but for bootstrapping. More... | |
def | mean_of_ecdf_vectors (ecdf_vector_list) |
Vector of means of the ecdf vectors. More... | |
def | covariance_of_ecdf_vectors (ecdf_vector_list) |
Covariance matrix of ecdf vectors. More... | |
def | evaluate (estimator, dataset) |
Evaluate target/objective/cost function associated to estimator type from dataset. More... | |
def | evaluate_from_empirical_cumulative_distribution_functions (estimator, vector) |
Evaluate target/objective/cost function associated to estimator type from ecdf vector. More... | |
def ecdf_estimator.utils.covariance_of_ecdf_vectors | ( | ecdf_vector_list | ) |
Covariance matrix of ecdf vectors.
ecdf_list | Usually the result of empirical_cumulative_distribution_vector_list. |
ecdf_covar | Covariance matrix associated to the ecdf vectors. |
def ecdf_estimator.utils.create_distance_matrix | ( | dataset_list, | |
distance_fct, | |||
start_index_list = None , |
|||
end_index_list = None |
|||
) |
Assemble list of (generalized) distances between elemenst of datasets.
This function creates a list of distances between elements of subsets which are compared to each other. The amount of subsets compared to each other is defined by the number of arguments in the distance function. The distances of all value combinations of these subsets are computed.
dataset_list | The list of datasets which are compared to each other. |
distance_fct | Generalized distance function among several datasets. |
start_index_list | Starting indices of the datasets. Defaults to None. |
end_index_list | Ending indices of the datasets. Defaults to None. |
distance_mat | Matrix of generalized distances. |
def ecdf_estimator.utils.empirical_cumulative_distribution_vector | ( | distance_list, | |
bins | |||
) |
Create list of ECDF values.
This function creates the empirical cumulative distribution functions from a list of distances and a list of bin values. That is, each element of the resulting list tells how many elements of the distance list are smaller than the respective bin value.
distance_list | List of distances to be grouped into the bins. |
bins | List of bins. |
ecdf_list | Resulting list of amout of distances that are smaller than resp. bins. |
def ecdf_estimator.utils.empirical_cumulative_distribution_vector_list | ( | dataset, | |
bins, | |||
distance_fct, | |||
subset_indices, | |||
compare_all = True |
|||
) |
Assemble ecdf vector, whose elements are list of values for all subset combinations.
This function assembles a list of ecdf vectors for all possible combinations of subsets of the dataset. Importantly, none of the subsets are compared to themselves. The subset combinations and their indexes are chosen. Then, the distances are computed by create_distance_matrix function and added to a matrix.
The first dimension of the result refers to the index of the bin / ecdf vector. The second index of the result refers to the subset combination.
dataset | Whole dataset, whose subset are compared to one another. |
bins | List of bins. |
distance_fct | Function generating a generalized distance between members of dataset. |
subset_indices | List of starting (and ending) indices of disjointly subdivided dataset. |
compare_all | If False, only subsets of different sizes are compared. Deafault: True |
ecdf_list | ecdf vector enlisting values for subset combinations. |
def ecdf_estimator.utils.empirical_cumulative_distribution_vector_list_bootstrap | ( | dataset, | |
bins, | |||
distance_fct, | |||
n_elements_a, | |||
n_elements_b, | |||
n_samples | |||
) |
Same as empirical_cumulative_distribution_vector_list, but for bootstrapping.
dataset | Dataset, whose elements are compared to one another. |
n_elements_a | Number of elements in first (smaller) subset. |
n_elements_b | Number of elements in second (larger) subset. |
bins | List of bins. |
distance_fct | Function generating a generalized distance between members of dataset. |
n_samples | Number of perturbatins of the datasets. |
ecdf_list | ecdf vector enlisting values for subset combinations. |
def ecdf_estimator.utils.evaluate | ( | estimator, | |
dataset | |||
) |
Evaluate target/objective/cost function associated to estimator type from dataset.
Evaluate the negative log-likelihood in the way that is characterized by the estimator.
estimator | The estimator class defining the specifics of the target function. |
dataset | The dataset with respect to which the target function is evaluated. |
target_val | The value of the target function. |
def ecdf_estimator.utils.evaluate_from_empirical_cumulative_distribution_functions | ( | estimator, | |
vector | |||
) |
Evaluate target/objective/cost function associated to estimator type from ecdf vector.
Evaluate the negative log-likelihood in the way that is characterized by the estimator.
estimator | The estimator class defining the specifics of the target function. |
ecdf_vector | The vector of ecdf, which is the argument for the target function. |
target_val | The value of the target function. |
def ecdf_estimator.utils.mean_of_ecdf_vectors | ( | ecdf_vector_list | ) |
Vector of means of the ecdf vectors.
ecdf_list | Usually the result of empirical_cumulative_distribution_vector_list. |
ecdf_means | Element-wise mean values of the ecdf vectors. |