Opened 7 years ago
Closed 7 years ago
#3390 closed defect (fixed)
r.learn.ml crossvalidation fails if category map class codes increase more then +1
Reported by: | maitl | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.2.2 |
Component: | Addons | Version: | unspecified |
Keywords: | Cc: | ||
CPU: | All | Platform: | All |
Description
Crossvalidation fails if class ID values in category maps do not increase strictly by +1 i.e 1, 2, 3, 4, 5, 6 ... .
E.g. a cass code list 10, 11, 12, 13, 25, 26 is not handled properly.
The bug is here:
if mode == 'classification' and cv > np.histogram(
y, bins=len(np.unique(y)))[0].min():
The solution is to use
if mode == 'classification' and cv > np.histogram(
y, bins=np.unique(y))[0].min():
Attachments (1)
Change History (2)
by , 7 years ago
Attachment: | r.learn.ml added |
---|
comment:1 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for reporting this and providing the bug fix. This has been updated in the Add-Ons in #71358 and I'm closing the ticket.
Steve
Note:
See TracTickets
for help on using tickets.
r.learn.ml with bugfix example