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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cluster2.c

?? 聚類算法全集以及內(nèi)附數(shù)據(jù)集
?? C
?? 第 1 頁 / 共 4 頁
字號(hào):
  assert(clset);                /* check the function argument */  type = clset->type;           /* get the cluster type flags */  lrc  = clset->lrates[0];      /* get the center learning rate */  lrv  = clset->lrates[1];      /* and the radius learning rate */  clset->steps++;               /* count the update step */  for (p = clset->cls +(n = clset->clscnt); --n >= 0; ) {    s = (--p)->sum; c = p->ctr; /* get aggregation vector and center */    for (i = clset->incnt; --i >= 0; )      s[i] = c[i] -lrc *s[i];   /* compute new center coordinates */    if (type & CLS_COVARS) {    /* -- if adaptable covariances */      mat_trmuls(p->smp, p->smp, MAT_UPPER, -lrv);      mat_addx(p->smp, p->smp, 1, p->inv, MAT_UPPER);      _decom(p); mat_chinv(p->smp, p->inv);      d = _decom(p);            /* update the covariance matrix */      p->msd = ((d >= MINDET) && (d <= MAXDET))             ? pow(d,              1.0/clset->incnt)             : exp(mat_chlogd(p->inv) /clset->incnt); }    else if (type & CLS_VARS) { /* -- if adaptable variances */      for (d = 1, i = clset->incnt; --i >= 0; ) {        t = mat_get(p->inv, i, i) -lrv *mat_get(p->smp, i, i);        t = (t > 0) ? 1/t : MAXVAR;        if      (t < MINVAR) t = MINVAR;        else if (t > MAXVAR) t = MAXVAR;        d *= mat_set(p->smp, i, i, t);      }                         /* update the covariance matrix */      p->msd = ((d >= MINDET) && (d <= MAXDET))             ? pow(d,              1.0/clset->incnt)             : exp(mat_dialog(p->smp) /clset->incnt); }    else if (type & CLS_SIZE)   /* -- if adaptable isotropic var. */      p->msd = p->var -lrv *mat_get(p->smp, 0, 0);    else p->msd = p->var;       /* copy the isotropic variance */    if      (p->msd < MINVAR) p->msd = MINVAR;    else if (p->msd > MAXVAR) p->msd = MAXVAR;  }                             /* compute new isotropic variance */}  /* _backprop() *//*----------------------------------------------------------------------  Regularization Functions----------------------------------------------------------------------*/static void _regshape (CLSET *clset){                               /* --- regularize cluster shapes */  int     i, k;                 /* loop variable */  int     type;                 /* cluster type flags */  CLUSTER *p;                   /* to traverse the clusters */  double  t, a, b;              /* temporary buffers */  double  min, max;             /* minimum and maximum eigenvalue */  assert(clset);                /* check the function argument */  type = clset->type;           /* get cluster type flags */  a    = clset->regps[3];       /* and the regularization parameter */  if (!(type & (CLS_COVARS|CLS_VARS))  ||  (clset->incnt <= 1)       /* check whether the shape is fixed, */  ||  ((a <= 0) && (a >= -1)))  /* the data space is one-dimensional, */    return;                     /* or no regularization is to be done */  for (p = clset->cls +(i = clset->clscnt); --i >= 0; ) {    if ((--p)->d2 < 0) continue;/* traverse clusters to be updated */    b = clset->regps[3];        /* get the regularization parameter */    if (b > 0)                  /* if standard version */      a = b*b *p->msd;          /* compute offset \sigma^2 * h^2 */    else {                      /* if alternative version */      if (type & CLS_COVARS) {  /* if adaptable covariances */        mat_3dred(clset->buf, clset->buf +clset->incnt,                  clset->mat, p->smp, MAT_UPPER);        mat_3dqli(clset->buf, NULL,                  clset->buf, clset->buf +clset->incnt,                  clset->incnt, 256);      }                         /* compute the eigenvalues */      min = DBL_MAX; max = 0;   /* initialize the eigenvalue range */      for (k = clset->incnt; --k >= 0; ) {        t = (type & CLS_COVARS) ? clset->buf[k] : mat_get(p->smp, k, k);        if (t < min) min = t;   /* traverse the eigenvalues and */        if (t > max) max = t;   /* find their minimum and maximum */      }                         /* for the ratio computation */      a = b*b; t = max -a *min; /* compute numerator of fraction */      if (t <= 0) continue;     /* and check against maximum ratio */      a = t /(a -1);            /* compute the regularization value */    }                           /* to ensure the maximum ratio */    mat_diaadds(p->smp, a);     /* and add it to the diagonal */    if (type & CLS_COVARS) {    /* if adaptable covariances */      mat_chdecom(p->inv, p->smp);      t = mat_chdet(p->inv);    /* decompose the covariance matrix */      t = ((t >= MINDET) && (t <= MAXDET))        ? pow(t,              1.0/clset->incnt)        : exp(mat_chlogd(p->inv) /clset->incnt);      if (t < MINVAR) t = MINVAR;      if (t > MAXVAR) t = MAXVAR;      mat_trmuls(p->smp, p->smp, MAT_UPPER, p->msd /t);      mat_chdecom(p->inv, p->smp); }    else if (type & CLS_VARS) { /* if adaptable variances */      t = mat_diaprod(p->smp);  /* compute new determinant */      t = ((t >= MINDET) && (t <= MAXDET))        ? pow(t,              1.0/clset->incnt)        : exp(mat_dialog(p->smp) /clset->incnt);      if (t < MINVAR) t = MINVAR;      if (t > MAXVAR) t = MAXVAR;      mat_diamuls(p->smp, p->msd /t);    }                           /* rescale the (co)variances */  }}  /* _regshape() *//*--------------------------------------------------------------------*/static void _regsize (CLSET *clset){                               /* --- regularize cluster sizes */  int     i;                    /* loop variable */  int     type;                 /* cluster type flags */  CLUSTER *p;                   /* to traverse the clusters */  double  s, t, a, b;           /* temporary buffers */  double  min, max;             /* minimum and maximum size */  assert(clset);                /* check the function argument */  type = clset->type;           /* get cluster type flags, */  s    = clset->regps[2];       /* the scaling factor, */  a    = clset->regps[1] *0.5;  /* the variance exponent, and */  b    = clset->regps[0];       /* the regularization offset */  if (!(type & CLS_SIZE)        /* check whether the size is fixed */  ||  (a <= 0) || (s == 0) || ((s == 1) && (b == 0)))    return;                     /* or no regularization is to be done */  /* --- prepare clusters not updated --- */  for (p = clset->cls +(i = clset->clscnt); --i >= 0; ) {    if ((--p)->d2 >= 0) continue;  /* traverse marked clusters */    p->d2  = 0;                 /* mark the cluster for update */    p->msd = p->var;            /* copy the isotropic variance */    if      (type & CLS_COVARS){/* copy the old covariances */      mat_copy(p->smp, p->cov, MAT_UPPER);      mat_chdecom(p->inv, p->smp); }    else if (type & CLS_VARS)   /* copy the old variances */      mat_copy(p->smp, p->cov, MAT_DIAG);    else                        /* copy the old center vector */      vec_copy(p->sum, p->ctr, clset->incnt);  }                             /* (make new state identical to old) */  /* --- regularize the cluster size --- */  if (b < -1) {                 /* if alternative version */    min = DBL_MAX; max = 0;     /* initialize the size range */    for (p += i = clset->clscnt; --i >= 0; ) {      t = pow((--p)->msd, a);   /* compute the cluster sizes */      if (t < min) min = t;     /* and determine their minimum */      if (t > max) max = t;     /* and their maximum for the */    }                           /* size ratio computation */    t = max +b *min;            /* compute numerator of fraction */    if (t <= 0) return;         /* check against the maximum ratio */    b = t /(-b -1);             /* compute the regularization offset */  }                             /* to ensure the maximum ratio */  if (clset->regps[2] > 0) {    /* if to compute full-fledged version */    if (b >= 0) {               /* if to equalize the sizes partially */      for (s = 0, p += i = clset->clscnt; --i >= 0; ) {        s += t = pow((--p)->msd, a);        p->d2 = t +b;           /* sum the cluster sizes and */      }                         /* note the increased cluster sizes */      s /= s +clset->clscnt *b;}/* compute the renormalization factor */    else {                      /* if to equalize the sizes fully */      for (s = 0, p += i = clset->clscnt; --i >= 0; ) {        (--p)->d2 = 1; s += pow(p->msd, a); }                        s /= clset->clscnt;       /* sum the cluster sizes and */    }                           /* compute the normalization factor */    s *= clset->regps[2]; }     /* multiply with the scaling factor */  else {                        /* if to compute simplified version */    if (b < 0) return;          /* check for non-negative offset */    for (p += i = clset->clscnt; --i >= 0; ) {      --p; p->d2 = pow(p->msd, a) +b; }    s = -clset->regps[2];       /* compute the new cluster sizes */  }                             /* and get the size scaling factor */  b = 1/a;                      /* get the inverse variance exponent */  for (p += i = clset->clscnt; --i >= 0; ) {    t = pow(s *(--p)->d2, b);   /* compute the new cluster size */    a = t/p->msd; p->msd = t;   /* get the scaling factor and store */    if      (type & CLS_COVARS) /* if adaptable covariances */      mat_trmuls(p->smp, p->smp, MAT_UPPER, a);    else if (type & CLS_VARS)   /* if adaptable variances */      mat_diamuls(p->smp, a);   /* scale (co)variances to new size */  }                             /* (that is, new determinant) */}  /* _regsize() *//*--------------------------------------------------------------------*/static void _regweight (CLSET *clset){                               /* --- regularize cluster weights */  int     i;                    /* loop variable */  CLUSTER *p;                   /* to traverse the clusters */  double  min, max;             /* minimum and maximum weight */  double  t, a;                 /* regularization parameter, buffer */  assert(clset);                /* check the function argument */  a = clset->regps[4];          /* get the weight reg. parameter */  if (!(clset->type & CLS_WEIGHT)  ||  ((a <= 0) && (a >= -1)))  /* check whether the weight is fixed */    return;                     /* or no regularization is to be done */  min = DBL_MAX; max = 0;       /* initialize sum and weight range */  for (p = clset->cls +(i = clset->clscnt); --i >= 0; ) {    if ((--p)->nw < min) min = p->nw;    if (   p ->nw > max) max = p->nw;  }                             /* determine the weight range */  if (a < 0) {                  /* if alternative reg. version, */    a = -a; t = max -a *min;    /* compute numerator of fraction */    a = (t > 0) ? t /(a-1) : 0; /* and check against maximum ratio */  }  t = 1 /(1 +a *clset->clscnt); /* compute the normalization factor */  for (p += i = clset->clscnt; --i >= 0; ) {    --p; p->nw = t *(p->nw+a);} /* compute new cluster weights */}  /* _regweight() *//*----------------------------------------------------------------------  Parameter Update Functions----------------------------------------------------------------------*/static double _standard (CLSET *clset,                         double grd, double *prv, double *chg){                               /* --- standard update */  return grd;}  /* _standard() *//*--------------------------------------------------------------------*/static double _expand (CLSET *clset,                       double grd, double *prv, double *chg){                               /* --- update expanded by a factor */  return clset->growth *grd;}  /* _expand() *//*--------------------------------------------------------------------*/static double _momentum (CLSET *clset,                         double grd, double *prv, double *chg){                               /* --- update with momentum term */  return *chg = grd +*chg *clset->moment;}  /* _momentum() *//*--------------------------------------------------------------------*/static double _adaptive (CLSET *clset,                         double grd, double *prv, double *chg){                               /* --- self-adaptive learning rate */  double t;                     /* temporary buffer */  if      (grd > 0) t =  *prv;  /* check the directions */  else if (grd < 0) t = -*prv;  /* of the changes in this */  else              t =  0;     /* and the preceding step */  if      (t > 0) {             /* if gradients have the same sign */    *chg *= clset->growth;      /* increase the learning rate */    if (*chg > clset->maxchg) *chg = clset->maxchg;    *prv = grd; }               /* note the current gradient */  else if (t < 0) {             /* if gradients have opposite signs */    *chg *= clset->shrink;      /* decrease the learning rate */    if (*chg < 1) *chg = 1;     /* the minimum learning rate is 1 */    *prv = 0; }                 /* suppress a change in the next step */  else {                        /* if one gradient is zero */    *prv = grd; }               /* only note the current gradient */  return *chg *grd;             /* return the parameter change */}  /* _adaptive() *//*--------------------------------------------------------------------*/static double _resilient (CLSET *clset,                          double grd, double *prv, double *chg){                               /* --- resilient backpropagation */  double t;                     /* temporary buffer */  if (*chg == 0) {              /* if no step has been carried out, */    *chg = fabs(grd); return *prv = grd; } /* initialize the change */  if      (grd > 0) t =  *prv;  /* check the directions */  else if (grd < 0) t = -*prv;  /* of the changes in this */  else              t =  0;     /* and the preceding step */  if      (t > 0) {             /* if gradients have the same sign */    *chg *= clset->growth;      /* increase the learning rate */    if (*chg > clset->maxchg) *chg = clset->maxchg;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久国产精品免费| 成人精品亚洲人成在线| 婷婷六月综合亚洲| 亚洲国产精品天堂| 国产精品亲子乱子伦xxxx裸| 国产日韩高清在线| 国产精品网站在线观看| 国产精品网站在线播放| 亚洲国产成人一区二区三区| 中文字幕第一区二区| 国产亚洲综合av| 国产精品久久福利| 1区2区3区欧美| 亚洲卡通动漫在线| 亚洲国产日韩综合久久精品| 一二三四区精品视频| 亚洲第一在线综合网站| 日韩精品一二区| 麻豆精品新av中文字幕| 激情亚洲综合在线| 国产白丝精品91爽爽久久| jlzzjlzz亚洲女人18| 在线精品视频一区二区三四| 欧美乱妇20p| 日韩精品一区二区在线观看| 精品久久99ma| 国产精品每日更新在线播放网址| 亚洲日本欧美天堂| 午夜激情综合网| 黑人巨大精品欧美一区| 国产高清视频一区| 99久久久精品| 欧美精品在线一区二区三区| 日韩欧美在线网站| 国产欧美日韩中文久久| 亚洲精品国产a| 免费成人结看片| 国产成人在线免费观看| 91在线精品一区二区| 欧美日韩国产精品自在自线| 精品久久久久久最新网址| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 欧美日韩精品一区二区三区四区| 日韩情涩欧美日韩视频| 国产精品国产三级国产aⅴ无密码| 亚洲在线观看免费视频| 国产一区二区三区在线看麻豆| 9色porny自拍视频一区二区| 日韩一卡二卡三卡国产欧美| 国产精品美女视频| 日韩国产欧美三级| 成人黄色av网站在线| 欧美区视频在线观看| 国产三级欧美三级| 亚洲国产裸拍裸体视频在线观看乱了 | 精品三级在线观看| 亚洲日本成人在线观看| 精品影视av免费| 色综合夜色一区| 久久九九全国免费| 亚洲18影院在线观看| 国产mv日韩mv欧美| 777色狠狠一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟| 香蕉影视欧美成人| 91色乱码一区二区三区| 精品国产免费一区二区三区四区| 亚洲美女免费视频| 国产乱对白刺激视频不卡| 欧美日韩亚洲国产综合| 中文字幕一区av| 国产福利电影一区二区三区| 91精品国产综合久久精品性色| 中文字幕日韩精品一区| 国产一区二区中文字幕| 5858s免费视频成人| 亚洲免费观看在线观看| 高清国产一区二区| wwwwxxxxx欧美| 日韩精品91亚洲二区在线观看| 91美女在线观看| 亚洲国产精品国自产拍av| 麻豆精品在线看| 3d成人h动漫网站入口| 一区二区成人在线观看| 成人综合婷婷国产精品久久免费| 日韩欧美成人午夜| 日韩av高清在线观看| 欧美午夜在线观看| 亚洲乱码一区二区三区在线观看| 国产精品99久久久久久宅男| 精品日本一线二线三线不卡 | 欧美午夜影院一区| 一区二区三区四区乱视频| av亚洲精华国产精华| 中文一区在线播放| 国产99一区视频免费| wwwwww.欧美系列| 久久99精品国产.久久久久久 | 日韩国产高清影视| 欧美日韩国产精品成人| 香蕉久久夜色精品国产使用方法| 欧美怡红院视频| 亚洲线精品一区二区三区八戒| 欧洲人成人精品| 亚洲国产毛片aaaaa无费看| 欧美午夜精品免费| 婷婷综合久久一区二区三区| 7777精品伊人久久久大香线蕉经典版下载| 一区二区久久久久| 欧美午夜精品免费| 免费国产亚洲视频| www精品美女久久久tv| 国内精品不卡在线| 国产日韩欧美麻豆| 暴力调教一区二区三区| 一区二区三区精品| 制服丝袜激情欧洲亚洲| 久草中文综合在线| 国产日韩精品一区二区三区| hitomi一区二区三区精品| 一区二区三区精品视频| 欧美精品日韩精品| 精品一区精品二区高清| 国产欧美一区视频| 色综合天天视频在线观看| 亚洲线精品一区二区三区八戒| 欧美精品粉嫩高潮一区二区| 麻豆精品新av中文字幕| 国产精品色哟哟| 欧美日韩日日摸| 麻豆传媒一区二区三区| 欧美高清在线视频| 91国产免费观看| 麻豆国产精品一区二区三区| 中文字幕免费不卡| 欧美日韩国产首页在线观看| 精品在线亚洲视频| 亚洲精品中文字幕乱码三区| 欧美高清视频一二三区| 国产精品88av| 亚洲国产精品一区二区久久| 久久久影视传媒| 欧洲精品中文字幕| 久久99蜜桃精品| 亚洲精品精品亚洲| 精品国产一区二区三区四区四| hitomi一区二区三区精品| 日韩成人精品视频| 国产精品美女久久久久久久| 欧美色窝79yyyycom| 韩国欧美国产一区| 亚洲高清中文字幕| 国产亚洲成年网址在线观看| 欧美日韩一区二区三区在线| 国产精品1区2区3区| 三级成人在线视频| 国产精品福利一区| 精品欧美一区二区久久| 一本大道久久a久久精品综合| 久久不见久久见免费视频7| 亚洲精品日韩一| 欧美国产1区2区| 日韩免费观看高清完整版| 色av综合在线| 国产精品夜夜嗨| 麻豆国产一区二区| 亚洲午夜三级在线| 国产精品大尺度| 久久精品一区二区三区四区| 91精品午夜视频| 91成人国产精品| 大胆亚洲人体视频| 久久精品国产亚洲5555| 午夜电影网亚洲视频| 一区精品在线播放| 久久精品一区二区| 欧美电影免费观看高清完整版在线 | 亚洲一区二区美女| 国产精品久久久久久亚洲伦| 日韩精品一区二| 91精品国产高清一区二区三区蜜臀| 99国产精品久久久久| 成人一二三区视频| 国产伦精品一区二区三区免费 | 亚洲在线一区二区三区| 国产精品亲子伦对白| 国产色产综合色产在线视频| 日韩三级伦理片妻子的秘密按摩| 欧美另类一区二区三区| 欧美性受xxxx黑人xyx| 日本韩国精品在线| 97精品久久久午夜一区二区三区| 国产伦精品一区二区三区在线观看| 久久不见久久见免费视频7| 免费黄网站欧美| 麻豆91在线播放免费| 免费观看一级特黄欧美大片| 日韩1区2区3区| 日韩二区三区在线观看|