- Timestamp:
- 03/16/12 13:49:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prextra/decisiontree.c
r23 r25 132 132 /* printf("fss[%d]=%d\n",i,fss[i]); */ 133 133 } 134 free(tmp); 134 135 } 135 136 else 137 { 136 138 for (i=0;i<D;i++) 139 { 137 140 fss[i] = i; 138 free(tmp); 141 /* printf("fss[%d]=%d\n",i,fss[i]); */ 142 } 143 F = D; 144 } 139 145 140 146 /* check each feature separately: */ … … 155 161 } 156 162 qsort((void *)tmp,I[0],sizeof(tmp[0]),compare_objs); 157 /*for (j=0;j<I[0];j++){ 158 printf(" -> tmp[%d] = %f, idx=%d\n",j,tmp[j].val,tmp[j].idx); 159 }*/ 163 /* for (j=0;j<I[0];j++) printf(" -> tmp[%d] = %f, idx=%d\n",j,tmp[j].val,tmp[j].idx); */ 160 164 /* make indices for the split */ 161 165 for (j=0;j<I[0];j++) … … 199 203 200 204 } 201 /* printf("Finally, we use feature %d on split %d, threshold %f\n",202 out->feat,bestsplit,out->thres); 203 printf("Left objects:\n");205 /* printf("Finally, we use feature %d on split %d, threshold %f\n", 206 out->feat,bestsplit,out->thres); */ 207 /*printf("Left objects:\n"); 204 208 for (k=1;k<=Ileftbest[0];k++) 205 209 printf(" Ileft[%d] = %d\n",k,Ileftbest[k]); … … 323 327 if (nrhs==4) { 324 328 /* Get the input and check stuff */ 329 /* printf("get input and check\n"); */ 325 330 x = mxGetPr(prhs[0]); 326 331 N = mxGetM(prhs[0]); … … 333 338 K = (int)(mxGetPr(prhs[2])[0]); 334 339 F = (int)(mxGetPr(prhs[3])[0]); 340 /* printf("N=%d, D=%d, K=%d, F=%d\n",N,D,K,F); */ 335 341 /* allocate */ 336 342 tmp_p = (double *)malloc(K*sizeof(double)); /* for gini */
Note: See TracChangeset
for help on using the changeset viewer.