Usability feature: add check for consistency between model & task
See original GitHub issueOutput of 'logit'
is 2-dim array and it cause error while trying get metrics.
Error message:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2021.3.1\plugins\python\helpers\pydev\pydevd.py", line 1483, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2021.3.1\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/andre/Documents/GitHub/FEDOT/temp.py", line 197, in <module>
repeat_logit_prediction()
File "C:/Users/andre/Documents/GitHub/FEDOT/temp.py", line 191, in repeat_logit_prediction
metrics_result = model.get_metrics(metric_names=['rmse', 'mae', 'r2'])
File "C:\Users\andre\Documents\GitHub\FEDOT\fedot\api\main.py", line 380, in get_metrics
metric_value = abs(metric_cls.metric(reference=real,
File "C:\Users\andre\Documents\GitHub\FEDOT\fedot\core\composer\metrics.py", line 150, in metric
return mean_squared_error(y_true=reference.target,
File "C:\Users\andre\Documents\GitHub\FEDOT\venv\lib\site-packages\sklearn\metrics\_regression.py", line 442, in mean_squared_error
y_type, y_true, y_pred, multioutput = _check_reg_targets(
File "C:\Users\andre\Documents\GitHub\FEDOT\venv\lib\site-packages\sklearn\metrics\_regression.py", line 111, in _check_reg_targets
raise ValueError(
ValueError: y_true and y_pred have different number of output (1!=136)
Script for repeating the bug:
data_path = f'{fedot_project_root()}/cases/data/cholesterol/cholesterol.csv'
data = InputData.from_csv(data_path,
task=Task(TaskTypesEnum.regression))
train, test = train_test_data_setup(data)
problem = 'regression'
model = Fedot(
problem=problem,
metric='mae',
logging_level=logging.DEBUG,
)
model.fit(features=train, predefined_model='logit')
prediction = model.predict(features=test)
Issue Analytics
- State:
- Created a year ago
- Comments:6
Top Results From Across the Web
How to Build Consistency into your Usability Study
A usability study is an essential part of good design for products and applications. Look to maintain consistency throughout the process.
Read more >Maintain Consistency and Adhere to Standards (Usability ...
To be easy to learn and use, systems should adhere to both internal and external consistency — they should use the same patterns...
Read more >Conducting Usability Testing: a case of just following the ...
In the previous post, we talked about how to design effective user testing tasks to evaluate the usability of an interface.
Read more >Design principle: Consistency
Consistent design is intuitive design. It is highly useful and makes the world a better place. In short, usability and learnability improve when...
Read more >Writing a website usability testing script - GitLab
A test script: Helps to make sure you will be covering what you set out to cover.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Тогда это явно не блокер для примеров, поэтому можно и потом порешать.
Да, в режиме “вижу цель, не вижу преград” решил натравить logit на регрессию, а федот меня пропустил испугавшись моего порыва. Возможно, стоит добавить проверку несоответствия моделей и задачи.