linear_regression
atscale.eda.linear_regression.linear_regression
Performs linear regression on the predictors and prediction_target specified. Will make a series of temp tables in the source db to facilitate this calc. This is only supported for Snowflake at this time.
- Parameters:
- dbconn (Snowflake) – The database connection that linear_regression will interact with
- data_model (DataModel) – The data model corresponding to the features provided
- predictors (List *[*str ]) – The query names of the numeric features corresponding to the regression inputs
- prediction_target (str) – The query name of the numeric feature that will be predicted via linear_regression
- granularity_levels (List *[*str ]) – The query names of the categorical features corresponding to the level of granularity desired in numeric_features
- if_exists (enums.TableExistsAction , optional) – The default action the function takes when creating process tables that already exist. Does not accept APPEND or IGNORE. Defaults to ERROR.
- write_database (str) – The database that linear regression will write tables to. Defaults to the database associated with the given dbconn.
- write_schema (str) – The schema that linear regression will write tables to. Defaults to the schema associated with the given dbconn.
- Returns: A Dict containing the regression coefficients
- Return type: Dict