about summary refs log tree commit diff
path: root/src/logistic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/logistic.h')
-rw-r--r--src/logistic.h96
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