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

add optional argument to predict/score functions to avoid covering #59

Merged
merged 6 commits into from
Apr 23, 2023

Conversation

rpreen
Copy link
Member

@rpreen rpreen commented Apr 22, 2023

Python xcs.predict() now takes an optional argument that specifies the value to return for a sample that results in an empty match set instead of invoking covering.

Example for y_dim=1

pred = xcs.predict(X_test, cover=[0.5])

Same for xcs.score()

Example for y_dim=2

error = xcs.score(X_val, y_val, cover=[0.1, 0.5])

@codecov
Copy link

codecov bot commented Apr 22, 2023

Codecov Report

Merging #59 (5e13973) into master (dcd843f) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
- Coverage   18.83%   18.82%   -0.02%     
==========================================
  Files          62       62              
  Lines        8783     8788       +5     
  Branches     1058     1060       +2     
==========================================
  Hits         1654     1654              
- Misses       7129     7134       +5     
Impacted Files Coverage Δ
xcsf/clset.c 0.00% <0.00%> (ø)
xcsf/xcs_rl.c 0.00% <0.00%> (ø)
xcsf/xcs_supervised.c 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rpreen rpreen changed the title add optional argument to predict function to avoid covering add optional argument to predict/score functions to avoid covering Apr 23, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@rpreen rpreen merged commit d8352c5 into master Apr 23, 2023
@rpreen rpreen deleted the 58_optional_predict_cover_behaviour branch April 23, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performing xcs.predict(X) alters the model when it should not (supervised learning)
1 participant