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

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

?? cluster1.c

?? 聚類算法全集以及內附數據集
?? C
?? 第 1 頁 / 共 4 頁
字號:
/*----------------------------------------------------------------------  File    : cluster1.c  Contents: cluster and cluster set management (basic functions)  Author  : Christian Borgelt  History : 05.09.2001 file created            11.09.2001 functions cls_range, cls_reg, cls_expand added            15.09.2001 first version of fuzzy c-means completed            07.08.2002 parsing function completed            30.01.2003 data normalization code added            01.02.2003 extended functions (for tuples) added            02.02.2003 extended parse function added            07.02.2003 reinitialization added to function cls_range            09.03.2003 some initialization moved to separate routines            13.03.2003 membership degree normalization made optional            10.04.2003 matrix initialization bug in _params fixed            15.05.2003 membership normalization modes added            16.05.2003 noise clustering added            06.08.2003 bug in mapping binary attributes fixed            11.08.2003 adapted to new module attmap            12.08.2003 adapted to new module nstats            14.08.2003 bug in _params fixed (covariance matrix reading)            15.08.2003 adapted to new module radfn            16.02.2004 bug in _params for vector of variances fixed            23.02.2004 bug in function _params fixed            25.02.2004 adapted to changed radfn, bug in cls_exec fixed            27.02.2004 function cls_deletex added            01.03.2004 update functions moved to a separate file            17.03.2004 missing evaluation of cluster weight added            18.03.2004 normalization parameters added            25.04.2004 bug in function cls_unscale fixed            21.06.2004 reading covariances made more robust            28.07.2004 bug in function _params (cls_parse) fixed            12.08.2004 adapted to new module parse----------------------------------------------------------------------*/#include <stdlib.h>#include <limits.h>#include <float.h>#include <string.h>#include <assert.h>#include "cluster.h"/*----------------------------------------------------------------------  Preprocessor Definitions----------------------------------------------------------------------*/#define BLKSIZE      16         /* block size for cluster vector */#define MINVAR       1e-12      /* minimal variance */#define MAXVAR       1e+12      /* maximal variance */#define MINDET       1e-48      /* minimal determinant */#define MAXDET       1e+48      /* maximal determinant *//*----------------------------------------------------------------------  Constants----------------------------------------------------------------------*/static char *nrmnames[] =       /* names of normalization modes */  { "none", "sum1", "max1", "hard" };/*----------------------------------------------------------------------  Auxiliary Functions----------------------------------------------------------------------*/static void _init (CLSET *clset, int incnt, int clscnt){                               /* --- initialize some variables */  clset->type     = CLS_CENTER; /* prototypes consist of centers only */  clset->incnt    = incnt;  clset->clscnt   = clscnt;  clset->radfn    = rf_cauchy;  /* default radial function: */  clset->rfnps[0] = 2;          /* \mu(x) = 1/d^2(\vec{x},\vec{c}) */  clset->rfnps[1] = 0;          /* (standard fuzzy clustering) */  clset->norm     = rf_cauchy(-incnt, clset->rfnps);  clset->noise    = clset->msd[0] = clset->msd[1] = 0;  clset->nrmps[0] = 1;          /* default normalization: */  clset->nrmps[1] = 0;          /* u_ij = u_ij^* /sum_k u_{kj}^* */  clset->mode     = CLS_SUM1;  clset->method   = CLS_ALTOPT|CLS_NONE;  clset->msexp    = 2;          /* exponent: std. fuzzy clustering */  clset->regps[0] = 0;          /* regularization parameters */  clset->regps[1] = 1;          /* (b, a, s, h, w) */  clset->regps[2] = 1;  clset->regps[3] = 0;  clset->regps[4] = 0;  clset->moment   = 0;  clset->growth   = 1.2;  clset->shrink   = 0.5;  clset->maxchg   = 1;  clset->cls      = NULL;       /* initialize pointers, */  clset->vec      = NULL;       /* so that deletion */  clset->mat      = NULL;       /* with cls_delete works */  clset->nst      = NULL;  clset->init     = clset->steps = 0;}  /* _init() *//*--------------------------------------------------------------------*/static int _cluster (CLUSTER *c, int dim){                               /* --- init. a cluster prototype */  c->cov = mat_create(dim, dim);  c->inv = mat_create(dim, dim);  c->smp = mat_create(dim, dim);  c->chv = mat_create(dim, dim);  c->bfv = mat_create(dim, dim);  if (!c->cov || !c->inv || !c->smp || !c->chv || !c->bfv)    return -1;                  /* create cluster-specific matrices */  c->ctr = mat_buf(c->cov);     /* and get their buffer vectors */  c->dif = mat_buf(c->inv);     /* for easier access */  c->sum = mat_buf(c->smp);  c->chc = mat_buf(c->chv);  c->bfc = mat_buf(c->bfv);  c->var = c->wgt = c->scl = 1;  return 0;                     /* return 'ok' */}  /* _cluster() *//*----------------------------------------------------------------------  Cluster Set Functions----------------------------------------------------------------------*/CLSET* cls_create (int incnt, int clscnt){                               /* --- create a set of clusters */  int     i;                    /* loop variable */  CLSET   *clset;               /* created set of clusters */  CLUSTER *c;                   /* to traverse the clusters */  assert((incnt > 0) && (clscnt > 0));/* check the function arguments */  clset = (CLSET*)malloc(sizeof(CLSET));  if (!clset) return NULL;      /* create the base structure */  _init(clset, incnt, clscnt);  /* and initialize the variables */  clset->cls = c = (CLUSTER*)malloc(clscnt *sizeof(CLUSTER));  if (!clset->cls) { cls_delete(clset); return NULL; }  for (c += i = clscnt; --i >= 0; ) { /* clear pointers for cleanup */    --c; c->cov = c->inv = c->smp = c->chv = c->bfv = NULL; }  for (c += i = clscnt; --i >= 0; )   /* initialize the clusters */    if (_cluster(--c, incnt) != 0) { cls_delete(clset); return NULL; }  clset->vec = (double*)malloc(3 *incnt *sizeof(double));  if (!clset->vec) { cls_delete(clset); return NULL; }  clset->buf = clset->vec +incnt;  /* create the numeric vectors */  clset->mat = mat_create(incnt, incnt);  clset->nst = nst_create(incnt);  /* create the numerical statistics */  if (!clset->mat || !clset->nst) { cls_delete(clset); return NULL; }  #ifdef CLS_EXTFN              /* if extended function set, */  clset->attset = NULL;         /* clear the attribute set and */  clset->attmap = NULL;         /* attribute map pointers as a flag */  #endif                        /* for a normal cluster set */  return clset;                 /* return created set of clusters */}  /* cls_create() *//*--------------------------------------------------------------------*/void cls_delete (CLSET *clset){                               /* --- delete a set of clusters */  int     i;                    /* loop variable */  CLUSTER *c;                   /* to traverse the clusters */  assert(clset);                /* check the function argument */  #ifdef CLS_EXTFN              /* if to compile extended functions, */  if (clset->attmap) free(clset->attmap);     /* delete the att. map */  #endif  if (clset->nst) nst_delete(clset->nst);  if (clset->mat) mat_delete(clset->mat);  if (clset->vec) free(clset->vec);  if (clset->cls) {             /* if there is a cluster vector */    for (c = clset->cls +(i = clset->clscnt); --i >= 0; ) {      --c;                      /* traverse the clusters */      if (c->cov) mat_delete(c->cov);      if (c->inv) mat_delete(c->inv);      if (c->smp) mat_delete(c->smp);      if (c->chv) mat_delete(c->chv);      if (c->bfv) mat_delete(c->bfv);    }                           /* delete all matrices */    free(clset->cls);           /* and the cluster vector */  }  free(clset);                  /* delete the base structure */}  /* cls_delete() *//*--------------------------------------------------------------------*/#ifdef CLS_EXTFNCLSET* cls_createx (ATTSET *attset, int marked, int clscnt){                               /* --- create a cluster set */  CLSET  *clset;                /* created cluster set */  ATTMAP *attmap;               /* created attribute map */  assert(attset && (clscnt > 0));  /* check the function arguments */  attmap = am_create(attset, marked, -1);  if (!attmap) return NULL;     /* create an attribute map */  clset  = cls_create(am_incnt(attmap), clscnt);  if (!clset) { am_delete(attmap); return NULL; }  clset->attset = attset;       /* create a cluster set and */  clset->attmap = attmap;       /* note the attribute set and map */  return clset;                 /* return the created cluster set */}  /* cls_cr4sup() *//*--------------------------------------------------------------------*/CLSET* cls_cr4sup (ATTMAP *attmap, int clscnt){                               /* --- create a cluster set */  CLSET *clset;                 /* created cluster set */  assert(attmap && (clscnt > 0));  /* check the function arguments */  clset  = cls_create(am_incnt(attmap), clscnt);  if (!clset) return NULL;      /* create a cluster set */  clset->attset = am_attset(attmap);  clset->attmap = attmap;       /* note the attribute set and map */  return clset;                 /* return the created cluster set */}  /* cls_cr4sup() *//*--------------------------------------------------------------------*/void cls_deletex (CLSET *clset, int delas){                               /* --- delete a set of clusters */  if (delas) as_delete(clset->attset);  cls_delete(clset);            /* delete attribute set */}  /* cls_deletex() */          /* and cluster set */#endif/*--------------------------------------------------------------------*/void cls_reg (CLSET *clset, const double *vec, double weight){                               /* --- register a data point */  #ifdef CLS_EXTFN              /* if to compile extended functions */  int i, k, off;                /* loop variables, offset */  #endif  assert(clset);                /* check the function argument */  nst_reg(clset->nst, vec, weight);  #ifdef CLS_EXTFN              /* if to compile extended functions */  if (vec || !clset->attmap)    /* if not termination or normal */    return;                     /* clustering, abort the function */  for (i = am_attcnt(clset->attmap); --i >= 0; ) {    if (am_type(clset->attmap, i) < 0) continue;    off = am_off(clset->attmap, i);    k   = am_cnt(clset->attmap, i) +off;    while (--k >= off) nst_scale(clset->nst, k, 0, 1);  }                             /* set identity for symbolic attribs. */  #endif                        /* (prevent distortion by scaling) */}  /* cls_reg() *//*--------------------------------------------------------------------*/void cls_value (CLSET *clset, int index, double value){                               /* --- set an input value */  clset->vec[index] = (value -nst_offset(clset->nst, index))                             *nst_factor(clset->nst, index);}  /* cls_value() *//*--------------------------------------------------------------------*/#ifdef CLS_EXTFNvoid cls_regx (CLSET *clset, const TUPLE *tpl){                               /* --- register a training tuple */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩不卡一二三区| 精品va天堂亚洲国产| 国内一区二区在线| 人人狠狠综合久久亚洲| 亚洲成人自拍网| 一本到高清视频免费精品| 国产91富婆露脸刺激对白| 国产剧情一区在线| 国产成人自拍在线| 高清不卡一二三区| 久久国产生活片100| 91免费视频网| 91福利社在线观看| 欧美日韩在线精品一区二区三区激情| 成人综合婷婷国产精品久久免费| 成人激情校园春色| 91视频一区二区| 在线国产亚洲欧美| 欧美一级高清大全免费观看| 精品久久国产老人久久综合| 久久精品亚洲精品国产欧美| 国产精品久久久久久久久果冻传媒 | 秋霞电影网一区二区| 日本一道高清亚洲日美韩| 日韩成人一级片| 欧美xxxxx牲另类人与| 精品国产网站在线观看| 国产精品―色哟哟| 亚洲一二三级电影| 国产综合色在线| 91国产免费观看| 精品国产成人在线影院| 亚洲天堂精品视频| 麻豆91小视频| 色哟哟亚洲精品| 精品国产一区二区三区久久久蜜月 | 一区二区免费在线播放| 日韩国产欧美三级| 成人一二三区视频| 91精品国产综合久久小美女| 久久女同精品一区二区| 亚洲三级电影网站| 韩国在线一区二区| 欧美在线播放高清精品| 国产欧美日韩精品在线| 国产精品久久久久久久久动漫 | 91免费观看视频| 一本久久精品一区二区| 一区二区三区不卡视频| 日韩福利电影在线观看| 婷婷成人综合网| 国产成人免费网站| 精品日本一线二线三线不卡| 欧美日本韩国一区二区三区视频| 国产日韩欧美精品综合| 亚洲一区在线观看视频| 国产suv精品一区二区三区| 91免费版pro下载短视频| 精品99一区二区| 一区二区三区日本| 粉嫩在线一区二区三区视频| 欧美日韩在线直播| 亚洲欧洲国产日韩| 男人操女人的视频在线观看欧美| 色综合久久中文字幕| 久久精品国产秦先生| 一本久久a久久精品亚洲| 欧美精品一区二区高清在线观看| 亚洲欧洲韩国日本视频| 国产成人综合在线播放| 日韩欧美高清在线| 亚洲乱码国产乱码精品精可以看| 国内成人免费视频| 精品1区2区3区| 一区二区三区欧美日| 日韩视频不卡中文| 亚洲午夜免费电影| voyeur盗摄精品| 国产精品青草久久| 国产精品一区二区果冻传媒| 欧美一三区三区四区免费在线看 | 91网页版在线| 国产精品99久久久久久有的能看 | 日韩欧美综合在线| 亚洲线精品一区二区三区| 色老综合老女人久久久| 国产精品久久久久久妇女6080| 国产精品2024| 久久久久久久综合色一本| 国产呦精品一区二区三区网站| 欧美一三区三区四区免费在线看| 日本欧美在线看| 91精品国产一区二区| 午夜亚洲福利老司机| 欧美性xxxxxxxx| 日本三级亚洲精品| 欧美一级理论片| 国产在线精品一区二区不卡了| 91精品国产品国语在线不卡| 青青草国产精品亚洲专区无| 欧美精选午夜久久久乱码6080| 免费在线观看不卡| 日韩欧美一区中文| 成人国产视频在线观看| 中文字幕一区二区三区不卡在线 | 亚洲免费观看在线视频| 欧美一级精品大片| 成人久久久精品乱码一区二区三区| 欧美一区二区三级| 卡一卡二国产精品| 国产婷婷一区二区| 成人一级片网址| 日韩高清中文字幕一区| 日韩精品一区二区三区中文不卡| 国产精品69毛片高清亚洲| 亚洲欧洲日韩综合一区二区| 欧美日韩大陆在线| 国产一区视频导航| 一区二区三区精品在线| 日韩一区二区三区四区| 懂色av一区二区三区免费看| 日韩伦理免费电影| 欧美大片一区二区| www.视频一区| 国产主播一区二区三区| 久久综合狠狠综合久久激情| 亚洲一级二级三级| 精品捆绑美女sm三区| 色爱区综合激月婷婷| 日韩电影在线一区二区| 日韩毛片在线免费观看| 日韩欧美二区三区| 欧美三级韩国三级日本一级| 国产在线不卡一区| 亚洲成a人片在线观看中文| 日韩精品专区在线| 欧美一区二区在线视频| 国产成人av影院| 激情综合五月天| 亚洲综合久久久久| 中文字幕在线视频一区| 日韩一区二区在线观看视频| 欧美日韩高清影院| www.日韩在线| 黄色小说综合网站| 亚洲成人av福利| 中文成人综合网| 日韩精品影音先锋| 欧美精品久久久久久久久老牛影院| 91天堂素人约啪| 国产成人免费高清| 国模娜娜一区二区三区| 国产精品国产三级国产aⅴ入口| 欧美tickle裸体挠脚心vk| 国产伦精品一区二区三区视频青涩| 在线不卡中文字幕播放| av资源站一区| 99视频精品全部免费在线| 中文字幕一区免费在线观看| 国产精品久久久久久久岛一牛影视| 7777女厕盗摄久久久| 91亚洲午夜精品久久久久久| 91免费在线视频观看| 成人午夜看片网址| 成人性视频免费网站| 国产成人免费在线观看不卡| 成人一区二区三区视频在线观看| 狠狠色丁香久久婷婷综| 国产麻豆欧美日韩一区| 精品一区二区免费视频| 国产精品一区专区| 国产精品乡下勾搭老头1| av男人天堂一区| 成人性生交大片| 91成人免费在线视频| 3atv一区二区三区| 欧美电视剧免费全集观看| 亚洲精品一区二区三区影院 | 日韩国产高清在线| 午夜精品aaa| 久久国产夜色精品鲁鲁99| 国产一区二区三区国产| 成人午夜电影网站| av在线一区二区三区| 欧美精品一卡两卡| 91精品国产综合久久精品图片 | 另类小说图片综合网| 国产91对白在线观看九色| 成人美女视频在线观看18| 欧美亚洲国产bt| 91精品国产综合久久小美女| 国产三级精品三级在线专区| 国产精品免费免费| 久久影院午夜论| jvid福利写真一区二区三区| 日韩黄色片在线观看| 久久99热99| 国产麻豆一精品一av一免费| 色哟哟欧美精品| 欧美日精品一区视频|