# Y-randomisation

**URL:** <https://forum.knime.com/t/y-randomisation/35444>\
**Category:** KNIME Analytics Platform\
**Created:** [August 18, 2021, 11:28am UTC](https://forum.knime.com/t/y-randomisation/35444 "2021-08-18T11:28:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subha\_D](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@Subha\_D](https://forum.knime.com/u/Subha_D)\
**Post date:** [August 18, 2021, 11:28am UTC](https://forum.knime.com/t/y-randomisation/35444/1 "2021-08-18T11:28:10Z")

</div>

Hello,

I need to make a y-randomised model for my QSAR models. I was wondering if I use both the training and test data to do that ? or use only the test data? I am a little confused as I’ve seen people using just the test data for a y-randomised model using the target shuffling node.

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:** [August 18, 2021, 11:40am UTC](https://forum.knime.com/t/y-randomisation/35444/2 "2021-08-18T11:40:14Z")

</div>

Hi @Subha_D

If your aim is to know whether your QSAR model (without y-randomization) is performing better than random, it is only the test set y values that you need to randomize (shuffle).

Hope this helps.

Best

Ael

---

<div class="post-metadata">

**Author:** ![Subha\_D](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@Subha\_D](https://forum.knime.com/u/Subha_D)\
**Post date:** [August 18, 2021, 12:47pm UTC](https://forum.knime.com/t/y-randomisation/35444/3 "2021-08-18T12:47:32Z")

</div>

Hello @aworker ,

Thank you it helps! Will I have to partition the test data again…?  
This is how I’ve done it:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/2/f2e7f658b9595aab4043167a81b4f731473f86de.png)

Is this correct?

Thank you,  
Subha

---

<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:** [August 18, 2021, 1:06pm UTC](https://forum.knime.com/t/y-randomisation/35444/4 "2021-08-18T13:06:24Z")

</div>

Hi @Subha_D

You are welcome. I’m afraid to say it doesn’t seem correct to me. I wonder whether I was clear enough because you are shuffling before partition and hence the training set too. Would it be possible for you to upload here and share your workflow ? Thanks in advance.

Best

Ael

---

<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:** [August 18, 2021, 1:39pm UTC](https://forum.knime.com/t/y-randomisation/35444/5 "2021-08-18T13:39:01Z")

</div>

Hi @Subha_D

Below you’ll find a snapshot of what I meant:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/8/6/8687a9a6caf162201de64c83515c9cb681ac8b84.png)

If your Numeric Scorer results on non Y-Shuffled Test data are close to those obtained by the Numeric Scorer results on your Y-Shuffled Test data, then your learning regression model is not doing better than random.

Hope this helps.

Best

Ael

---

<div class="post-metadata">

**Author:** ![Subha\_D](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@Subha\_D](https://forum.knime.com/u/Subha_D)\
**Post date:** [August 18, 2021, 1:46pm UTC](https://forum.knime.com/t/y-randomisation/35444/6 "2021-08-18T13:46:12Z")

</div>

Hello @aworker ,

I was just trying to upload my workflow but it is quite big. Yes this helps a lot thank you!  
Will I need to run many iterations for this or is running this once enough?

Thank you,  
Subha

---

<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:** [August 18, 2021, 2:27pm UTC](https://forum.knime.com/t/y-randomisation/35444/7 "2021-08-18T14:27:17Z")

</div>

Hi @Subha_D

Don’t worry. The important thing is that you got the idea.

> [@Subha\_D](#):
>
> Will I need to run many iterations for this or is running this once enough?

If your data is big enough, you are not obliged in a first instance to do a K-fold cross validation to know whether your model is performing well, just a simple CV test, as shown in my straightforward example, would be good enough. However, it is always more rigorous and informative to do a K-fold CV because you can then calculate Mean & STD on prediction results.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/2/1/2103f3c71a70688fe7c2f4c00b69f9512ff81108.png)

[20210818 Pikairos Y-randomization.knwf](https://forum.knime.com/uploads/short-url/vUxoQpIJbP4bxlST9CSfpKjDotq.knwf) (355.7 KB)

I’m posting here both solutions (with and without K-Fold CV) 😉

Hope this helps.

Thanks for having validated the answer 😄 !

Good luck and best wishes,

Ael

---

<div class="post-metadata">

**Author:** ![Subha\_D](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@Subha\_D](https://forum.knime.com/u/Subha_D)\
**Post date:** [August 18, 2021, 2:55pm UTC](https://forum.knime.com/t/y-randomisation/35444/8 "2021-08-18T14:55:29Z")

</div>

Hello @aworker ,

Thank you ver much for you help! 🙂

SD

---

<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 25, 2021, 2:56pm UTC](https://forum.knime.com/t/y-randomisation/35444/9 "2021-08-25T14:56:05Z")

</div>

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