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

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

?? pr_loqo.c

?? 支持向量機的分類和回歸算法,可用于模式識別和預(yù)測
?? 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));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩久久久精品| 国产综合色精品一区二区三区| 成人福利在线看| 久久精品欧美一区二区三区不卡| 国产一区二区三区久久久| 欧美精品一区二区高清在线观看| 国产精品一二三四| 亚洲色图色小说| 欧美日韩成人在线| 国产裸体歌舞团一区二区| 国产精品视频麻豆| 欧美专区在线观看一区| 免费看欧美美女黄的网站| 久久久久久久久久看片| 91猫先生在线| 日本成人超碰在线观看| 久久女同互慰一区二区三区| 91一区二区在线观看| 天天综合网 天天综合色| 久久美女艺术照精彩视频福利播放| 不卡区在线中文字幕| 首页国产欧美日韩丝袜| 精品sm捆绑视频| 色噜噜久久综合| 日韩精品久久理论片| 国产精品素人视频| 日韩一区二区三区四区| av一二三不卡影片| 蜜桃一区二区三区四区| 亚洲精品乱码久久久久久久久| 欧美一区二区三区思思人| 粉嫩av亚洲一区二区图片| 午夜视频一区在线观看| 中文字幕免费不卡| 国产日韩精品一区二区三区| 欧美日韩国产一级片| 国产成人精品亚洲午夜麻豆| 午夜私人影院久久久久| 国产精品国产三级国产aⅴ入口| 91精品国产乱码| 91天堂素人约啪| 国产精品一区二区果冻传媒| 日韩影视精彩在线| 亚洲柠檬福利资源导航| 久久久一区二区三区捆绑**| 欧美夫妻性生活| 91美女视频网站| 国产.精品.日韩.另类.中文.在线.播放| 石原莉奈在线亚洲三区| 亚洲美女偷拍久久| 久久久综合激的五月天| 欧美一区二区三区在线看| 欧美最新大片在线看| 成人ar影院免费观看视频| 国产一区二区伦理| 亚洲va欧美va人人爽| 一片黄亚洲嫩模| 一区在线播放视频| 国产精品色哟哟| 久久蜜桃一区二区| 日韩女同互慰一区二区| 91.com视频| 欧美日韩不卡在线| 在线视频一区二区免费| 色婷婷av一区二区三区大白胸| 成人蜜臀av电影| 成人综合婷婷国产精品久久蜜臀 | 国产成人超碰人人澡人人澡| 国产电影精品久久禁18| 久久精品国产精品亚洲精品| 日韩高清不卡一区| 日韩二区三区在线观看| 婷婷国产在线综合| 丝袜亚洲精品中文字幕一区| 亚洲国产一二三| 亚洲成人综合网站| 视频一区视频二区中文| 亚洲福利一二三区| 三级久久三级久久久| 天堂成人免费av电影一区| 视频一区免费在线观看| 日本免费新一区视频| 久久精品久久精品| 久久9热精品视频| 国产精品18久久久久久久久久久久| 国产一区二区三区在线观看免费| 精品在线你懂的| 国产成a人亚洲| 91视视频在线直接观看在线看网页在线看| 97精品国产露脸对白| 精品视频在线视频| 日韩一区二区三区在线观看| 久久这里只有精品6| 欧美激情中文不卡| 一区二区视频在线看| 亚洲国产成人tv| 精品一区二区精品| av一本久道久久综合久久鬼色| 在线精品亚洲一区二区不卡| 5月丁香婷婷综合| 26uuu亚洲综合色欧美| 国产欧美视频一区二区三区| 亚洲欧美日韩国产手机在线| 午夜天堂影视香蕉久久| 国产一区二区三区在线观看精品| 99精品国产一区二区三区不卡| 欧美视频在线不卡| 亚洲精品久久7777| 久久精品久久99精品久久| 国产白丝网站精品污在线入口| 在线观看日韩一区| 精品理论电影在线| 国产精品久久久久久一区二区三区 | 成人激情视频网站| 欧日韩精品视频| 久久久综合激的五月天| 亚洲精品成人天堂一二三| 麻豆精品蜜桃视频网站| 99久久综合国产精品| 日韩欧美视频在线| 亚洲免费观看高清完整版在线观看熊 | 欧美国产欧美综合| 午夜成人在线视频| 不卡的电视剧免费网站有什么| 在线成人av网站| 亚洲欧洲精品一区二区三区不卡| 男女男精品视频| 日本韩国欧美在线| 日本一二三不卡| 男女男精品网站| 欧美三级中文字| 亚洲欧洲日本在线| 国产成人精品网址| 日韩一区二区免费视频| 亚洲欧美一区二区三区极速播放| 精品中文字幕一区二区小辣椒| 在线一区二区三区四区五区| 久久久久久久综合狠狠综合| 日本va欧美va精品| 2019国产精品| 香蕉久久夜色精品国产使用方法 | 波多野结衣的一区二区三区| 精品国产乱码久久久久久图片| 亚洲成人综合网站| 91免费在线看| 中文字幕欧美国产| 国产精品一区二区久久精品爱涩| 欧美一级欧美三级在线观看| 一片黄亚洲嫩模| 色婷婷综合久久久中文字幕| 国产精品九色蝌蚪自拍| 国产91丝袜在线18| 久久九九久久九九| 国产一区二区不卡在线| 精品成人在线观看| 久久电影国产免费久久电影| 欧美一区二区美女| 日韩av电影免费观看高清完整版 | 欧美精品久久99| 亚洲与欧洲av电影| 91尤物视频在线观看| 国产精品理伦片| 不卡视频在线看| 中文字幕佐山爱一区二区免费| 成人av在线资源网| 亚洲欧美日韩国产中文在线| 色综合久久久久综合体桃花网| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 欧美天堂一区二区三区| 一区二区三区视频在线观看| 色哟哟一区二区在线观看| 最好看的中文字幕久久| 日本高清视频一区二区| 夜夜精品视频一区二区| 欧美日韩国产另类不卡| 日本欧洲一区二区| 久久综合网色—综合色88| 国产一区二区三区日韩| 国产日韩影视精品| 9i看片成人免费高清| 亚洲综合免费观看高清完整版| 欧美日韩在线一区二区| 蜜桃91丨九色丨蝌蚪91桃色| 久久综合狠狠综合| 99久久精品99国产精品| 亚洲国产一区视频| 欧美一级午夜免费电影| 国产成人av电影在线观看| 亚洲欧美另类小说| 欧美日韩大陆在线| 国产乱码精品一品二品| 136国产福利精品导航| 欧美日韩免费观看一区二区三区| 青青草国产精品97视觉盛宴| 国产欧美一区在线| 欧美亚日韩国产aⅴ精品中极品| 日本人妖一区二区| 国产精品不卡视频| 91精选在线观看| 成人免费视频视频在线观看免费|