From 898770748aa87ad89a5ca10282141fae7f4cbbd5 Mon Sep 17 00:00:00 2001 From: Peter Carbonetto Date: Thu, 8 Jun 2017 06:37:23 -0500 Subject: Removed FORCE_FLOAT from vc.h, logistic.h. --- src/logistic.h | 52 ++++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 24 deletions(-) (limited to 'src/logistic.h') diff --git a/src/logistic.h b/src/logistic.h index e951935..7f9e133 100644 --- a/src/logistic.h +++ b/src/logistic.h @@ -1,4 +1,4 @@ -#ifndef LOGISTIC_H_ /* Include guard */ +#ifndef LOGISTIC_H_ #define LOGISTIC_H_ // Mixed interface. @@ -29,19 +29,21 @@ double fLogit_mixed(gsl_vector *beta, 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 +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. -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.0 if not used - double lambdaL2); // Regularization L2 0.0 if not used +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 double fLogit_cat(gsl_vector *beta, gsl_matrix_int *X, @@ -50,22 +52,24 @@ double fLogit_cat(gsl_vector *beta, 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 covariates Matrix Nobs x Kc - ,gsl_vector *yhat //Vector of prob. predicted by the logistic - ); +// 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. -int logistic_cont_fit(gsl_vector *beta // Vector of parameters length = 1 + Sum_k(C_k - 1) + Kc - ,gsl_matrix *Xc // continuous covariates Matrix Nobs x Kc - ,gsl_vector *y //Vector of prob. to predict - ,double lambdaL1 // Regularization L1 0.0 if not used - ,double lambdaL2); // Regularization L2 0.0 if not used +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. double fLogit_cont(gsl_vector *beta, - gsl_matrix *Xc, // Continuous covariates matrix Nobs x Kc . + gsl_matrix *Xc, // Continuous covariates matrix Nobs x Kc. gsl_vector *y, double lambdaL1, double lambdaL2); -#endif // LOGISTIC_H_ +#endif -- cgit v1.2.3