-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmultivariable.h
More file actions
34 lines (25 loc) · 1.06 KB
/
multivariable.h
File metadata and controls
34 lines (25 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Copyright (C) 2011-2012 Gad Abraham and National ICT Australia (NICTA).
* All rights reserved.
*/
#define NEWTON_THRESH 1e-3
#define NEWTON_THRESH_MAX 30
#define NEWTON_DEVIANCE_MIN 1e-6
#define NEWTON_SUCCESS 1
/* didn't converge within predefined iterations */
#define NEWTON_ERR_NO_CONVERGENCE 2
/* converged but to a very large value */
#define NEWTON_ERR_DIVERGENCE 3
int newton(double *x, double *y, double *beta, double *invhessian,
int n, int p, double lambda2, int verbose);
int make_hessian(double *hessian, double *x,
double beta_intercept, double beta, int n);
int multivariable_newton(Opt *opt, gmatrix *g, int nums1,
int *pselected, int *numselected, int *rets);
/*int multivariable_lasso(Opt *opt, gmatrix *g, int nums1,
int *pselected, int *numselected, int *rets);*/