Skip to content

Fix the group-wise control risk and KNN prediction indices#54

Merged
MatteoGiomi merged 2 commits intostatice:mainfrom
itrajanovska:fix_Knn_index_Group_wise_index
Mar 27, 2026
Merged

Fix the group-wise control risk and KNN prediction indices#54
MatteoGiomi merged 2 commits intostatice:mainfrom
itrajanovska:fix_Knn_index_Group_wise_index

Conversation

@itrajanovska
Copy link
Copy Markdown
Contributor

With this PR we fix an issue in the group-wise inference risks, where we did not filter the targets for the current group only.

Additionally, we noticed an inconsistent index in the predictions of the KNN inference model, and therefore we aligned the indices of the predictions with those of the input samples. There is also a test for this fix.

Align the prediction indices with the input indices in KNNInferencePredictor::predict.
Copy link
Copy Markdown
Member

@MatteoGiomi MatteoGiomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of these bugs @itrajanovska! I left two small comments. Now I'll try to fix the build.

Use pd.testing.assert_index_equal instead of list comparison.
Copy link
Copy Markdown
Member

@MatteoGiomi MatteoGiomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I'll merge it. Thanks a lot!

@MatteoGiomi MatteoGiomi merged commit 1a69cf8 into statice:main Mar 27, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants