fix: add y param and fix n_features_in_ for sklearn compatibility#3364
fix: add y param and fix n_features_in_ for sklearn compatibility#3364Famous077 wants to merge 4 commits into
Conversation
DARHWOLF
left a comment
There was a problem hiding this comment.
- Please refer to my comment regarding the use of comments.
- may I request you to share how you debugged this issue.
|
Hi @DARHWOLF , In this issue, Two specific sklearn checks were failing, In supervised learning, y label which is compare against predictions which was missing on score() function, due to which we are getting TypeError. another one is n_feature_in_ is set properly in def fit() function, but missing in def score() one. So, I add same line in def score() to prevent mismatches later. Because this functions tells sklearn how many features the model was trained on. lastly why I commented those line, these 2 checks failure are expected ones. So, whenever these checks get failed rather than produce warning those commented line were meant to be sent. So, I was verifying without those everything works perfectly or not, and as a result everything was working perfectly and all tests were passed. Love to take feedback, if I made any mistakes. |
|
Hi @ankurankan @DARHWOLF , Could you please review this PR whenever you have time. |
|
This PR has had no activity for 21 days and is now marked as stale. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #3364 +/- ##
=======================================
Coverage 95.84% 95.85%
=======================================
Files 578 578
Lines 32652 32653 +1
=======================================
+ Hits 31295 31299 +4
+ Misses 1357 1354 -3
|
The following checklist is mandatory
Your PR will be closed if you remove the checklist. Use of LLMs is strictly forbidden for any part of this checklist (including for improving language), and will result in a ban if we find any use of LLMs.
Your checklist for this pull request
If you have used AI/LLMs for any assistance, please answer the following questions. Please refer #2622 for an example of the level of detail we expect:
Have you reviewed our AI usage policy?
Are you able to fully explain your changes? We expect you to fully understand the algorithm and take full responsibility for any changes in this PR.
Please describe in detail how and what you used AI assistance for? Please outline your whole workflow with the AI tool.
I'm beginner in this org. So, I most used AI for understand the codebase easily with simple analogy, and also for understand issue. what type of issue is this , what are the problems that are occuring due to this issue.
What steps have you taken to verify that the changes correctly address the issue? What edge cases have you considered? Other than running tests, what else have you verified?
I used pytest module to verify that the changes correctly address the issue. I haven't faced any edge cases situation. Haven't verify anything else than running tests.
No, I didn't generate any AI test. I used pytest module to verify after changes everything is working correctly or not.
Issue number(s) that this pull request fixes
check_n_features_in_after_fittingfail for causal discovery estimators #3139List of changes to the codebase in this pull request