mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jamborta <jambo...@gmail.com>
Subject RandomUtils.useTestSeed() - Taste libraries
Date Tue, 15 Dec 2009 18:10:02 GMT

hi there,

sorry, one more question today.

I have this evaluator which based on your
AbstractDifferenceRecommenderEvaluator, I wanted to run it using
RandomUtils.useTestSeed(), to make sure that I get the same results. for
example if I have this method:
    public void recommend() {
        try {
            final DataModel model = new FileDataModel(new
File("./data/test_data.data"));
            RecommenderBuilder build = new SVDBuilder();
            DataModelBuilder model2 = null;
            IREvaluatorNoParallel evaluate = new IREvaluatorNoParallel();
            evaluate.evaluate(build, model2, model, 0.6, 1.0);
        } catch (FileNotFoundException e) {
            e.printStackTrace();

        } catch (TasteException e) {
            e.printStackTrace();
        }
    }
I would like to have the same result if I call it more than one times.
however, if i do this:

        RandomUtils.useTestSeed();
        test.recommend();
        test.recommend();

It gives me a differrent result for the second times. but if I run it again,
it gives me the same different results. not sure if i understand how i
works. is it possible to do this?

thanks
-- 
View this message in context: http://old.nabble.com/RandomUtils.useTestSeed%28%29---Taste-libraries-tp26799137p26799137.html
Sent from the Mahout User List mailing list archive at Nabble.com.


Mime
View raw message