From 4e1c84200619f7d98e7e7398b7b8ef63d67bd2ed Mon Sep 17 00:00:00 2001 From: ziejd2 Date: Fri, 8 Oct 2021 13:46:23 -0500 Subject: Update network_score.c --- var_lib_genenet_bnw/localscore/network_score.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var_lib_genenet_bnw/localscore/network_score.c b/var_lib_genenet_bnw/localscore/network_score.c index 69e84aab..56388236 100644 --- a/var_lib_genenet_bnw/localscore/network_score.c +++ b/var_lib_genenet_bnw/localscore/network_score.c @@ -191,7 +191,7 @@ main(int argc, char *argv[]) network.node[i].prob=(double *)malloc(sizeof(double)*2); //probability array of size 2 for continuous node network.node[i].prob[0]=0.0; //initialization network.node[i].prob[1]=0.0; - network.node[i].cdata=(double *)malloc(sizeof(double)*row); //data matrix for continuous node + network.node[i].cdata=(double *)malloc(sizeof(double)*(row+1)); //data matrix for continuous node } else { @@ -199,7 +199,7 @@ main(int argc, char *argv[]) network.node[i].post_alpha=(double *)calloc(network.node[i].type,sizeof(double)); //prepare total count of each discrete data lebel initialize with zero by calloc which is used in learnnode id++; network.node[i].prob=(double *)malloc(sizeof(double)*c); //probability array of size equals to number of levels for discrete node - network.node[i].ddata=(char **)malloc(sizeof(char *)*row); //data matrix for continuous node + network.node[i].ddata=(char **)malloc(sizeof(char *)*(row+1)); //data matrix for continuous node network.node[i].label=(char **)malloc(sizeof(char *)*c); //label array for(j=0;j