You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix SAR model to accept integer type for userId and itemId
Fixes#2274
Update SAR model to accept `userId` and `itemId` as integer types (`LongType`).
* **SAR.scala**
- Update `calculateUserItemAffinities` method to handle `userId` and `itemId` as `LongType`.
- Update `calculateItemItemSimilarity` method to handle `userId` and `itemId` as `LongType`.
* **test_ranking.py**
- Add test case `test_adapter_evaluator_sar_with_long` to verify `userId` and `itemId` as `LongType`.
* **Smart Adaptive Recommendations.md**
- Update documentation to reflect that `userId` and `itemId` can be of `LongType`.
---
For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/SynapseML/issues/2274?shareId=XXXX-XXXX-XXXX-XXXX).
Clearly, the first term (highlighted) has the highest contribution to the score. We can say that "The algorithm recommends Item 4 to User 1 because it's similar to Item 1, to which User 1 has high affinity". A message like this can be displayed automatically for each recommendation.
183
+
184
+
## Data Types
185
+
186
+
The SAR model accepts `userId` and `itemId` as integer types (`LongType`). This allows for more efficient storage and processing of the data. Ensure that the `userId` and `itemId` columns in your dataset are of `LongType` before fitting the model.
0 commit comments