discopt.decomposition.learning.features#
Feature extraction and instance fingerprinting for learning.
Turns a StructureReport into the
scalar InstanceFeatures the
learners consume, and computes a stable fingerprint so re-solves of the same
instance group together in the store.
Functions#
|
Build |
|
Stable structural fingerprint of an instance. |
Module Contents#
- discopt.decomposition.learning.features.extract_features(report: discopt.decomposition.advisor.analyzer.StructureReport) discopt.decomposition.learning.record.InstanceFeatures#
Build
InstanceFeaturesfrom a structure report (no extra passes).
- discopt.decomposition.learning.features.fingerprint(report: discopt.decomposition.advisor.analyzer.StructureReport) str#
Stable structural fingerprint of an instance.
Hashes the structural summary (sizes, integer fraction, coupling density, block counts, nonlinearity) rounded to avoid float jitter. Two instances with the same structure share a fingerprint even if variable names differ, so re-solves and near-duplicates group together.