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

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

?? pr_loqo.c

?? 支持向量機工具箱
?? 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 * *  * 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 program - %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");	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));  tau       = malloc(n*sizeof(double));  sigma     = malloc(n*sizeof(double));

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲色图.com| 亚洲色图制服丝袜| 欧美丰满美乳xxx高潮www| 91国产免费看| 在线视频你懂得一区二区三区| 91视频你懂的| 色综合久久88色综合天天免费| 91色婷婷久久久久合中文| 色香蕉久久蜜桃| 91成人国产精品| 精品污污网站免费看| 欧美日韩视频在线第一区 | 99re成人在线| av欧美精品.com| 91日韩一区二区三区| 欧洲中文字幕精品| 91 com成人网| 精品福利一二区| 中文字幕精品一区二区三区精品| 国产欧美精品一区二区色综合| 国产精品婷婷午夜在线观看| 自拍偷拍欧美精品| 亚洲电影一区二区三区| 石原莉奈一区二区三区在线观看| 蜜臀久久久99精品久久久久久| 欧美tk丨vk视频| 91麻豆精品国产无毒不卡在线观看| 91精品国产91久久久久久最新毛片 | 色欧美片视频在线观看在线视频| 国产精品天天看| www激情久久| 精品夜夜嗨av一区二区三区| 精品亚洲成a人| 成人午夜短视频| 欧洲亚洲精品在线| 日韩一区二区三区免费看| ww亚洲ww在线观看国产| 国产精品福利在线播放| 亚洲国产精品一区二区久久| 毛片av中文字幕一区二区| 福利91精品一区二区三区| 91视频免费看| 精品88久久久久88久久久| 亚洲天堂福利av| 免费成人你懂的| 99久久免费国产| 日韩午夜在线观看视频| 国产精品久久久久久久浪潮网站| 亚洲一区二区av在线| 国产精品99久久久久久宅男| 欧美写真视频网站| 日本一区二区三区免费乱视频| 亚洲一区在线免费观看| 激情文学综合网| 欧美日韩中文字幕精品| 中文字幕精品在线不卡| 蜜臀av亚洲一区中文字幕| 9l国产精品久久久久麻豆| 精品久久免费看| 亚欧色一区w666天堂| 国产电影精品久久禁18| 在线观看三级视频欧美| 欧美v日韩v国产v| 337p日本欧洲亚洲大胆色噜噜| 亚洲视频免费看| 蜜桃久久久久久久| 播五月开心婷婷综合| 91免费精品国自产拍在线不卡| 欧美日韩免费电影| 国产精品久久久久久久裸模| 欧美bbbbb| 日本国产一区二区| 日韩写真欧美这视频| 亚洲欧洲成人精品av97| 日韩 欧美一区二区三区| av在线不卡网| 久久久久国产精品厨房| 久久精品99国产精品日本| 日本伊人精品一区二区三区观看方式 | 高清不卡一区二区| 欧美男男青年gay1069videost | 日韩电影免费在线看| 国内精品第一页| 欧美日韩日日骚| 18欧美亚洲精品| 国产精品一区二区x88av| 5566中文字幕一区二区电影| 国产精品久久久久影视| 韩国成人福利片在线播放| 欧美日韩国产一二三| 亚洲欧美日韩系列| 国产福利91精品一区| 日韩欧美国产综合在线一区二区三区| 国产精品女上位| 国产a视频精品免费观看| 日韩欧美一区二区视频| 香蕉久久一区二区不卡无毒影院| 北岛玲一区二区三区四区| www精品美女久久久tv| 蜜桃在线一区二区三区| 欧美日韩成人综合| 亚洲成人综合网站| 色八戒一区二区三区| 国产日韩欧美一区二区三区乱码| 国产麻豆日韩欧美久久| 精品国产乱码久久久久久牛牛| 日韩福利视频网| 欧美日本在线观看| 亚洲国产精品影院| 欧美午夜精品久久久久久超碰| 国产精品麻豆视频| 福利一区在线观看| 国产日韩欧美激情| 粉嫩高潮美女一区二区三区| 国产亚洲一二三区| 国产成a人无v码亚洲福利| 久久久久久久久久久99999| 精品国产网站在线观看| 国产精品一区一区| 韩国av一区二区三区四区| 精品国产乱码久久久久久蜜臀| 成人午夜在线视频| 视频一区视频二区中文| 欧美精品一区二区三区高清aⅴ| 成人黄色大片在线观看| 午夜精品久久久久影视| 久久久亚洲国产美女国产盗摄 | 国产精品久久久久毛片软件| 九九久久精品视频| 91精品国产综合久久精品性色| 日韩国产欧美在线视频| 欧美一区二区福利视频| 狠狠色综合日日| 国产欧美一区二区精品仙草咪| 成人综合婷婷国产精品久久蜜臀| 欧美激情一二三区| 91在线精品一区二区三区| 亚洲激情综合网| 7777精品伊人久久久大香线蕉| 免费日本视频一区| 久久精品日产第一区二区三区高清版 | 久久精品久久综合| 久久婷婷色综合| 成人福利在线看| 亚洲女女做受ⅹxx高潮| 欧美一区二区私人影院日本| 久久99精品国产.久久久久久| 久久久久久久久伊人| 国产一区二区三区四| 亚洲靠逼com| 日韩欧美中文字幕精品| 狠狠色丁香九九婷婷综合五月| 国产日韩亚洲欧美综合| 91美女视频网站| 日韩va亚洲va欧美va久久| 久久久亚洲午夜电影| 色综合网站在线| 免费成人在线观看视频| 久久在线免费观看| 欧美日韩一区二区三区不卡| 国产综合色在线视频区| 亚洲视频一区二区在线| 日韩一区二区精品在线观看| 粉嫩av一区二区三区粉嫩 | 日韩精品成人一区二区三区| 久久综合九色综合97_久久久| 99re成人在线| 久久99国内精品| 精品国产区一区| 色婷婷国产精品久久包臀| 久久精品国产亚洲高清剧情介绍| 国产欧美日韩精品在线| 在线播放亚洲一区| 成人深夜在线观看| 日韩在线播放一区二区| 国产精品成人一区二区三区夜夜夜| 日韩av电影免费观看高清完整版在线观看 | 奇米综合一区二区三区精品视频| 亚洲在线观看免费| 韩国女主播一区| 色婷婷av一区二区| www一区二区| 1区2区3区精品视频| 亚洲va在线va天堂| 国产高清不卡一区二区| 色av成人天堂桃色av| 国产亚洲成av人在线观看导航| 日韩欧美色电影| 免费在线看成人av| 日韩欧美一级二级三级久久久 | 成人av网址在线| 伦理电影国产精品| 亚洲一区精品在线| 中文字幕亚洲区| 精品国产乱码久久久久久久久 | 99久久国产综合精品女不卡| 久久99热国产| 亚瑟在线精品视频| 亚洲一区二区三区四区五区中文 | 中文字幕国产一区|