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

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

?? pr_loqo.c

?? matlab 工具箱
?? 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一区二区三区免费野_久草精品视频
国产精品看片你懂得| 欧美一区二区精美| 一区在线播放视频| 成人av网站免费| 亚洲婷婷综合色高清在线| 91丨porny丨中文| 亚洲人一二三区| 欧美日韩精品一区二区三区| 日本不卡一区二区| 26uuuu精品一区二区| 粉嫩av一区二区三区在线播放 | 国产一区二区三区四区五区美女| 精品国产亚洲在线| 成人免费高清在线观看| 亚洲综合一区二区| 日韩欧美你懂的| 国产成人免费在线视频| 亚洲精品日韩一| 欧美一区二区三区啪啪| 成人在线视频一区| 亚洲h在线观看| 26uuu国产日韩综合| 色94色欧美sute亚洲线路一ni| 日韩主播视频在线| 亚洲国产电影在线观看| 欧美午夜精品一区二区三区| 久久精品国产99| 亚洲女与黑人做爰| 精品国产91乱码一区二区三区 | 国产丝袜欧美中文另类| 97se亚洲国产综合自在线观| 日本中文一区二区三区| 国产欧美日韩三区| 91精品蜜臀在线一区尤物| 国产不卡在线播放| 亚洲成人777| 欧美激情自拍偷拍| 51精品秘密在线观看| 成人美女视频在线观看18| 日韩精品一二区| 亚洲人成在线播放网站岛国| 精品美女在线观看| 欧美在线一二三| 丁香六月综合激情| 精品一区二区在线看| 亚洲综合色噜噜狠狠| 中文字幕av一区二区三区免费看| 91麻豆精品国产91久久久久| 91视频一区二区三区| 国精产品一区一区三区mba视频| 亚洲午夜久久久| 国产精品国产三级国产aⅴ原创| 日韩午夜电影av| 欧美三级视频在线| 色综合中文字幕| 粉嫩嫩av羞羞动漫久久久| 国精产品一区一区三区mba桃花 | 麻豆成人免费电影| 香蕉av福利精品导航| 一区二区视频在线| 综合久久久久久| 中文久久乱码一区二区| 久久精品一区蜜桃臀影院| 日韩一二在线观看| 欧美日韩国产美女| 欧美唯美清纯偷拍| 欧美性猛交xxxx乱大交退制版| 99久久精品国产网站| 不卡的av电影| 成人涩涩免费视频| 成人黄色软件下载| 波多野结衣中文字幕一区二区三区| 国产精品综合网| 国产乱子轮精品视频| 精品在线免费观看| 精品一区二区三区在线播放 | 日韩精品电影在线| 视频一区二区不卡| 肉色丝袜一区二区| 日本不卡一区二区| 精品一区精品二区高清| 精品制服美女丁香| 国产成人精品免费在线| 国产不卡视频在线观看| 成人午夜激情影院| 99久久免费视频.com| 91麻豆国产精品久久| 在线观看免费亚洲| 欧美日韩亚洲综合| 日韩一级免费观看| 久久亚洲精品小早川怜子| 久久久一区二区三区| 国产精品午夜久久| 一区二区三区欧美在线观看| 亚洲国产视频网站| 蜜乳av一区二区| 国产iv一区二区三区| 99精品视频一区| 欧美日韩国产在线观看| 日韩欧美成人午夜| 中文字幕+乱码+中文字幕一区| 亚洲欧美日韩小说| 免费高清在线一区| 东方欧美亚洲色图在线| 在线欧美小视频| 欧美一区二区三区在| 国产日本欧洲亚洲| 亚洲国产综合在线| 国产综合成人久久大片91| 99国产欧美久久久精品| 欧美日韩国产片| 中文字幕av一区二区三区高| 亚洲成人av中文| 国产精品中文字幕日韩精品| 色噜噜偷拍精品综合在线| 制服丝袜日韩国产| 国产精品久久毛片av大全日韩| 亚洲高清视频中文字幕| 国产成人综合视频| 欧美日韩亚洲国产综合| 国产日韩欧美不卡| 亚欧色一区w666天堂| 懂色av一区二区在线播放| 欧美三级韩国三级日本三斤| 欧美激情综合网| 91蜜桃传媒精品久久久一区二区| 欧美浪妇xxxx高跟鞋交| 久久精品亚洲国产奇米99| 亚洲一区二区在线视频| 国产传媒欧美日韩成人| 欧美裸体一区二区三区| 国产精品久久久久久久蜜臀| 免费一级片91| 在线观看日韩电影| 国产精品日产欧美久久久久| 久久99精品久久久久| 在线观看免费成人| 国产精品成人在线观看| 国产麻豆视频一区| 日韩亚洲国产中文字幕欧美| 一区二区欧美国产| 99热精品国产| 久久精品欧美日韩| 经典三级在线一区| 777奇米四色成人影色区| 亚洲精品欧美专区| fc2成人免费人成在线观看播放| 日韩欧美高清一区| 日韩av一级片| 欧美特级限制片免费在线观看| 最新热久久免费视频| 国产成人自拍网| 国产日韩欧美精品综合| 国产在线精品一区二区夜色| 日韩一二三四区| 男人的j进女人的j一区| 欧美色爱综合网| 亚洲超碰97人人做人人爱| 色国产综合视频| 亚洲精品免费看| 99re66热这里只有精品3直播| 国产精品久久久久久久久动漫 | 亚洲伊人伊色伊影伊综合网| av在线不卡免费看| 国产精品久久久久久亚洲毛片| 国产成人av电影在线播放| 国产亚洲成年网址在线观看| 国产做a爰片久久毛片| 久久亚区不卡日本| 国产精品亚洲一区二区三区在线| 欧美精品一区二区三区四区| 国内精品视频666| 久久久精品综合| 国产 欧美在线| 国产精品国模大尺度视频| 91小视频免费观看| 亚洲最色的网站| 欧美精品v日韩精品v韩国精品v| 午夜不卡在线视频| 亚洲电影在线免费观看| 欧美色男人天堂| 日本欧美久久久久免费播放网| 日韩小视频在线观看专区| 韩国三级在线一区| 中文av一区二区| 色哟哟一区二区三区| 亚洲午夜影视影院在线观看| 欧美一区二区二区| 国产激情偷乱视频一区二区三区| 中文字幕精品一区二区精品绿巨人| 99久久精品一区| 五月天亚洲婷婷| 久久久久久夜精品精品免费| 波多野洁衣一区| 午夜精品成人在线视频| 久久久另类综合| 色悠悠久久综合| 青青草国产精品亚洲专区无| 国产清纯白嫩初高生在线观看91| 91污片在线观看|