亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? vfem.c

?? 數據挖掘方面的源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
      exampleIn = stdin;      if(!gUseGeoffBound) {         if(gMessageLevel > 0) {            printf("Trying to use the tight bound on stdin won't work, reverting to the looser one pass bound.\n");         }         gUseGeoffBound = 1;      }   }   /* Pick the initial centroids from the dataset */   if(!gStdin) {      /* in stream mode we never close & reopen the file */      sprintf(fileNames, "%s/%s.data", gSourceDirectory, gFileStem);      exampleIn = fopen(fileNames, "r");      DebugError(exampleIn == 0, "Unable to open the .data file");   }   centers = VALNew();   /* try get the gInitNumber-ith batch of centroids */   for(i = 0 ; i < gInitNumber ; i++) {      while(VALLength(centers) > 0) {         ExampleFree(VALRemove(centers, VALLength(centers) - 1));      }      _PickInitialCentroids(es, centers, exampleIn);   }   if(!gStdin) {      /* in stream mode we never close & reopen the file */      fclose(exampleIn);   }   /* create the initial stats structure from the initial centroids */   VALAppend(gStatsList, IterationStatsInitial(centers));   if(gMessageLevel >= 1) {      printf("allocation %ld\n", MGetTotalAllocation());   }   learnTime = 0;   gIteration = 0;   gRound = 0;   times(&starttime);   do {      gRound++;      /* if we aren't on the first round free the cruft from the prvious one */      if(gRound > 1) {         if(gReassignCentersEachRound) {            if(!gStdin) {               /* in stream mode we never close & reopen the file */               sprintf(fileNames, "%s/%s.data", gSourceDirectory, gFileStem);               exampleIn = fopen(fileNames, "r");               DebugError(exampleIn == 0,                                    "Unable to open the .data file");            }            /* burn some examples to make the selection be more random */            for(i = RandomRange(0, 10 * gNumClusters) ; i > 0 ; i--) {               ExampleFree(ExampleRead(exampleIn, es));            }            /* HERE MEM this newCenters may leak memory */            newCenters = _GetCentroidsForNextRound(exampleIn, es);         }         for(i = VALLength(gStatsList) - 1 ; i >= 0 ; i--) {            IterationStatsFree(VALRemove(gStatsList, i));         }         if(gReassignCentersEachRound) {            VALAppend(gStatsList, IterationStatsInitial(newCenters));         } else {            /* use the inital centroids again */            VALAppend(gStatsList, IterationStatsInitial(centers));         }      }      gIteration = 1;      if(!gStdin) {         /* in stream mode we never close & reopen the file */         sprintf(fileNames, "%s/%s.data", gSourceDirectory, gFileStem);         exampleIn = fopen(fileNames, "r");         boundDataIn = fopen(fileNames, "r");         DebugError(exampleIn == 0 || boundDataIn == 0,                              "Unable to open the .data file");      }      if(gMessageLevel > 0) {         printf("========================\n");         printf("round %d n %ld\n", gRound, gN);      }      while(!_DoClusterIterationDidConverge(exampleIn, es, boundDataIn)) {         times(&endtime);         /* see if we are toast, if so don't do the rest of the book keep */         thisIs = VALIndex(gStatsList, VALLength(gStatsList) - 1);         breakOut = 0;         lastIs = 0;         if(!gBatch &&                (_CalculateIDKMEarlyBound() > (40000 * gThisErrorTarget) ||                !thisIs->foundBound)) {            /* do one last check to see if we're on the last round */            if(VALLength(gStatsList) > 1) {               lastIs = VALIndex(gStatsList, VALLength(gStatsList) - 2);               if(!(lastIs->n >= gDBSize)) {                  breakOut = 1;               } else {                  breakOut = 0;               }            } else {               breakOut = 0;            }         }         if(breakOut) {            /* IDEM could have stoped and we are a loooong way away */            if(gMessageLevel > 1) {               printf("      broke out of a round early foundBound %d current bound %f - Target * 40000: %f\n", thisIs->foundBound,                    _CalculateIDKMEarlyBound(), 40000 * gThisErrorTarget);               printf("        dbSize: %ld n: %ld\n", gDBSize, lastIs->n);            }            thisIs->foundBound = 0;            break;         }         /* do the book keeping to go on to the next iteration */         learnTime += endtime.tms_utime - starttime.tms_utime;         /* reset the file for the next iteration */         if(!gStdin) {            /* in stream mode we never close & reopen the file */            fclose(exampleIn);            fclose(boundDataIn);            sprintf(fileNames, "%s/%s.data", gSourceDirectory, gFileStem);            exampleIn = fopen(fileNames, "r");            boundDataIn = fopen(fileNames, "r");            DebugError(exampleIn == 0 || boundDataIn == 0,                                 "Unable to open the .data file");         }         if(gDoTests) {            _doTests(es, thisIs->centroids, gIteration, learnTime, 0);         }         gIteration++;         /* reset the timer for the next iteration */         times(&starttime);      } /* end of a round */      /* test to see if we can get anything else from the file, if not            then we won't be able to increase n and we are finished */      if(!gStdin) {         e = ExampleRead(exampleIn, es);         if(e == 0) {            fileDone = 1;         } else {            fileDone = 0;            ExampleFree(e);         }         /* close the file for the beginning of the next round can open */         fclose(exampleIn);         fclose(boundDataIn);      } else {         if(gN >= gMaxExamplesPerIteration) {            fileDone = 1;         } else {            fileDone = 0;         }      }      thisIs = VALIndex(gStatsList, VALLength(gStatsList) - 1);      if(thisIs->foundBound && thisIs->guarenteeIDConverge) {         /* re-estimate l, update effective delta */         gEstimatedNumIterations = gIteration * 1.5;         lastDelta = gNeededDelta;         gNeededDelta = 1.0 - pow(1.0 - gDelta, 1.0 /                 (float)(gD * gNumClusters * gEstimatedNumIterations));         /* HERE fix this */         nIncrement = pow(thisIs->maxEkd/gTargetEkd, 2) *                 (log(2.0 / gNeededDelta) / log(2.0 / lastDelta)) *                      gN * 1.1;         if(gMessageLevel > 1) {            printf("suggested gN increment: %ld current gN: %ld\n", nIncrement, gN);         }         if(nIncrement > gN) {            gN += nIncrement;         } else {            gN *= 2;         }         if(gN > gMaxExamplesPerIteration) {            gN = gMaxExamplesPerIteration;         }      } else {         gN *= 2;      }      if(gIterationNs != 0) {         MFreePtr(gIterationNs);         gIterationNs = 0;         gNumIterationNs = 0;      }      if(!gBatch && gFancyStop && thisIs->foundBound) {         if(gMessageLevel > 2) { IterationStatsWrite(thisIs, es, stdout); }         CalculateExamplesPerIteration(gStatsList, &gIterationNs,                         &gNumIterationNs);         /* normalize & update to # examples per iteration */         iterationNSum = 0;         for(i = 0 ; i < gNumIterationNs ; i++) {            iterationNSum += gIterationNs[i];         }         if(iterationNSum > gDBSize * gNumIterationNs) {            /* go on to a final round */            if(gMessageLevel > 2) {               printf("CalculateExamplesPerIteration says we need too many samples, just go to one final round with the whole DB.\n");            }            gN = gDBSize + 1; /* make sure it's final */            if(gIterationNs != 0) {               MFreePtr(gIterationNs);               gIterationNs = 0;               gNumIterationNs = 0;            }         } else {            if(iterationNSum < gN * gNumIterationNs) {               /* use the actual Nis only if their sum is larger than                     the number of examples suggested by gN,                    otherwise use their ratios as the percent of gN * l                    to use in each iteration */               for(i = 0 ; i < gNumIterationNs ; i++) {                  gIterationNs[i] = ((gIterationNs[i] / iterationNSum) * gN) *                          gNumIterationNs;               }            }            if(gMessageLevel > 1) {               printf("ni:\n");               for(i = 0 ; i < gNumIterationNs ; i++) {                  printf("\t%d: %.4f\n", i, gIterationNs[i]);               }            }         }      }      bound = _CalculateErrorBound();      if(gMessageLevel > 1) {         printf("   found bound %d bound: %f guarentee converge %d file done %d\n", thisIs->foundBound, bound, thisIs->guarenteeIDConverge, fileDone);         printf("===");         fflush(stdout);      }   } while(!(thisIs->guarenteeIDConverge && thisIs->foundBound &&                 bound <= gThisErrorTarget) &&            !(gAllowBadConverge && thisIs->wouldEMConverge &&                 thisIs->foundBound && bound <= gThisErrorTarget) &&            !fileDone && !gBatch);   times(&endtime);   learnTime += endtime.tms_utime - starttime.tms_utime;   _OutputAllCentroids(bound);   if(gMessageLevel > 0) {      _OutputCentroidMovement();   }   _doTests(es,       ((IterationStatsPtr)VALIndex(gStatsList,             VALLength(gStatsList) - 1))->centroids,                   gIteration, learnTime, 0);   fclose(stdin);   return 0;}/* God help you if you need to comprehend or change this function *//*  Get our paper and read it */void CalculateExamplesPerIteration(VoidAListPtr last, float **nextNiOut, int *num) {   IterationStatsPtr lastIs, currentIs;   float **ni, **a, **b, **r;   float tmp, thisDelta;   int i, j, k;   *num = VALLength(last) - 1;   (*nextNiOut) = MNewPtr(sizeof(float) * *num);   thisDelta = 1.0 - pow(1.0 - gDelta, 1.0 /                  (float)(gD * gNumClusters * *num));   ni     = MNewPtr(sizeof(float *) * gNumClusters);   a      = MNewPtr(sizeof(float *) * gNumClusters);   b      = MNewPtr(sizeof(float *) * gNumClusters);   r      = MNewPtr(sizeof(float *) * gNumClusters);   for(i = 0 ; i < gNumClusters ; i++) {      ni[i] = MNewPtr(sizeof(float) * *num);      a[i] = MNewPtr(sizeof(float) * *num);      b[i] = MNewPtr(sizeof(float) * *num);      r[i] = MNewPtr(sizeof(float) * *num);   }   for(i = 0 ; i < *num ; i++) {      lastIs = VALIndex(last, i);      for(k = 0 ; k < gNumClusters ; k++) {         currentIs = VALIndex(last, i + 1);         if(i == 0) {            a[k][i] = 0;         } else {            a[k][i] = currentIs->lastAssignmentBound[k] /                      lastIs->lastBound[k];         }         b[k][i] = pow(lastIs->wMinus[k], 2) /                  ((float)lastIs->n * lastIs->wPlusSquare[k]);      }   }   for(i = 0 ; i < *num ; i++) {      for(k = 0 ; k < gNumClusters ; k++) {         /* Here is this the right place for this gD?*/         r[k][i] = sqrt((gD * log(2)) / (2.0 * b[k][i]));         for(j = i + 1 ; j < *num ; j++) {            r[k][i] *= a[k][j];         }      }   }   for(i = 0 ; i < *num ; i++) {      for(k = 0 ; k < gNumClusters ; k++) {         tmp = 0;         for(j = 0 ; j < gNumClusters ; j++) {            tmp += pow((r[k][i] * pow(r[k][j], 2)) , 1.0 / 3.0);         }         ni[k][i] = ((float)gNumClusters / gThisErrorTarget);         ni[k][i] *= pow(tmp, 2);      }   }   for(i = 0 ; i < *num ; i++) {      (*nextNiOut)[i] = 0;      for(k = 0 ; k < gNumClusters ; k++) {         if(ni[k][i] > (*nextNiOut)[i]) {            (*nextNiOut)[i] = ni[k][i];         }      }   }   if(gMessageLevel > 2) {      for(i = 0 ; i < *num ; i++) {         printf("iteration %d nextTotal: %f\n", i, (*nextNiOut)[i]);         for(k = 0 ; k < gNumClusters ; k++) {            printf("  c%d: ", k);            printf("a %.3f b %.3f r %.3f ", a[k][i], b[k][i], r[k][i]);            printf("ni %.3f", ni[k][i]);            printf("\n");         }      }   }   /* Free memory */   for(i = 0 ; i < gNumClusters ; i++) {      MFreePtr(ni[i]);      MFreePtr(a[i]);      MFreePtr(b[i]);      MFreePtr(r[i]);   }   MFreePtr(ni);   MFreePtr(a);   MFreePtr(b);   MFreePtr(r);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频免费观看高清完整版在线观看| 26uuu亚洲综合色| 日韩欧美一区二区在线视频| 国产日本亚洲高清| 日韩电影在线一区二区| 成人一区二区三区视频在线观看| 欧美艳星brazzers| 久久久av毛片精品| 麻豆专区一区二区三区四区五区| 成人看片黄a免费看在线| 91麻豆精品国产91久久久久久久久| 国产精品三级电影| 免费成人结看片| 欧美一a一片一级一片| 中文字幕高清不卡| 韩国午夜理伦三级不卡影院| 欧美亚州韩日在线看免费版国语版| 国产农村妇女毛片精品久久麻豆| 日韩福利视频网| 欧美亚洲精品一区| 自拍偷拍亚洲欧美日韩| 成人一道本在线| 久久人人97超碰com| 久久精品国产在热久久| 欧美一区永久视频免费观看| 亚洲chinese男男1069| 不卡一卡二卡三乱码免费网站| 久久精品视频在线看| 琪琪久久久久日韩精品| 欧美精品三级日韩久久| 亚洲一区二区四区蜜桃| 91福利在线看| 日韩美女精品在线| av亚洲精华国产精华精| 综合婷婷亚洲小说| 色综合久久88色综合天天6| 亚洲天堂av老司机| 91麻豆国产精品久久| 1000精品久久久久久久久| 99久久综合狠狠综合久久| 综合电影一区二区三区| 一本久久综合亚洲鲁鲁五月天| 综合欧美亚洲日本| 日本韩国一区二区| 亚洲一级电影视频| 欧美日韩国产片| 日韩二区在线观看| 久久综合资源网| 国产+成+人+亚洲欧洲自线| 国产日韩精品一区二区三区| 99久久精品情趣| 一区二区三区不卡视频| 69久久夜色精品国产69蝌蚪网| 男男gaygay亚洲| 久久精品视频免费| 91亚洲永久精品| 亚洲超丰满肉感bbw| 日韩一级二级三级| 国产成人精品影视| 亚洲一区欧美一区| 日韩欧美国产综合| 成人三级伦理片| 亚洲国产日产av| 精品国产在天天线2019| 国产成人在线看| 一级日本不卡的影视| 日韩一区二区影院| 91一区一区三区| 精品一区二区综合| 国产精品萝li| 欧美电影在哪看比较好| 国产米奇在线777精品观看| 亚洲码国产岛国毛片在线| 91精品国产综合久久久蜜臀图片| 东方欧美亚洲色图在线| 亚洲国产成人av| 国产精品免费久久久久| 欧美日韩成人综合| 成年人国产精品| 久久超级碰视频| 樱桃国产成人精品视频| 久久网这里都是精品| 欧洲另类一二三四区| 国产精品一品视频| 午夜精品久久久久久久| 国产精品欧美一级免费| 欧美va在线播放| 欧洲在线/亚洲| 国产91精品精华液一区二区三区| 午夜精品免费在线| 国产精品久久国产精麻豆99网站| 欧美一区二区视频观看视频| 91理论电影在线观看| 国产成都精品91一区二区三| 日韩精品1区2区3区| 亚洲精品欧美综合四区| 中文字幕不卡三区| 精品国免费一区二区三区| 91麻豆精品国产自产在线 | 成人视屏免费看| 捆绑紧缚一区二区三区视频| 亚洲成人高清在线| 亚洲免费在线视频一区 二区| 欧美精品一区在线观看| 日韩一区二区三| 777xxx欧美| 欧美精品电影在线播放| 在线观看亚洲a| 91福利视频在线| 色欧美88888久久久久久影院| 国产91富婆露脸刺激对白| 国产精品69毛片高清亚洲| 国产精品中文有码| 精品影院一区二区久久久| 极品瑜伽女神91| 极品尤物av久久免费看| 国产一级精品在线| 国产一区二区不卡| 精品一区二区久久| 国产一区二区伦理| 国产精品亚洲一区二区三区在线| 国产精品夜夜嗨| 国产精品69毛片高清亚洲| 国产91在线观看| 99久久久无码国产精品| 色婷婷一区二区三区四区| 日本高清不卡在线观看| 欧美午夜电影一区| 3d成人h动漫网站入口| 日韩一级视频免费观看在线| 精品91自产拍在线观看一区| 久久久久成人黄色影片| 欧美国产视频在线| 亚洲婷婷国产精品电影人久久| 亚洲精选视频在线| 亚洲777理论| 久久国产精品第一页| 国产成人在线视频免费播放| av成人免费在线| 欧美日韩在线亚洲一区蜜芽| 欧美一区二区啪啪| 国产午夜精品久久久久久免费视| 亚洲欧洲精品一区二区精品久久久| 亚洲免费在线观看| 日本女优在线视频一区二区| 国产一区二区三区av电影| 99精品黄色片免费大全| 欧美日韩一卡二卡三卡 | 日韩高清中文字幕一区| 男人操女人的视频在线观看欧美| 国产麻豆精品theporn| 色综合一区二区| 欧美一级搡bbbb搡bbbb| 久久久久国产精品人| 亚洲激情五月婷婷| 美女视频网站久久| 91丨九色丨国产丨porny| 91精品国产一区二区| 成人欧美一区二区三区1314| 日韩精品五月天| 成人动漫一区二区| 欧美一区二区视频在线观看2022| 中文欧美字幕免费| 三级一区在线视频先锋| 成人一级片在线观看| 日韩视频在线你懂得| 亚洲另类在线视频| 国产精品亚洲成人| 欧美日本视频在线| 综合色天天鬼久久鬼色| 激情文学综合丁香| 欧美男人的天堂一二区| 中文字幕亚洲在| 国内精品自线一区二区三区视频| 欧美在线视频不卡| 欧美国产亚洲另类动漫| 久久精品国产免费看久久精品| 91猫先生在线| 中文在线免费一区三区高中清不卡| 婷婷夜色潮精品综合在线| eeuss影院一区二区三区| 精品国产伦一区二区三区观看方式| 亚洲一区二区欧美| av资源站一区| 国产视频一区二区在线| 免费人成网站在线观看欧美高清| 91精彩视频在线观看| 国产精品国产三级国产aⅴ原创| 九一久久久久久| 日韩三级在线免费观看| 亚洲精品视频免费看| 91丨porny丨中文| 日韩美女视频一区二区| 成人精品高清在线| 久久精品视频在线看| 国产毛片精品视频| 久久久夜色精品亚洲| 精品一区二区三区香蕉蜜桃| 欧美一级淫片007| 久久国产精品99精品国产|