anhaidgroup / deepmatcher

Python package for performing Entity and Text Matching using Deep Learning.
BSD 3-Clause "New" or "Revised" License
555 stars 129 forks source link

Way to specify the weights to the features #61

Open SubrahmanyaG opened 4 years ago

SubrahmanyaG commented 4 years ago

I m using deepmatcher for product matching. I can across a scenario where I want to give different weightage to different features. Ex: I have 5 columns(A, B, C, D, E) in each set left and right. I want to give more importance to Column A and B than rest. is there any way in deepmatcher? something like a weightage vector [0.4, 0.2, 0.1, 0.1 0.1, 0.1]

SubrahmanyaG commented 4 years ago

Please suggest me any workaround to this issue.

sidharthms commented 4 years ago

The model should learn which features are most important from your data. If you want the model to learn more expressive representations for feature A & B, then a simple strategy is to repeat the features you think are important - e.g. instead of (A, B, C, D, E), you would do (A, A, A, A, B, B, C, D, E) - this will make the model assign more parameters for the important features.