diff options
author | Peter Carbonetto | 2017-08-07 13:23:44 -0500 |
---|---|---|
committer | Peter Carbonetto | 2017-08-07 13:23:44 -0500 |
commit | ecc5c0b5b11cbc2501b60d6d4e9a9b3e8f270d02 (patch) | |
tree | b27cd975b19b85e75255cacf1c3d771266c56a10 /src/logistic.h | |
parent | 8be2ce433c015d8c6776d270537d645c7e761bdf (diff) | |
parent | 7360d14216400b8f12fbfda03ac2f4827b102711 (diff) | |
download | pangemma-ecc5c0b5b11cbc2501b60d6d4e9a9b3e8f270d02.tar.gz |
Merge branch 'master' of github.com:genetics-statistics/GEMMA
Diffstat (limited to 'src/logistic.h')
-rw-r--r-- | src/logistic.h | 96 |
1 files changed, 43 insertions, 53 deletions
diff --git a/src/logistic.h b/src/logistic.h index b61ab14..bebcbf6 100644 --- a/src/logistic.h +++ b/src/logistic.h @@ -3,73 +3,63 @@ // Mixed interface. void logistic_mixed_pred(gsl_vector *beta, // Vector of parameters - // length = 1+Sum_k(C_k-1)+Kc. - gsl_matrix_int *X, // Matrix Nobs x K. - gsl_vector_int *nlev, // Vector with num. categories. - gsl_matrix *Xc, // Continuous covariates matrix - // Nobs x Kc - gsl_vector *yhat); // Vector of prob. predicted by - // the logistic. + // length = 1+Sum_k(C_k-1)+Kc. + gsl_matrix_int *X, // Matrix Nobs x K. + gsl_vector_int *nlev, // Vector with num. categories. + gsl_matrix *Xc, // Continuous covariates matrix + // Nobs x Kc + gsl_vector *yhat); // Vector of prob. predicted by + // the logistic. int logistic_mixed_fit(gsl_vector *beta, // Vector of parameters - // length = 1+Sum_k(C_k-1)+Kc - gsl_matrix_int *X, // Matrix Nobs x K. - gsl_vector_int *nlev, // Vector with number categories. - gsl_matrix *Xc, // Continuous covariates - // matrix Nobs x Kc - gsl_vector *y, // Vector of prob. to predict. - double lambdaL1, // Reg. L1 0.0 if not used. - double lambdaL2); // Reg. L2 0.0 if not used. + // length = 1+Sum_k(C_k-1)+Kc + gsl_matrix_int *X, // Matrix Nobs x K. + gsl_vector_int *nlev, // Vector with number categories. + gsl_matrix *Xc, // Continuous covariates + // matrix Nobs x Kc + gsl_vector *y, // Vector of prob. to predict. + double lambdaL1, // Reg. L1 0.0 if not used. + double lambdaL2); // Reg. L2 0.0 if not used. -double fLogit_mixed(gsl_vector *beta, - gsl_matrix_int *X, - gsl_vector_int *nlev, - gsl_matrix *Xc, // continuous covariates matrix Nobs x Kc - gsl_vector *y, - double lambdaL1, - double lambdaL2); +double fLogit_mixed(gsl_vector *beta, gsl_matrix_int *X, gsl_vector_int *nlev, + gsl_matrix *Xc, // continuous covariates matrix Nobs x Kc + gsl_vector *y, double lambdaL1, double lambdaL2); // Categorical-only interface. void logistic_cat_pred(gsl_vector *beta, // Vector of parameters - // length = 1+Sum_k(C_k-1)+Kc. - gsl_matrix_int *X, // Matrix Nobs x K. - gsl_vector_int *nlev, // Vector with number categories. - gsl_vector *yhat); // Vector of prob. predicted by - // the logistic. + // length = 1+Sum_k(C_k-1)+Kc. + gsl_matrix_int *X, // Matrix Nobs x K. + gsl_vector_int *nlev, // Vector with number categories. + gsl_vector *yhat); // Vector of prob. predicted by + // the logistic. int logistic_cat_fit(gsl_vector *beta, // Vector of parameters - // length = 1+Sum_k(C_k-1)+Kc. - gsl_matrix_int *X, // Matrix Nobs x K . - gsl_vector_int *nlev, // Vector with number categories. - gsl_vector *y, // Vector of prob. to predict. - double lambdaL1, // Regularization L1, 0 if not used - double lambdaL2); // Regularization L2, 0 if not used + // length = 1+Sum_k(C_k-1)+Kc. + gsl_matrix_int *X, // Matrix Nobs x K . + gsl_vector_int *nlev, // Vector with number categories. + gsl_vector *y, // Vector of prob. to predict. + double lambdaL1, // Regularization L1, 0 if not used + double lambdaL2); // Regularization L2, 0 if not used -double fLogit_cat(gsl_vector *beta, - gsl_matrix_int *X, - gsl_vector_int *nlev, - gsl_vector *y, - double lambdaL1, - double lambdaL2); +double fLogit_cat(gsl_vector *beta, gsl_matrix_int *X, gsl_vector_int *nlev, + gsl_vector *y, double lambdaL1, double lambdaL2); // Continuous-only interface. -void logistic_cont_pred(gsl_vector *beta, // Vector of parameters - // length = 1 + Sum_k(C_k-1) + Kc. - gsl_matrix *Xc, // Continuous cov's matrix Nobs x Kc. - gsl_vector *yhat);// Vector of prob. predicted - // by the logistic. +void logistic_cont_pred(gsl_vector *beta, // Vector of parameters + // length = 1 + Sum_k(C_k-1) + Kc. + gsl_matrix *Xc, // Continuous cov's matrix Nobs x Kc. + gsl_vector *yhat); // Vector of prob. predicted + // by the logistic. int logistic_cont_fit(gsl_vector *beta, // Vector of parameters - // length = 1+Sum_k(C_k-1)+Kc. - gsl_matrix *Xc, // Continuous cov's matrix Nobs x Kc. - gsl_vector *y, // Vector of prob. to predict. - double lambdaL1, // Regularization L1, 0 if not used. - double lambdaL2); // Regularization L2, 0 if not used. + // length = 1+Sum_k(C_k-1)+Kc. + gsl_matrix *Xc, // Continuous cov's matrix Nobs x Kc. + gsl_vector *y, // Vector of prob. to predict. + double lambdaL1, // Regularization L1, 0 if not used. + double lambdaL2); // Regularization L2, 0 if not used. double fLogit_cont(gsl_vector *beta, - gsl_matrix *Xc, // Continuous covariates matrix Nobs x Kc. - gsl_vector *y, - double lambdaL1, - double lambdaL2); + gsl_matrix *Xc, // Continuous covariates matrix Nobs x Kc. + gsl_vector *y, double lambdaL1, double lambdaL2); #endif |