Expand description
Information density — weight raw uncertainty by how representative a point is, so the query strategy is not lured into labelling unrepresentative outliers (which are uncertain but teach the model little about the bulk of the data).
density_i = uncertainty_i · ( mean_j similarity(i, j) )^β. With β = 0 this
reduces to plain uncertainty; larger β favours points in dense regions.
Functions§
- cosine_
similarity - Cosine similarity of two equal-length feature vectors, in
[-1, 1]. Zero vectors have undefined direction → similarity0. - information_
density - Information-density scores:
uncertainty_i · representativeness_i^β. Lengths ofuncertaintyandfeaturesmust match. Representativeness is clamped to≥ 0before exponentiation (negative mean-similarity points get no density bonus). - rank_
by_ density - Rank pool indices by information density, most-informative first.
- representativeness
- Mean representativeness of each point: the average similarity of point
ito all other points in the pool.featuresisn_samples × n_features.