search for: giniinit

Displaying 2 results from an estimated 2 matches for "giniinit".

Did you mean: gic_init
2002 Jan 25
0
rpart subsets
...(i=0; i<numclass; i++) { if (freq[i] == 0) freq[i] = 0.00000000001; } #endif for (i=0; i<numclass; i++) { prior[i] /= freq[i]; aprior[i] /= (temp * freq[i]); /* pi_i / n_i */ } } The calculation of the priors (existing code) above shows where I put the fix in giniinit (in gini.c). However, at this point the rpart run will complete but will have many NaN's in the rpart$frame for yval's. This is because of an oversight in rpart.s when calculating the probabilities for each node. The change to the function rpart in rpart.s is: if (method.int ==3 ) {...
2002 Jan 28
0
rpart subset fix
...(i=0; i<numclass; i++) { if (freq[i] == 0) freq[i] = 0.00000000001; } #endif for (i=0; i<numclass; i++) { prior[i] /= freq[i]; aprior[i] /= (temp * freq[i]); /* pi_i / n_i */ } } The calculation of the priors (existing code) above shows where I put the fix in giniinit (in gini.c). However, at this point the rpart run will complete but will have many NaN's in the rpart$frame for yval's. This is because of an oversight in rpart.s when calculating the probabilities for each node. The change to the function rpart in rpart.s is: if (method.int ==3 ) {...