From 25b2fd32b65e2a6d20fb7ccf6ff628fc7c88a128 Mon Sep 17 00:00:00 2001
From: Parikshit Ram
Date: Thu, 24 Jan 2008 23:12:11 +0000
Subject: [PATCH] slight chance made
---
fastlib/u/pram/mog_l2e/mog.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fastlib/u/pram/mog_l2e/mog.h b/fastlib/u/pram/mog_l2e/mog.h
index 8f1fcae3cf..cdbb9d8ede 100644
--- a/fastlib/u/pram/mog_l2e/mog.h
+++ b/fastlib/u/pram/mog_l2e/mog.h
@@ -109,7 +109,7 @@ class MoGL2E {
void MakeModel(index_t num_mods, index_t dimension, double* theta) {
double *temp_mu;
Matrix lower_triangle_matrix, upper_triangle_matrix;
- double sum, s_min = 0.1;
+ double sum, s_min = 0.00001;
Init(num_mods, dimension);
temp_mu = (double*) malloc (dimension * sizeof(double)) ;
@@ -190,7 +190,7 @@ class MoGL2E {
void MakeModelWithGradients(index_t num_mods, index_t dimension, double* theta) {
double *temp_mu;
Matrix lower_triangle_matrix, upper_triangle_matrix;
- double sum, s_min = 0.1;
+ double sum, s_min = 0.00001;
Init(num_mods, dimension);
temp_mu = (double*) malloc (dimension * sizeof(double));
@@ -221,6 +221,9 @@ class MoGL2E {
}
d_omega_temp.set(i,i,omega(i)*(1-omega(i)));
}
+ for(index_t i = 0; i < num_mods - 1; i++) {
+ d_omega_temp.set(i, num_mods - 1, -(omega(i)*omega(num_mods - 1)));
+ }
set_d_omega(d_omega_temp);
// calculating the mu values