ETIA.CausalLearning.regressors package
Submodules
ETIA.CausalLearning.regressors.LinearRegressor module
- class LinearRegression_[source]
Bases:
objectWrapper class for setting up a LinearRegression model with custom parameters.
- set_regressor_params(parameters)[source]
Configures and returns a LinearRegression object. Currently, LinearRegression does not require parameters in this method.
- set_regressor_params(parameters)[source]
Configures and returns a LinearRegression object.
- Parameters:
parameters (dict) – A dictionary containing the model parameters (though LinearRegression does not currently use parameters in this implementation).
- Returns:
A LinearRegression object configured with default parameters.
- Return type:
LinearRegression
Examples
>>> params = {} >>> regressor = LinearRegression_().set_regressor_params(params) >>> print(regressor) LinearRegression()
ETIA.CausalLearning.regressors.RandomForestRegressor module
- class RandomForestRegressor_[source]
Bases:
objectWrapper class for setting up a RandomForestRegressor model with custom parameters.
- set_regressor_params(parameters)[source]
Configures and returns a RandomForestRegressor object with the specified parameters.
- set_regressor_params(parameters)[source]
Configures and returns a RandomForestRegressor object with the specified parameters.
- Parameters:
parameters (dict) –
- A dictionary containing the following keys:
’n_trees’: int, The number of trees in the forest.
’min_samples_leaf’: int or float, The minimum number of samples required to be at a leaf node.
’max_depth’: int, The maximum depth of the tree.
- Returns:
A RandomForestRegressor object configured with the specified parameters.
- Return type:
RandomForestRegressor
Examples
>>> params = {'n_trees': 100, 'min_samples_leaf': 0.1, 'max_depth': 10} >>> regressor = RandomForestRegressor_().set_regressor_params(params) >>> print(regressor) RandomForestRegressor(max_depth=10, min_samples_leaf=0.1)