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

Adding compatibility check in GeoDA for neural network-based classifiers #2514

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VishalGawade1
Copy link

Description

This update addresses the compatibility issue between GeoDA and Scikit-learn's RandomForestClassifier. I added a check in the GeoDA constructor to ensure that it only runs with classifiers that include input_shape and channels_first attributes. When an incompatible model, like RandomForestClassifier, is used, the code now raises a ValueError.

Fixes #2493

Type of change

Please check all relevant options.

  • Improvement (non-breaking)
  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing

I added a unit test (test_geoda_incompatibility.py) that verifies the compatibility check by raising a ValueError when GeoDA is applied to a RandomForestClassifier. This test passed successfully.

Test Configuration:

  • OS: Windows 11
  • Python version: 3.12
  • ART version or commit number: 1.18.1
  • Scikit-learn version: 1.0.2

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • My changes have been tested using both CPU and GPU devices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant