Ignore:
Timestamp:
03/29/12 13:48:44 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Set random seed before calling liblinear's train function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/liblinear_interface.cpp

    r10675 r10683  
    340340        raiseError("LIBLINEAR error: %s" , error_msg); 
    341341    } 
    342     //cout << "trainig" << endl; 
     342    /* The solvers in liblinear use rand() function. 
     343     * To make the results reporoducible we set the seed from the data table's 
     344     * crc 
     345     */ 
     346    PExampleTable extable(examples); 
     347    srand(extable->checkSum(false)); 
     348 
    343349    model *model = train(prob, param); 
    344350    destroy_problem(prob); 
Note: See TracChangeset for help on using the changeset viewer.