aimclub / FEDOT

Automated modeling and machine learning framework FEDOT
https://fedot.readthedocs.io
BSD 3-Clause "New" or "Revised" License
619 stars 84 forks source link

Fix multitarget stratification #1308

Closed DRMPN closed 19 hours ago

DRMPN commented 2 days ago

This is a 🐛 bug fix.

Summary

Disable multitarget stratification when classes are unbalanced. Add test for this specific scenario.

Context

Fixes #1307

docu-mentor[bot] commented 2 days ago

👋 Hi, I'm @docu-mentor, an LLM-powered GitHub app powered by Anyscale Endpoints that gives you actionable feedback on your writing.

Simply create a new comment in this PR that says:

@docu-mentor run

and I will start my analysis. I only look at what you changed in this PR. If you only want me to look at specific files or folders, you can specify them like this:

@docu-mentor run doc/ README.md

In this example, I'll have a look at all files contained in the "doc/" folder and the file "README.md". All good? Let's get started!

pep8speaks commented 2 days ago

Hello @DRMPN! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-07-02 08:45:21 UTC
github-actions[bot] commented 2 days ago

All PEP8 errors has been fixed, thanks :heart:

Comment last updated at
DRMPN commented 2 days ago

Метод внутри пакета sklearn в train_test_split() выполняет one hot encode и превращает изначальные 7 классов в 11:

image

Вследствие появления "новых" классов, их количества не хватает для стратификации, из-за чего появляется ошибка. Предлагаю превентивно производить проверку и отключать стратификацию.

DRMPN commented 2 days ago

/fix-pep8

Lopa10ko commented 19 hours ago

/fix-pep8