Batch ID Generation

varunm1varunm1 Moderator, MemberPosts:1,207Unicorn
edited December 2019 inHelp
Hello,

Is there a simple way to generate batch id (Divide samples into 5 groups) based on ID column in a dataset. For example, I have a dataset with 400 samples related to 30 subjects (Multiple samples per subject). I would like to divide the data set into 5 (this can be any value) batches based on the Subject (not samples), so each batch will have 6 subjects related data.

I attached a sample dataset where "Subject ID" is the ID column.
Regards,
Varun
https://www.varunmandalapu.com/

Be Safe. Follow precautions and Maintain Social Distancing

Tagged:

Best Answer

Answers

  • varunm1varunm1 Moderator, MemberPosts:1,207Unicorn
    Hello@sgenzer

    Thanks for your response. Is this scalable to ID with characters like (A, B,C D,... etc)?

    I just replaced Subject ID column values to characters (Instead of 1 now its A).

    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University ProfessorPosts:3,362RM Data Scientist
    Just do Nominal to numerical before to get unique integers?

    Best,
    Martin
    - Head of Data Science Services at RapidMiner -
    Dortmund, Germany
    varunm1 lionelderkrikor sgenzer IngoRM
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, MemberPosts:1,195Unicorn
    Hi Varun,

    I'm not sure to understand, but is it what you are looking for ..?

                                                     
    Regards,

    Lionel



    sgenzer
  • varunm1varunm1 Moderator, MemberPosts:1,207Unicorn
    edited December 2019
    @mschmitzyep it works, I need to duplicate the column and then convert it to nominal to numerical. The reason for duplication is to trace back the ID's
    Regards,
    Varun
    https://www.varunmandalapu.com/

    Be Safe. Follow precautions and Maintain Social Distancing

    MartinLiebig sgenzer IngoRM
Sign InorRegisterto comment.