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

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

?? pr_loqo.c

?? this a SVM toolbox,it is very useful for someone who just learn SVM.In order to be undestood easily,
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * File:        pr_loqo.c * Purpose:     solves quadratic programming problem for pattern recognition *              for support vectors * * Author:      Alex J. Smola * Created:     10/14/97 * Updated:     11/08/97 * Updated:     13/08/98 (removed exit(1) as it crashes svm lite when the margin *                        in a not sufficiently conservative manner) * *  * Copyright (c) 1997  GMD Berlin - All rights reserved * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE of GMD Berlin * The copyright notice above does not evidence any * actual or intended publication of this work. * * Unauthorized commercial use of this software is not allowed */#include <math.h>#include <time.h>#include <stdlib.h>#include <stdio.h>#include "pr_loqo.h"#define	max(A, B)	((A) > (B) ? (A) : (B))#define	min(A, B)	((A) < (B) ? (A) : (B))#define sqr(A)          ((A) * (A))#define	ABS(A)  	((A) > 0 ? (A) : (-(A)))#define PREDICTOR 1#define CORRECTOR 2/*****************************************************************  replace this by any other function that will exit gracefully  in a larger system  ***************************************************************/void nrerror(char error_text[]){  printf("ERROR: terminating optimizer - %s\n", error_text);  /* exit(1); */}/*****************************************************************   taken from numerical recipes and modified to accept pointers   moreover numerical recipes code seems to be buggy (at least the   ones on the web)   cholesky solver and backsubstitution   leaves upper right triangle intact (rows first order)   ***************************************************************/void choldc(double a[], int n, double p[]){  void nrerror(char error_text[]);  int i, j, k;  double sum;  for (i = 0; i < n; i++){    for (j = i; j < n; j++) {      sum=a[n*i + j];      for (k=i-1; k>=0; k--) sum -= a[n*i + k]*a[n*j + k];      if (i == j) {	if (sum <= 0.0) {	  nrerror("choldc failed, matrix not positive definite");	  sum = 0.0;	}	p[i]=sqrt(sum);      } else a[n*j + i] = sum/p[i];    }  }}void cholsb(double a[], int n, double p[], double b[], double x[]){  int i, k;  double sum;  for (i=0; i<n; i++) {    sum=b[i];    for (k=i-1; k>=0; k--) sum -= a[n*i + k]*x[k];    x[i]=sum/p[i];  }  for (i=n-1; i>=0; i--) {    sum=x[i];    for (k=i+1; k<n; k++) sum -= a[n*k + i]*x[k];    x[i]=sum/p[i];  }}/*****************************************************************  sometimes we only need the forward or backward pass of the  backsubstitution, hence we provide these two routines separately   ***************************************************************/void chol_forward(double a[], int n, double p[], double b[], double x[]){  int i, k;  double sum;  for (i=0; i<n; i++) {    sum=b[i];    for (k=i-1; k>=0; k--) sum -= a[n*i + k]*x[k];    x[i]=sum/p[i];  }}void chol_backward(double a[], int n, double p[], double b[], double x[]){  int i, k;  double sum;  for (i=n-1; i>=0; i--) {    sum=b[i];    for (k=i+1; k<n; k++) sum -= a[n*k + i]*x[k];    x[i]=sum/p[i];  }}/*****************************************************************  solves the system | -H_x A' | |x_x| = |c_x|                    |  A   H_y| |x_y|   |c_y|  with H_x (and H_y) positive (semidefinite) matrices  and n, m the respective sizes of H_x and H_y  for variables see pg. 48 of notebook or do the calculations on a  sheet of paper again  predictor solves the whole thing, corrector assues that H_x didn't  change and relies on the results of the predictor. therefore do  _not_ modify workspace  if you want to speed tune anything in the code here's the right  place to do so: about 95% of the time is being spent in  here. something like an iterative refinement would be nice,  especially when switching from double to single precision. if you  have a fast parallel cholesky use it instead of the numrec  implementations.  side effects: changes H_y (but this is just the unit matrix or zero anyway  in our case)  ***************************************************************/void solve_reduced(int n, int m, double h_x[], double h_y[], 		   double a[], double x_x[], double x_y[],		   double c_x[], double c_y[],		   double workspace[], int step){  int i,j,k;  double *p_x;  double *p_y;  double *t_a;  double *t_c;  double *t_y;  p_x = workspace;		/* together n + m + n*m + n + m = n*(m+2)+2*m */  p_y = p_x + n;  t_a = p_y + m;  t_c = t_a + n*m;  t_y = t_c + n;  if (step == PREDICTOR) {    choldc(h_x, n, p_x);	/* do cholesky decomposition */    for (i=0; i<m; i++)         /* forward pass for A' */      chol_forward(h_x, n, p_x, a+i*n, t_a+i*n);				    for (i=0; i<m; i++)         /* compute (h_y + a h_x^-1A') */      for (j=i; j<m; j++)	for (k=0; k<n; k++) 	  h_y[m*i + j] += t_a[n*j + k] * t_a[n*i + k];				    choldc(h_y, m, p_y);	/* and cholesky decomposition */  }    chol_forward(h_x, n, p_x, c_x, t_c);				/* forward pass for c */  for (i=0; i<m; i++) {		/* and solve for x_y */    t_y[i] = c_y[i];    for (j=0; j<n; j++)      t_y[i] += t_a[i*n + j] * t_c[j];  }  cholsb(h_y, m, p_y, t_y, x_y);  for (i=0; i<n; i++) {		/* finally solve for x_x */    t_c[i] = -t_c[i];    for (j=0; j<m; j++)      t_c[i] += t_a[j*n + i] * x_y[j];  }  chol_backward(h_x, n, p_x, t_c, x_x);}/*****************************************************************  matrix vector multiplication (symmetric matrix but only one triangle  given). computes m*x = y  no need to tune it as it's only of O(n^2) but cholesky is of  O(n^3). so don't waste your time _here_ although it isn't very  elegant.   ***************************************************************/void matrix_vector(int n, double m[], double x[], double y[]){  int i, j;  for (i=0; i<n; i++) {    y[i] = m[(n+1) * i] * x[i];    for (j=0; j<i; j++)      y[i] += m[i + n*j] * x[j];    for (j=i+1; j<n; j++)       y[i] += m[n*i + j] * x[j];   }}/*****************************************************************  call only this routine; this is the only one you're interested in  for doing quadratical optimization  the restart feature exists but it may not be of much use due to the  fact that an initial setting, although close but not very close the  the actual solution will result in very good starting diagnostics  (primal and dual feasibility and small infeasibility gap) but incur  later stalling of the optimizer afterwards as we have to enforce  positivity of the slacks.  ***************************************************************/int pr_loqo(int n, int m, double c[], double h_x[], double a[], double b[],	    double l[], double u[], double primal[], double dual[], 	    int verb, double sigfig_max, int counter_max, 	    double margin, double bound, int restart) {  /* the knobs to be tuned ... */  /* double margin = -0.95;	   we will go up to 95% of the				   distance between old variables and zero */  /* double bound = 10;		   preset value for the start. small				   values give good initial				   feasibility but may result in slow				   convergence afterwards: we're too				   close to zero */  /* to be allocated */  double *workspace;  double *diag_h_x;  double *h_y;  double *c_x;  double *c_y;  double *h_dot_x;  double *rho;  double *nu;  double *tau;  double *sigma;  double *gamma_z;  double *gamma_s;    double *hat_nu;  double *hat_tau;  double *delta_x;  double *delta_y;  double *delta_s;  double *delta_z;  double *delta_g;  double *delta_t;  double *d;  /* from the header - pointers into primal and dual */  double *x;  double *y;  double *g;  double *z;  double *s;  double *t;    /* auxiliary variables */  double b_plus_1;  double c_plus_1;  double x_h_x;  double primal_inf;  double dual_inf;  double sigfig;  double primal_obj, dual_obj;  double mu;  double alfa, step;  int counter = 0;  int status = STILL_RUNNING;  int i,j,k;  /* memory allocation */  workspace = malloc((n*(m+2)+2*m)*sizeof(double));  diag_h_x  = malloc(n*sizeof(double));  h_y       = malloc(m*m*sizeof(double));  c_x       = malloc(n*sizeof(double));  c_y       = malloc(m*sizeof(double));  h_dot_x   = malloc(n*sizeof(double));  rho       = malloc(m*sizeof(double));  nu        = malloc(n*sizeof(double));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
黄色成人免费在线| 欧美精品丝袜中出| 国产精品一区二区久激情瑜伽| 日韩精品成人一区二区在线| 亚洲综合网站在线观看| 亚洲精品国产品国语在线app| 国产精品美女久久久久aⅴ| 久久精品一级爱片| 国产精品毛片a∨一区二区三区| 国产日韩欧美在线一区| 国产精品乱人伦中文| 国产精品久久久久久久浪潮网站| 中文字幕亚洲成人| 亚洲色图欧洲色图| 亚洲一二三四区不卡| 亚洲成a人在线观看| 奇米影视在线99精品| 裸体一区二区三区| 精品亚洲成a人| 国产91丝袜在线播放0| 成人一区在线看| 蜜桃av一区二区三区| 久久精品国产免费看久久精品| 免费成人结看片| 国产福利视频一区二区三区| 99久久久久免费精品国产 | 欧美无砖砖区免费| 制服丝袜国产精品| 精品av久久707| 国产精品国产a| 亚洲成在人线在线播放| 韩国一区二区三区| aaa亚洲精品| 欧美高清视频不卡网| 精品国产伦一区二区三区观看体验 | 香蕉久久一区二区不卡无毒影院| 免费不卡在线观看| 成人黄色777网| 欧美色综合久久| 亚洲精品一线二线三线| 亚洲欧洲99久久| 日日骚欧美日韩| 国产成人免费视频网站| 欧美日韩中字一区| 久久影院午夜片一区| 综合久久久久综合| 蜜桃精品视频在线观看| 91网站最新网址| 日韩视频在线观看一区二区| 国产精品美女久久久久久久网站| 亚洲不卡在线观看| 成人黄色a**站在线观看| 8x福利精品第一导航| 国产精品久久一卡二卡| 日本不卡中文字幕| 一本到不卡精品视频在线观看| 日韩视频一区二区在线观看| 亚洲欧美视频在线观看视频| 美女视频黄 久久| 91成人网在线| 日本一区二区三区视频视频| 免费在线看一区| 日本国产一区二区| 日本一区二区三区四区 | 欧美精品在线观看一区二区| 亚洲国产精品成人综合 | 国产白丝精品91爽爽久久| 3d成人动漫网站| 尤物av一区二区| 国产成人精品网址| 欧美第一区第二区| 亚洲国产aⅴ天堂久久| av影院午夜一区| 久久久久国产一区二区三区四区| 日韩高清电影一区| 91久久精品国产91性色tv| 欧美—级在线免费片| 极品尤物av久久免费看| 555夜色666亚洲国产免| 亚洲综合偷拍欧美一区色| 成人黄色小视频在线观看| 久久久噜噜噜久久中文字幕色伊伊| 午夜不卡在线视频| 欧美色图免费看| 亚洲男女一区二区三区| 国产98色在线|日韩| 26uuu久久天堂性欧美| 全国精品久久少妇| 91精品国产一区二区| 亚洲大型综合色站| 欧美性大战久久久久久久蜜臀| 亚洲色图视频网| 91网上在线视频| 亚洲美女区一区| 一本久道久久综合中文字幕| 国产精品的网站| 懂色av一区二区在线播放| 国产午夜精品福利| 国产精品亚洲人在线观看| 亚洲精品一区二区精华| 免费成人在线影院| 精品日韩99亚洲| 国产一区在线精品| 国产清纯美女被跳蛋高潮一区二区久久w| 久久精品国产久精国产爱| 欧美大片一区二区| 国产在线一区二区综合免费视频| 日韩精品中文字幕一区二区三区| 美女一区二区三区在线观看| 日韩欧美国产三级电影视频| 久久er99精品| 久久精品视频一区二区| 国产凹凸在线观看一区二区| 国产精品久久久久久久蜜臀| 99这里只有久久精品视频| 亚洲美女偷拍久久| 欧美色男人天堂| 免费看欧美女人艹b| 久久这里只有精品6| 成人伦理片在线| 一区二区三区av电影| 欧美精品vⅰdeose4hd| 精品一区二区三区视频在线观看| 精品久久久网站| 成人免费的视频| 一区二区三区在线免费视频| 欧美日韩国产电影| 极品销魂美女一区二区三区| 国产精品久久精品日日| 欧亚洲嫩模精品一区三区| 日韩成人av影视| 久久综合久久综合九色| 91丨九色porny丨蝌蚪| 亚洲国产精品自拍| 26uuu色噜噜精品一区| 91在线国产观看| 日本美女一区二区| 国产日韩v精品一区二区| 色婷婷香蕉在线一区二区| 蜜桃久久久久久| 国产精品国产自产拍高清av王其| 欧美综合天天夜夜久久| 精品在线视频一区| 亚洲欧美一区二区三区极速播放 | 精品第一国产综合精品aⅴ| 成人黄色在线网站| 日韩不卡一区二区三区| 中文字幕精品—区二区四季| 欧美精品久久久久久久多人混战 | 一本到高清视频免费精品| 日本伊人午夜精品| 国产精品久久毛片a| 9191国产精品| av一区二区久久| 另类的小说在线视频另类成人小视频在线| 日本一区二区三级电影在线观看| 欧美写真视频网站| 国产成人精品aa毛片| 亚洲va欧美va天堂v国产综合| 久久久久久久久久久久久久久99 | 成人欧美一区二区三区1314| 555www色欧美视频| 91在线国产观看| 国产精品一区二区在线观看不卡| 亚洲影院理伦片| 欧美高清在线一区二区| 欧美一区二区在线免费播放 | 国产亚洲精品bt天堂精选| 欧美人xxxx| 色综合色综合色综合| 国产米奇在线777精品观看| 午夜av一区二区三区| 亚洲欧洲成人自拍| 国产视频在线观看一区二区三区| 8x8x8国产精品| 欧美在线影院一区二区| 国产成人福利片| 久久精品国内一区二区三区| 亚洲成人一区在线| 亚洲精品v日韩精品| 国产欧美一区二区精品仙草咪| 日韩欧美专区在线| 3d动漫精品啪啪一区二区竹菊| 日本精品一区二区三区四区的功能| 国产成人av网站| 国产中文字幕精品| 久久精品av麻豆的观看方式| 婷婷中文字幕一区三区| 亚洲精品国产一区二区精华液| 国产精品久久久久久久裸模 | 国产69精品久久久久毛片| 久久99国产精品久久| 免费在线观看不卡| 全部av―极品视觉盛宴亚洲| 亚洲高清免费观看高清完整版在线观看| 综合自拍亚洲综合图不卡区| 久久精品一区四区| 久久精品水蜜桃av综合天堂| 2017欧美狠狠色| 久久久久久久久岛国免费|