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

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

?? ginisvm.h

?? 也是一個不錯的SVM實現算法。經常有人要用的
?? H
字號:
#ifndef _GINI_SVM_BLOCK_#define _GINI_SVM_BLOCK_/*****************************************************************************/// NAME :  Gini Support Vector Machine interface// // DESCRIPTION :  Interface file to GiniSVM class.//// USAGE ://// KNOWN BUGS ://// BUG REPORT: shantanu@jhu.edu///*****************************************************************************/#include<ginidefs.h>#include<ginikernel.h>#include<stdio.h>#include<sys/time.h>// The SVM machine includes four modes , in which the state could be// Evaluation mode where the machine only makes produces decision based // on the input vector// GiniSVMBLKTRN mode is the normal mode of operation where the // machine does a batch training over given input data points// GiniSVMHUGTRN mode is used when the training data size is very large// and hence an single optimization mode is followed.// GiniSVMSEQTRN mode is the sequential training mode, where in optimization// is based on the previous support vectors and the current input.// GiniSVMTRANS mode is the transductive mode of the SVM wherein the// the machine learns from unlabeled samples based on the the previous// training examples.// GiniSVMCOMADAPT is the SVM learning mode where the machine adapts the // complexity trade off term C to achieve better generalization metric// implying the number of support vectors.a// GiniSVMKERADAPT is the SVM learning mode where the machine tries to // adapt the kernel parameters to achieve better generalization.// GiniSVMRAW is the start mode for the machine wherein the machine has not// been trained as yet. //// This machine tries to optimize memory by simulating virtual memory// wherein all the kernel values are computed before hand and they// stored in memory which is partially mapped to hard-disk. Only the// cache correspoding to the support vectors are stored and the rest// are kept on the disk. enum GiniSVMTrainingMode{   GINISVM_EVAL,   GINISVM_BLKTRN,   GINISVM_HUGTRN,   GINISVM_SEQTRN,   GINISVM_TRANS,   GINISVM_COMADAPT,   GINISVM_KERADAPT,   GINISVM_RAW};enum GiniSVMErrno{   GINISVM_NOERROR,   GINISVM_OUTOFMEM,   GINISVM_BADFORMAT};enum GINI_status{   GINI_UP_DOWN,   GINI_DOWN,   GINI_UP};struct GINI_Set{   GINI_u32 dataind;   GINI_double alpha;   GINI_double E;   GINI_u32 shrinklevel;   GINI_u32 cachehits;   GINI_bool cacheupdate;   GINI_Set  *next;   GINI_Set  *prev;};class GINI_SVMBlock{   // Holds the lagrangian values   // For a multi-class scenario this is a    // multi-dimensional array.   GINI_double** lagrange;   // Support Vectors   GINI_double** supportVectors;   // Bias which is a vector in a multi-class   // case.   GINI_double *bias;   // Number of SVs   GINI_u32 numberofSVs;   // Feature vector dimension   GINI_u32 dimension;   // Number of classes   GINI_u32 classes;   // Rate Distortion Factor   GINI_double rdist;   // Type of kernel   GINI_SVMKernel *kernel;   // Training Mode   GiniSVMTrainingMode mode;   //-----------------------------   // Training parameters   //-----------------------------   // Training Labels which are prior   // probabilities indicating our initial   // confidence values.   GINI_double **Y;   // Margin Vector Set   GINI_Set **svset;   // Suitable set candidate for computing   // the second heuristic in SMO.   GINI_Set **maxE;   GINI_Set **minE;   // Cache for storing decision functions.   GINI_Set ***svmap;   // Training data   GINI_double **traindata;   // Memory to store the set sizes for all the   // classes.   GINI_u32 *setsize;   // List iterator used by examineExample   GINI_Set *globalptr;   // Total number of data points   GINI_u32 totaldata;   // Training size for the support vector   // machine training   GINI_u32 maxtraindata;   // Complexity trade off parameter   GINI_double *C;   // Tolerance value for the values of lagrangians   GINI_double alphaeps;   // Tolerance for kkt condition   GINI_double kkteps;   // Search window size when random data points   // are selected.   GINI_u32 srchwindow;   // Percent decrease in the cost function   GINI_double costeps;   // Costfunction window   // Number of times the cost function is computed.   GINI_u32 costwindow;   // Total number of cache hits   GINI_u32 numofhits;   // Total number of cache hits   GINI_u32 maxsvsrch;   // Total number of cache hits   GINI_u32 kktiter;   // Total number of first level iterations   GINI_u32 fpass;   // Seed for using the random number generator   GINI_u32 seed;   // Floor count gives the number of times   // truncation occurs.   GINI_u32 floorcount;   // Truncation for alphas at the end of training.   // for approximate solutions.   GINI_double threshold;   // Number of training iterations   GINI_u32 iterations;   // Boolean indicator to indicate if there   // is space remaining in the cache.   GINI_bool cachefull;   // Errno for error tracking   GINI_ERROR_VAL ginierr;   // Statistics variables   // Number of times in the loop svs were deleted   // and added.   GINI_u32 numofdel;   GINI_u32 numofadd;   GINI_u32 phase1;   GINI_u32 phase2;   GINI_u32 phase3;   GINI_u32 phase4;   GINI_u32 startupsize;   GINI_double timer1;   GINI_double timer2;   GINI_double timer3;   GINI_double timer4;   GINI_double timer5;   GINI_double timer6;   GINI_double timer7;   GINI_double timer8;   //-----------------------------   // private functions   //-----------------------------   GINI_double currtimeval( struct timeval *cmp );   void printtimers();   void _purgesvlist();   // Main 4x4 optimization routine   // that uses four coefficients to   // optimize at the same time.   GINI_u32 _takestep (  GINI_u32 i1,                        GINI_u32 c1,                        GINI_u32 i2,                        GINI_u32 c2,			GINI_double *E11,			GINI_double *E12,			GINI_double *E21,			GINI_double *E22                     );   // Inner Loop that looks for the second example   // to optimize   GINI_u32 _examineExample( GINI_u32 i1 );   GINI_u32 _examinesvExample( GINI_u32 i1 );   // Get an estimate of the bias   void _biasestimate();   // Get an estimate of KKT condition   // for each data point   GINI_bool _kktcondition( GINI_u32 dataind, 		            GINI_u32 *decision,			    GINI_double *E11,			    GINI_status *dir                          );   GINI_bool _kktsvcondition( GINI_u32 dataind, 		            GINI_u32 *decision,			    GINI_double *E11,			    GINI_status *dir                          );   // Removes an element from the link list.   void _removeelement(GINI_u32 classid, GINI_Set *ptr);   // Adds an element to the link list.   GINI_Set* _addelement(  GINI_u32 dataid, 		      GINI_u32 classid,		      GINI_double ecache,		      GINI_double alpha                   );   // Evaluates the threshold function based on   // reverse water-filling procedure and the unormalized   // array of class evaluation functions.   GINI_double _evaluateThreshold( GINI_double *currfn);   GINI_status _getdirection( GINI_u32 dataid, GINI_u32 classid);   GINI_u32 _minmaxopt();   //-----------------------------   // public functions   //-----------------------------   public:   // Constructor   GINI_SVMBlock( GINI_SVMKernel *initkernel );   // Destructor   virtual ~GINI_SVMBlock();   // Initialization of SVM machine using an input   // configuration file   GINI_bool Initialize( FILE *input );   // Sequentially add training data to the    // support vector machine.   GINI_bool InsertTrainingData( GINI_double *label, GINI_double* data);   // Sequentially add training data to the    // support vector machine with a prior indicating the weightage   // of the data point.   GINI_bool InsertTrainingData( GINI_double *label,                                  GINI_double* data,                                 GINI_double prior		               );   // Saves the GiniSVM configuration in a file   GINI_bool Write( FILE *output);   // Reads in the GiniSVM configuration from a file   GINI_bool Read( FILE *output);   // Initializes training mode for the SVM machine.   GINI_bool InitTraining(                            // Number of data points                           GINI_u32 number,                                     // Number of input dimension                              GINI_u32 dimension,                           // Number of Classes                              GINI_u32 inpclass,                           // Starting complexity tradeoff term                           GINI_double *C,			   // Rate distortion factor			   GINI_double rdist,                           // Tolerance value for the lagrangians                           GINI_double inpeps,			   // Tolerance value for kkt			   GINI_double inpkkteps,			   // Search window parameter			   GINI_u32 srchwindow,			   // Cost function tolerance			   GINI_double inpcosteps,			   // Length of cost window			   GINI_u32   inpcostwindow,			   // Cache-hit threshold			   GINI_u32  hitthreshold,			   // Maximum sv search window			   GINI_u32  maxsvsrch,			   // KKT tolerance increase window			   GINI_u32  liter,			   // Number of first passes over full			   // optimization			   GINI_u32 inpfpass   );   // Start Training the machine   // precomp is a flag saying if the kernel values   // are to be pre-computed or not. Verbose flag toggles   // between printing detail optimization information.   GINI_bool StartTraining( GINI_bool precomp, 		            GINI_u32 iter,		            GINI_bool verbose		          );   // Stop training the SVM machine   GINI_u32 StopTraining();   //-----------------------------------   // Post Training evaluation Functions   //-----------------------------------     // SVM decision function based on the  input vector    virtual void Value ( GINI_double* input, GINI_double* output );   // GiniSVM decision function based on the  input vector    virtual void GiniProb ( GINI_double* input, GINI_double* output );   // Total amount of memory required to store this machine   GINI_u32 GetSize() { return numberofSVs; }   // Gets the dimension of the support vectors for this    // machine.    GINI_u32 GetDimension() { return dimension; }   // Returns threshold value for this SVM   GINI_double GetThreshold( GINI_u32 classid ) { return bias[classid]; }   // Access to the value of weights parameters   GINI_double GetAlpha( GINI_u32 index , GINI_u32 classid ) { return lagrange[index][classid]; }   // Returns the value of a support vector element    GINI_double GetSVElement( GINI_u32 i, GINI_u32 j) { return supportVectors[i][j]; }   // Returns the number of classes.   GINI_u32 GetClasses() { return classes; }   //-----------------------------------   // Performance functions   //-----------------------------------   // Total number of points this machine has been trained on   GINI_u32 GetNumberofTrainingPoints() { return totaldata;  }   //-----------------------------------   // Debug functions   //-----------------------------------   // Computes the cost function to check if    // the value actually decreases or not.   GINI_double CostFunction();   GINI_double evaluateCache( GINI_u32 dind, GINI_u32 cind );};#endif   

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一区在线观看| 精品免费视频.| 日韩一区二区电影网| 国产性做久久久久久| 亚洲3atv精品一区二区三区| 国产激情视频一区二区在线观看| 在线影院国内精品| 欧美激情一区不卡| 久久精品国产亚洲5555| 91福利在线免费观看| 国产网红主播福利一区二区| 水蜜桃久久夜色精品一区的特点| 成人一道本在线| 久久免费看少妇高潮| 麻豆精品久久久| 欧美欧美午夜aⅴ在线观看| 椎名由奈av一区二区三区| 成人午夜大片免费观看| 欧美久久久影院| 亚洲国产成人精品视频| 99久久伊人久久99| 中文字幕乱码久久午夜不卡| 狠狠色综合色综合网络| 91精品国产日韩91久久久久久| 亚洲日本在线天堂| 99久久精品99国产精品| 中文av字幕一区| 成人一道本在线| 国产精品素人一区二区| 福利一区二区在线观看| 中文字幕精品三区| 国产成人综合视频| 国产精品乱人伦中文| www.亚洲色图| 亚洲黄色片在线观看| 91在线视频播放| 亚洲综合色成人| 欧美日韩一区二区三区不卡| 午夜婷婷国产麻豆精品| 欧美一区二区视频网站| 极品美女销魂一区二区三区| 久久奇米777| 成人高清免费在线播放| 综合久久久久久久| 欧美午夜精品久久久久久超碰| 亚洲一区二区三区自拍| 3d成人h动漫网站入口| 美国欧美日韩国产在线播放| 久久奇米777| 色呦呦网站一区| 丝袜美腿亚洲色图| 久久视频一区二区| 99麻豆久久久国产精品免费优播| 成人欧美一区二区三区白人| 色丁香久综合在线久综合在线观看| 一区二区三区视频在线观看| 91精品一区二区三区久久久久久| 激情综合五月婷婷| 亚洲日本在线视频观看| 7777精品伊人久久久大香线蕉的 | 国产亚洲一本大道中文在线| 国产成人综合视频| 亚洲最新在线观看| 日韩情涩欧美日韩视频| 成人的网站免费观看| 一个色综合网站| 337p日本欧洲亚洲大胆色噜噜| 成人永久aaa| 日韩av电影免费观看高清完整版在线观看| 欧美不卡一区二区三区| 91尤物视频在线观看| 男男成人高潮片免费网站| 国产精品久久久久桃色tv| 欧美日本一区二区三区| heyzo一本久久综合| 麻豆成人91精品二区三区| 亚洲三级在线看| 久久影院电视剧免费观看| 欧洲一区在线电影| 丁香婷婷深情五月亚洲| 美脚の诱脚舐め脚责91| 一区二区三区四区乱视频| 欧美国产乱子伦| 精品久久久久久最新网址| 91精品福利视频| 成人午夜激情片| 国产综合成人久久大片91| 日韩精品电影一区亚洲| 亚洲欧洲99久久| 日本一区二区不卡视频| 精品国产乱码久久| 欧美一级片免费看| 欧美日韩一区二区欧美激情| 99精品国产91久久久久久| 国产精品91xxx| 久久精品国产亚洲aⅴ| 日韩电影免费在线观看网站| 悠悠色在线精品| 中文字幕在线不卡一区| 国产午夜亚洲精品午夜鲁丝片 | 欧美艳星brazzers| 91女人视频在线观看| 成人国产精品免费观看视频| 久久99精品久久久久久国产越南 | 另类成人小视频在线| 一区二区三区四区av| 亚洲色图欧美在线| 日韩毛片视频在线看| 国产精品美女久久久久久久网站| 久久一区二区三区国产精品| 精品国产123| www激情久久| 久久青草国产手机看片福利盒子| 精品久久久三级丝袜| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 99久久精品费精品国产一区二区| 国产成人自拍网| 国产精品一区二区久久不卡| 国产精品原创巨作av| 成人自拍视频在线观看| 白白色 亚洲乱淫| 色老头久久综合| 欧美日韩在线播放三区四区| 欧美片在线播放| 26uuu色噜噜精品一区二区| 国产片一区二区三区| 中文字幕永久在线不卡| 亚洲激情综合网| 免费在线观看视频一区| 久久电影网站中文字幕 | 亚洲不卡av一区二区三区| 亚洲高清视频在线| 奇米一区二区三区| 国产白丝网站精品污在线入口| 丰满亚洲少妇av| 91精品办公室少妇高潮对白| 欧美日韩精品一区二区在线播放| 91精品啪在线观看国产60岁| 精品国精品国产| 国产精品久久看| 亚洲小少妇裸体bbw| 老司机精品视频导航| 成人手机在线视频| 欧美日韩免费视频| 久久众筹精品私拍模特| 亚洲综合清纯丝袜自拍| 极品少妇一区二区| 在线观看国产91| 国产亚洲欧美中文| 无码av免费一区二区三区试看| 狠狠狠色丁香婷婷综合激情| 日本精品一级二级| 日韩美女视频一区二区在线观看| 国产欧美精品在线观看| 尤物在线观看一区| 国产电影精品久久禁18| 欧美日韩二区三区| 国产精品美女www爽爽爽| 亚洲mv大片欧洲mv大片精品| 丁香六月久久综合狠狠色| 欧美日韩国产天堂| 国产精品伦理一区二区| 麻豆精品国产传媒mv男同| 91久久精品一区二区| 久久精品一区二区三区不卡| 午夜精品久久久久久久久| 成人免费三级在线| 欧美成人猛片aaaaaaa| 亚洲一区二区三区美女| 成人av电影在线播放| 精品久久久久久久久久久久久久久| 自拍偷自拍亚洲精品播放| 国产一区二三区| 欧美一区2区视频在线观看| 亚洲色图20p| 97超碰欧美中文字幕| 国产欧美精品日韩区二区麻豆天美| 日韩激情av在线| 欧亚一区二区三区| 亚洲综合一区二区三区| 99国产一区二区三精品乱码| 国产欧美一区二区精品仙草咪| 欧美a级理论片| 9191成人精品久久| 亚洲午夜激情网站| 欧美在线观看视频在线| 日韩理论片一区二区| aaa国产一区| 国产精品丝袜91| 成人激情免费网站| 国产精品久久国产精麻豆99网站| 国产黄色成人av| 国产亚洲综合色| 成人午夜碰碰视频| 国产精品全国免费观看高清 | 欧美一级片免费看| 日日嗨av一区二区三区四区| 欧美日高清视频| 免费成人深夜小野草| 日韩精品一区二区三区四区|