# ROC Curve Bug

**URL:** <https://forum.knime.com/t/roc-curve-bug/68005>\
**Category:** KNIME Analytics Platform\
**Tags:** bug\
**Created:** [June 2, 2023, 1:33am UTC](https://forum.knime.com/t/roc-curve-bug/68005 "2023-06-02T01:33:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaeHwanChoi](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/j/3ab097/32.png) [@JaeHwanChoi](https://forum.knime.com/u/JaeHwanChoi)\
**Post date:** [June 2, 2023, 1:33am UTC](https://forum.knime.com/t/roc-curve-bug/68005/1 "2023-06-02T01:33:55Z")

</div>

Hello.

I am using ROC Curve nodes on my server to create interactive views (KNIME version is 4.7.1).

Sometimes when I run that workflow, the ROC Curve doesn’t work - it doesn’t get a red light, it gets stuck at a yellow light. The error message is “reason unknown” and we don’t know why.

What could be the problem?

Thank you.

---

<div class="post-metadata">

**Author:** ![aworker](https://forum-cdn.knime.com/user_avatar/forum.knime.com/aworker/32/36421_2.png) [@aworker](https://forum.knime.com/u/aworker)\
**Post date:** [June 2, 2023, 7:12am UTC](https://forum.knime.com/t/roc-curve-bug/68005/2 "2023-06-02T07:12:56Z")

</div>

Hi @JaeHwanChoi

I have experienced this same problem before and in my case, the problem arised when there was only one predicted class instead of two. The -ROC Curve- node does not like this special case but instead of failing, it remains in yellow state.

The solution in this case is to check before using the -ROC Curve- node, whether your model predicted samples for the two classes and only if this is the case, generate a curve ROC. Otherwise the -ROC Curve- node should be bypassed using for instance the -Case Switch Start- and a --Case Switch End- nodes :

> **[CASE Switch Start](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.switches.caseswitch.any.CaseStartAnyNodeFactory)**
>
> This node routes its input to a selectable output port, allowing different branches of the workflow to be activated manually or using a flow variable. The inpu…

> **[CASE Switch End](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.switches.caseswitch.any.CaseEndAnyNodeFactory)**
>
> This node complements the CASE Switch Start node. It merges the created branches into a single output port. Typically, only one branch is active, and the conte…

Hope this helps.

Best  
Ael

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [August 31, 2023, 7:13am UTC](https://forum.knime.com/t/roc-curve-bug/68005/3 "2023-08-31T07:13:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
