diff options
author | Matthew Hoffman <matt@fiordilatte.local> | 2010-12-08 20:48:55 +0300 |
---|---|---|
committer | Matthew Hoffman <matt@fiordilatte.local> | 2010-12-08 20:48:55 +0300 |
commit | 5cb86b4afe8ae699fdd31d22480852cddb5a0bff (patch) | |
tree | a0960d3208b9ac479fa0e5a60affeeadd9b34afd /parse_regressor.cc | |
parent | 729f4d6be6e045bf8851858fe233ed7246f0d7ff (diff) |
added a small test example for LDA and fixed a bug with sort_features
Diffstat (limited to 'parse_regressor.cc')
-rw-r--r-- | parse_regressor.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parse_regressor.cc b/parse_regressor.cc index 1fc92297..994f41c1 100644 --- a/parse_regressor.cc +++ b/parse_regressor.cc @@ -45,7 +45,7 @@ void initialize_regressor(regressor &r) for (size_t j = 0; j < stride*length/num_threads; j+=stride) { for (size_t k = 0; k < global.lda; k++) { - r.weight_vectors[i][j+k] = -log(drand48()); + r.weight_vectors[i][j+k] = -log(drand48()) + 1.0; // r.weight_vectors[i][j+k] *= r.weight_vectors[i][j+k]; // r.weight_vectors[i][j+k] *= r.weight_vectors[i][j+k]; r.weight_vectors[i][j+k] *= (float)global.lda_D / (float)global.lda |