UStatisticDimension#
Use this estimator to explore compact-kernel means across prescribed bandwidth and sample-size scales. It is a global, finite-candidate estimate and uses a seeded sample ordering.
Warning
Accuracy validation covers nine specified low-dimensional benchmark configurations. Individual fits can still be inaccurate, and higher-dimensional limitations remain. Successful computation and reproducible output do not certify dimension recovery. See the validation ledger, including the original failed panel and the prospective accuracy study.
import numpy as np
from believe14.estimation import UStatisticDimension
from _example_data import flat_data
X = flat_data(intrinsic_dimension=3)
model = UStatisticDimension(max_dimension=5, random_state=14).fit(X)
replay = UStatisticDimension(max_dimension=5, random_state=14).fit(X)
assert model.dimension_ == replay.dimension_
assert np.array_equal(model.sample_order_, replay.sample_order_)
assert not hasattr(model, "transform") and not hasattr(model, "predict")
{
"dimension": model.dimension_,
"candidate_dimensions": model.candidate_dimensions_.tolist(),
"bandwidth_factors": np.round(model.bandwidth_factors_, 3).tolist(),
"weighted_slope_residual": model.diagnostics_.residual_norm,
"warnings": model.diagnostics_.warnings,
}
{'dimension': 2.0,
'candidate_dimensions': [1, 2, 3, 4, 5],
'bandwidth_factors': [[1.0, 1.676, 2.229, 2.703, 3.174],
[1.0, 1.295, 1.493, 1.644, 1.781],
[1.0, 1.188, 1.306, 1.393, 1.47],
[1.0, 1.138, 1.222, 1.282, 1.335],
[1.0, 1.109, 1.174, 1.22, 1.26]],
'weighted_slope_residual': 0.4255652519471855,
'warnings': ('Finite-sample accuracy: dimension estimates can be inaccurate; consult the validation ledger for tested configurations and uncertainty.',)}
kernel_means_, log_u_statistics_, slopes_, and sample_order_ make the
search reproducible. Diagnostics report the winning slope-fit mismatch. Results
can be sensitive to sample size, boundaries, and candidate ceiling; the class
does not manufacture prediction or transformation semantics.
Primary reference: [Hein and Audibert, 2005].