Composite Regression¶
-
multi_regression.
DTRTAV
(file_contents, data_type, regression_var)[source]¶ ‘Do The Right Thing’ using adapative-validated glmnet as the regression method.
Pick the right version of glmnet to use based on data type.
- Args:
- file_contents: Raw form-data from HTTP POST request. data_type: Parameter of the same name from POST request. regression_var: Parameter ‘regression_index’ from POST request.
- Returns:
- Results from running glmnet on input data, this will be a pandas DataFrame containing the result cofficients, including labels.
- Raises:
- ValueError: Requested data_type is not currently supported, valid types are ‘csv’ ‘xlsx’ and ‘json’.
-
multi_regression.
DTRTCV
(file_contents, data_type, regression_var)[source]¶ ‘Do The Right Thing’ using cross-validated glmnet as the regression method.
Pick the right version of glmnet to use based on data type.
- Args:
- file_contents: Raw form-data from HTTP POST request. data_type: Parameter of the same name from POST request. regression_var: Parameter ‘regression_index’ from POST request.
- Returns:
- Results from running glmnet on input data, this will be a pandas DataFrame containing the result cofficients, including labels.
- Raises:
- ValueError: Requested data_type is not currently supported, valid types are ‘csv’ ‘xlsx’ and ‘json’.
-
multi_regression.
DTRTFOS
(file_contents, data_type, regression_var)[source]¶ ‘Do The Right Thing’ using FOS as the regression method.
Pick the right version of FOS to use based on data type.
- Args:
- file_contents: Raw form-data from HTTP POST request. data_type: Parameter of the same name from POST request. regression_var: Parameter ‘regression_index’ from POST request.
- Returns:
- Results from running FOS on input data, this will be a pandas DataFrame containing the result cofficients, including labels.
- Raises:
- ValueError: Requested data_type is not currently supported, valid types are ‘csv’ ‘xlsx’ and ‘json’.
-
multi_regression.
MultiRegression
(file_contents, regression_type, data_type, regression_var)[source]¶ All-in-one regression function that allows regression method to be switched.
- Args:
- file_contents: Raw form-data from HTTP POST request. regression_type: The type of regression method that should be used ( eg FOS ) data_type: Parameter of the same name from POST request. regression_var: Parameter ‘regression_index’ from POST request.
- Returns:
- Results from running glmnet on input data, this will be a pandas DataFrame containing the result cofficients, including labels.
- Raises:
- ValueError: Requested regression_type is not currently supported. Valid method are ‘fos’ ‘cv’ and ‘av’ corresponding to FOS, glmnet w/ cross validation validation, and glmnet w/ adaptive validation respectively.