Coder Social home page Coder Social logo

Comments (14)

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
yup, this was done just to get reproducible results over multiple runs with same
parameters.

I guess i will set a parameter in the next version to allow setting for a 
random seed.

Thanks.

Original comment by abhirana on 10 Jan 2010 at 11:28

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Has a random number seed been added?  Is there any way of getting around this?  
I need to run multiple times, and I keep getting the same output...

Thanks!

Michael

Original comment by [email protected] on 19 Feb 2011 at 10:58

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
hi Michael

i havent added that yet in. though the code just needs a line


like the first poster suggested add a line srand(time(NULL)); before this line
(CLASSIFICATION CODE) 
http://code.google.com/p/randomforest-matlab/source/browse/trunk/RF_Class_C/src/
classRF.cpp#210

file is RF_Class_C/src/classRF.cpp

(REGRESSION CODE) 
http://code.google.com/p/randomforest-matlab/source/browse/trunk/RF_Reg_C/src/re
g_RF.cpp#291

file is RF_Reg_C/src/reg_RF.cpp


and make sure that time.h is one of the include file at the top.

Then you just need to recompile, those compile_* scripts. 


Original comment by abhirana on 19 Feb 2011 at 11:04

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Thanks so much, I appreciate the quick response.  Unfortunately I don't know 
C++, or have a C compiler.  I'll see what I can do, though.  If I can download 
a free compiler, I should be able to fight my way through it.

Thanks again.  It's a great package, and has really helped a lot.

Michael

Original comment by [email protected] on 19 Feb 2011 at 11:45

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Hi Michael

if you installed matlab, then it should have a compiler in. if not i can always 
send you the compiled files

I guess you are using one of the precompiled package for windows.

are you using windows 32-bit or 64-bit? i can send you the compiled files at ur 
gmail address, if thats fine.

Original comment by abhirana on 19 Feb 2011 at 11:53

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Yeah, I'm using the precompiled package right now. If it's not too much of a 
hassle for  you, I would definitely appreciate if you would generate the 
compiled files for me.  It would be a WHOLE lot easier for me, and probably 
involve a lot less swearing at the computer.

I'm using both 64-bit and 32-bit computers, so I'd need both.  Thanks so much 
for your help, I really appreciate it.

Michael

Original comment by [email protected] on 21 Feb 2011 at 5:12

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Hi Michael

Attached is the version that supports windows 32/64 with random seed based on 
time(). It will print out random seed initialized in the command prompt.

Everything in the interface is same as before.

thanks!

Original comment by abhirana on 21 Feb 2011 at 7:41

Attachments:

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
You might have to install the vc+ 2010 redistributables.
(32-bit) 
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a
423-37bf0912db84

and 

(64-bit) 
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=bd512d9e-43c8-4655-8
1bf-9350143d5867

long story short, the 32-bit version was compiled using vc+ 2010 + matlab 2010b 
and the 64-bit with vc+ 2008 + matlab 2009a

Original comment by abhirana on 21 Feb 2011 at 7:46

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
That worked perfectly.  Thanks so much for all of your help, I really 
appreciate it.

Michael

Original comment by [email protected] on 21 Feb 2011 at 10:02

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
[deleted comment]

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
hi,

your code is very useful. thanks for sharing.

i am using 5-fold cross validation, (although i read about the internal oob 
error rate, that is similar to cross validation). 

Although, I have fixed the seed (global seed setting), but using multiple runs 
i get a different output? i want to have same results each time. Keeping 
everything else same, I want to play with the parameters. 

regards,
Ihtesham.

Original comment by [email protected] on 29 Nov 2012 at 12:12

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
Ihtesham

what version of code are you using? svn or download? 

i dont remember if the code in download has the srand() or not
http://code.google.com/p/randomforest-matlab/source/browse/trunk/RF_Class_C/src/
classRF.cpp#204

if you comment it out then you should get reproducible values

Original comment by abhirana on 29 Nov 2012 at 7:05

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
i am using the downloaded version. (i search and it doesn't contain the call to 
srand function), but still i'm getting different results for multiple runs... I 
am using the following code for my 5 fold cross validation to reset the global 
seed. (matlab code)

stream = RandStream.getGlobalStream;
reset(stream);
CVO=cvpartition(Labels,'kfold',5);

Original comment by [email protected] on 29 Nov 2012 at 12:40

from randomforest-matlab.

GoogleCodeExporter avatar GoogleCodeExporter commented on May 30, 2024
@ihtesham

attached code will give you reproducible code. All what is changed from the 
uploaded version is recompiling the code with a fixed seed (both for 
classifcation and regression, changed two lines which said seedMT(2*rand()+1) 
to seedMT(77) )

do tell me if you have any issues.

Original comment by abhirana on 11 Dec 2012 at 11:11

Attachments:

from randomforest-matlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.