Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Nounou Biatrice <nounou.biatrice <at> gmail.com>
Subject: Re: Train-Test Split
Newsgroups: gmane.comp.ai.mallet.devel
Date: Saturday 25th February 2012 10:45:36 UTC (over 5 years ago)
Hi,
my documents are sorted by date.
I found this method for train-test split:

public Trial testTrainSplit(InstanceList instances) {

        int TRAINING = 0;
        int TESTING = 1;
        int VALIDATION = 2;

        // Split the input list into training (90%) and testing (10%)
lists.
	// The division takes place by creating a copy of the list,
	//  randomly shuffling the copy, and then allocating
	//  instances to each sub-list based on the provided proportions.

        InstanceList[] instanceLists =
            instances.split(new Randoms(),
	                    new double[] {0.9, 0.1, 0.0});

	// The third position is for the "validation" set,
        //  which is a set of instances not used directly
        //  for training, but available for determining
        //  when to stop training and for estimating optimal
	//  settings of nuisance parameters.
	// Most Mallet ClassifierTrainers can not currently take advantage
        //  of validation sets.

	Classifier classifier = trainClassifier( instanceLists[TRAINING] );
        return new Trial(classifier, instanceLists[TESTING]);
    }
but I think it not appropriate for the case where the documents are
sorted by date.
Could anyone help me?



2012/2/22 Nounou Biatrice 

> Hi,
> I'm using Mallet Naive Bayes algorithm to classify a big Dataset. My
> problem is how to split my dataset into train and test chunks?
> Could anyone  tell me the best methodology of train-test split?
>
> --
> Best regards,
> ---
> *"Someone is sitting in the shade today, because someone planted a tree a
> long time ago." Warren Buffett.*
> *---*
>
>
>


-- 
Best regards,
---
*"Someone is sitting in the shade today, because someone planted a tree a
long time ago." Warren Buffett.*
*---*
 
CD: 3ms