BDM.MinimalInformationLoss (BDM v0.5.0)
View SourceFeature selection and dimension reduction methods based on minimizing loss of algorithmic information, such that the estimated Kolmogorov complexity of the reduced object remains as close as possible to that of the original. The goal is to preserve causal/structural information, not just statistical regularities.
Summary
Functions
Compute baseline complexity of a binary matrix.
Score each feature based on the change in the object’s estimated algorithmic information content after the removal of the feature.
Reduce a matrix to k features using greedy selection.
Greedy feature selection. Iteratively removing the feature with the
smallest delta until k remain.
Functions
@spec complexity(BDM.t(), BDM.binary_matrix()) :: float()
Compute baseline complexity of a binary matrix.
By default we use a 2D BDM configured for binary matrices.
@spec feature_scores(BDM.t(), BDM.binary_matrix()) :: [map()]
Score each feature based on the change in the object’s estimated algorithmic information content after the removal of the feature.
Returns a list of maps:
[%{idx: 0, delta: 1.23, base: 10.0, removed: 8.77}, ...]delta = base - removed (non-negative in most cases).
@spec reduce_dimensions(BDM.t(), BDM.binary_matrix(), pos_integer()) :: %{ history: [map()], kept: [integer()], reduced: list() }
Reduce a matrix to k features using greedy selection.
Returns %{kept: [...], reduced: rows_k, history: [...]}.
@spec select_features(BDM.t(), BDM.binary_matrix(), pos_integer()) :: {[integer()], [map()]}
Greedy feature selection. Iteratively removing the feature with the
smallest delta until k remain.
Returns {kept_indices, history} where history logs each removal.