ecdf_estimator
Functions
ecdf_estimator.utils Namespace Reference

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...
 

Function Documentation

◆ covariance_of_ecdf_vectors()

def ecdf_estimator.utils.covariance_of_ecdf_vectors (   ecdf_vector_list)

Covariance matrix of ecdf vectors.

Parameters
ecdf_listUsually the result of empirical_cumulative_distribution_vector_list.
Return values
ecdf_covarCovariance matrix associated to the ecdf vectors.

◆ create_distance_matrix()

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.

Parameters
dataset_listThe list of datasets which are compared to each other.
distance_fctGeneralized distance function among several datasets.
start_index_listStarting indices of the datasets. Defaults to None.
end_index_listEnding indices of the datasets. Defaults to None.
Return values
distance_matMatrix of generalized distances.

◆ empirical_cumulative_distribution_vector()

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.

Parameters
distance_listList of distances to be grouped into the bins.
binsList of bins.
Return values
ecdf_listResulting list of amout of distances that are smaller than resp. bins.

◆ empirical_cumulative_distribution_vector_list()

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.

Parameters
datasetWhole dataset, whose subset are compared to one another.
binsList of bins.
distance_fctFunction generating a generalized distance between members of dataset.
subset_indicesList of starting (and ending) indices of disjointly subdivided dataset.
compare_allIf False, only subsets of different sizes are compared. Deafault: True
Return values
ecdf_listecdf vector enlisting values for subset combinations.
Here is the call graph for this function:

◆ empirical_cumulative_distribution_vector_list_bootstrap()

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.

Parameters
datasetDataset, whose elements are compared to one another.
n_elements_aNumber of elements in first (smaller) subset.
n_elements_bNumber of elements in second (larger) subset.
binsList of bins.
distance_fctFunction generating a generalized distance between members of dataset.
n_samplesNumber of perturbatins of the datasets.
Return values
ecdf_listecdf vector enlisting values for subset combinations.
Here is the call graph for this function:

◆ evaluate()

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.

Parameters
estimatorThe estimator class defining the specifics of the target function.
datasetThe dataset with respect to which the target function is evaluated.
Return values
target_valThe value of the target function.

◆ evaluate_from_empirical_cumulative_distribution_functions()

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.

Parameters
estimatorThe estimator class defining the specifics of the target function.
ecdf_vectorThe vector of ecdf, which is the argument for the target function.
Return values
target_valThe value of the target function.

◆ mean_of_ecdf_vectors()

def ecdf_estimator.utils.mean_of_ecdf_vectors (   ecdf_vector_list)

Vector of means of the ecdf vectors.

Parameters
ecdf_listUsually the result of empirical_cumulative_distribution_vector_list.
Return values
ecdf_meansElement-wise mean values of the ecdf vectors.