question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usability feature: add check for consistency between model & task

See original GitHub issue

Output 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:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
nicl-nnocommented, Oct 20, 2022

Тогда это явно не блокер для примеров, поэтому можно и потом порешать.

1reaction
aPovidlocommented, Oct 20, 2022

Действительно, а что ожидается получить от logit при регрессии? Классификация тоже не подходит, тк данные под регрессию. logit выдает вероятности для int-ов из колонки target – потому 136-размерный массив.

Кажется, что все в порядке. Разве что можно как-нибудь ловить несоответствие модели и задачи. И разве это уже где-то не проверятся?

Да, в режиме “вижу цель, не вижу преград” решил натравить logit на регрессию, а федот меня пропустил испугавшись моего порыва. Возможно, стоит добавить проверку несоответствия моделей и задачи.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found