Python Forum
How do I split a dataset into test/train/validation according to a particular group?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I split a dataset into test/train/validation according to a particular group?
#2
Looks like you're doing that shuffle/split in lines 19-30, most of which don't appear to be dataframe specific. The actual shuffle on line 19 could be replaced with something like random.shuffle() assuming you are starting with a list.
Reply


Messages In This Thread
RE: How do I split a dataset into test/train/validation according to a particular group? - by bowlofred - May-12-2021, 08:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Class test : good way to split methods into several files paul18fr 4 507 Jan-30-2024, 11:46 AM
Last Post: Pedroski55
  How to fix With n_samples=0, test_size=0.2 and train_size=None, the resulting train s MrSonoa 2 3,009 Apr-15-2023, 12:02 PM
Last Post: MrSonoa
  how do I return Max Test result + corresponding student name from an excel dataset? sean1 3 1,289 Jan-16-2022, 09:07 PM
Last Post: snippsat
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,185 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  How to write test cases for a init function by Unit test in python? binhduonggttn 2 3,147 Feb-24-2020, 12:06 PM
Last Post: Larz60+
  How to write test cases by Unit test for database configuration file? binhduonggttn 0 2,576 Feb-18-2020, 08:03 AM
Last Post: binhduonggttn
  Delimited Values to ROW - Lucky Train ? karthi_python 1 2,363 May-30-2019, 06:40 AM
Last Post: karthi_python
  split and test tweet data Jmekubo 1 2,165 May-08-2019, 10:48 AM
Last Post: michalmonday

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020