pipefitter.estimator.LinearRegression¶
-
class
pipefitter.estimator.
LinearRegression
(intercept=True, max_effects=0, selection='none', sig_level=0.05, criterion=None, target=None, nominals=None, inputs=None)¶ Bases:
pipefitter.base.BaseEstimator
Linear Regression
Parameters: intercept : bool, optional
Include the intercept term in the model?
max_effects : int, optional
Specifies the maximum number of effects in any model to consider during the selection process
selection : string, optional
Specifies the selection method. Valid values are ‘none’, ‘backward’, ‘forward’, ‘lasso’, and ‘stepwise’.
sig_level : float, optional
Specifies the significance level
criterion : string, optional
Specifies selection criterion. Valid values are ‘sl’, ‘aic’, ‘aicc’, and ‘sbc’.
target : string, optional
The target variable
nominals : string or list of strings, optional
The nominal variables
inputs : string or list of strings, optional
The input variables
Returns: Examples
>>> lin = LinearRegression(target='MSRP', ... inputs=['MPG_City', 'MPG_Highway', 'Length', ... 'Weight', 'Type', 'Cylinders'], ... nominals = ['Type', 'Cylinders', 'Origin'])
-
__init__
(intercept=True, max_effects=0, selection='none', sig_level=0.05, criterion=None, target=None, nominals=None, inputs=None)¶
Methods
__init__
([intercept, max_effects, ...])fit
(table, \*args, \*\*kwargs)Fit function for linear regression get_combined_params
(\*args, \*\*kwargs)Merge all parameters and verify that they valid get_filtered_params
(\*args, \*\*kwargs)Merge parameters that keys that belong to self get_param
(\*names)Return a copy of the requested parameters get_params
(\*names)Return a copy of the requested parameters has_param
(name)Does the parameter exist? set_param
(\*args, \*\*kwargs)Set one or more parameters set_params
(\*args, \*\*kwargs)Set one or more parameters transform
(table, \*args, \*\*kwargs)Transform function for transformer Attributes
param_defs
static_params
-