🚀 Feature Proposal: Support for Feature Weights in Matching
Motivation
In the previous HypEx architecture, users had the ability to assign weights to features during matching. This allowed for more precise similarity calculations by emphasizing more critical variables. The new HypEx architecture currently lacks this feature, and restoring it would provide more flexibility and improved matching quality.
Feature Description
- Add support for feature-specific weights in the
Matching class.
- Users should be able to pass a dictionary
{feature_name: weight} to control the importance of different variables.
- Integrate weights into the distance calculation (e.g., Mahalanobis, L2 metrics).
- Ensure compatibility with all supported quality tests.
- Provide an easy-to-use API similar to the previous implementation.
Potential Impacts
- Performance Considerations: Weighted calculations may introduce additional computation time, especially with large datasets.
- Compatibility: Ensure that existing users can upgrade seamlessly without breaking changes.
- Dependencies: May require minor modifications to
FaissNearestNeighbors and MahalanobisDistance implementations.
Alternatives
- Instead of passing a dictionary, users could specify weights directly within the dataset role definitions.
- Offer predefined weight strategies (e.g., equal weights, importance-based weights).
Additional Context
This feature existed in HypEx before and was useful in experiments where certain variables played a more critical role in matching (e.g., matching based on demographic factors over less relevant attributes). Bringing it back would improve model flexibility.
Checklist
🚀 Feature Proposal: Support for Feature Weights in Matching
Motivation
In the previous HypEx architecture, users had the ability to assign weights to features during matching. This allowed for more precise similarity calculations by emphasizing more critical variables. The new HypEx architecture currently lacks this feature, and restoring it would provide more flexibility and improved matching quality.
Feature Description
Matchingclass.{feature_name: weight}to control the importance of different variables.Potential Impacts
FaissNearestNeighborsandMahalanobisDistanceimplementations.Alternatives
Additional Context
This feature existed in HypEx before and was useful in experiments where certain variables played a more critical role in matching (e.g., matching based on demographic factors over less relevant attributes). Bringing it back would improve model flexibility.
Checklist