The data module
The data module contains the Data class.
Such a class inherits from all other classes defined in the package and as such it provides a convenient container of all the algorithms implemented in Dadapy.
- class data.Data(coordinates=None, distances=None, maxk=None, verbose=False, n_jobs=2, working_memory=1024)[source]
Data class.
- return_ids_kstar_binomial(initial_id=None, n_iter=5, Dthr=23.92812698, r=None, plot_mv=False, k_bootstrap=1)[source]
Return the id estimates of the binomial algorithm coupled with the kstar estimation of the scale.
- Parameters:
initial_id (float) – initial estimate of the id default uses 2NN
n_iter (int) – number of iteration
Dthr (float) – threshold value for the kstar test
r (float, default=None) – parameter of binomial estimator, 0 < r < 1. If None, the optimal, adaptive one is used
plot_mv (bool, default=False) – if True, plots the observed and the theoretical distributions
- Returns:
ids (np.ndarray(float)) – intrinsic dimension across iterations
ids_err (np.ndarray(float)) – intrinsic dimension error across iterations
kstars (np.ndarray(int) – arrays of kstars across iterations
p-values (np.ndarray(float)) – p-values from model validation across iterations
- return_ids_kstar_gride(initial_id=None, n_iter=5, Dthr=23.92812698, d0=0.001, d1=1000, eps=1e-07)[source]
Return the id estimates of the Gride algorithm coupled with the kstar estimation of the scale.
- Parameters:
initial_id – initial estimate of the id default uses 2NN
n_iter – number of iteration
Dthr – threshold value for the kstar test
d0 – minimum id value
d1 – maximum id value
eps – threshold for the convergence of the Gride algorithm
- Returns:
ids, ids_err, kstars, log_likelihoods