Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006652
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:32:25+00:00 2026-05-20T08:32:25+00:00

I am currently working on building a classifier using c5.0. I have a dataset

  • 0

I am currently working on building a classifier using c5.0. I have a dataset of 8000 entries and each entry has its own i.d number (1-8000). When testing the performance of the classifier I had to make 5sets of 10:90 (training data: test data) splits. Of course any training cases cannot appear again in the test cases, and duplicates cannot occur in either set.

To solve the problem of picking examples at random for the training data, and making sure the same cannot be picked for the test data I have developed a horribly slow method;

  • fill a file with numbers from 1-8000 on separate lines.

  • randomly pick a line number (from a range of 1-8000) and use the contents of the line as the id number of the training example.

  • write all unpicked numbers to a new file

  • decrement the range of the random number generator by 1

  • redo

Then all unpicked numbers are used as test data. It works but its slow. To speed things up I could use List::Util ‘shuffle’ to just ‘randomly’ shuffle and array of these numbers. But how random is ‘shuffle’? It is essential that the same level of accuracy is maintained. Sorry about the essay, but does anyone know how ‘shuffle’ actually works. Any help at all would be great

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:32:25+00:00Added an answer on May 20, 2026 at 8:32 am

    Here is the shuffle algorithm used in List::Util::PP

    sub shuffle (@) {
      my @a=\(@_);
      my $n;
      my $i=@_;
      map {
        $n = rand($i--);
        (${$a[$n]}, $a[$n] = $a[$i])[0];
      } @_;
    }
    

    Which looks like a Fisher-Yates shuffle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The company I'm currently working for is using Selenium for Uniting-Testing our User Interface.
I am currently working on building a baseball website. On one side of the
I'm currently working on building a game which is on a planet, the way
I'm currently working on building a java web app. I've been looking to use
I am currently working on building a very simple site for an open source
I'm currently working on building an application in CakePHP. There's a quite extensive existing
I'm currently working on building a library to modularize some of my code and
I am currently working on a building community website in PHP. This contains forms
I'm currently working on a project that is building a java-based desktop application to
I'm currently working on redesigning an application which is building a model from input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.