Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support for Feature Weights in Matching #156

Open
5 tasks done
tikhomirovd opened this issue Mar 6, 2025 · 0 comments
Open
5 tasks done

[FEATURE] Support for Feature Weights in Matching #156

tikhomirovd opened this issue Mar 6, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@tikhomirovd
Copy link
Collaborator

tikhomirovd commented Mar 6, 2025

🚀 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

  • I have clearly described the feature.
  • I have outlined the motivation for the proposal.
  • I have provided a detailed description of the feature.
  • I have discussed potential impacts and alternatives.
  • I have added any additional context or screenshots.
@tikhomirovd tikhomirovd added the enhancement New feature or request label Mar 6, 2025
@tikhomirovd tikhomirovd added this to the 1.0.1 milestone Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants