smac.epm.random_forest.rfr_imputator¶
Classes
|
Imputor using pyrfr's Random Forest regressor. |
- class smac.epm.random_forest.rfr_imputator.RFRImputator(rng, cutoff, threshold, model, change_threshold=0.01, max_iter=2)[source]¶
Bases:
smac.epm.base_imputor.BaseImputor
Imputor using pyrfr’s Random Forest regressor.
Note: Sets var_threshold as the lower bound on the variance for the predictions of the random forest
- Parameters
rng (np.random.RandomState) – Will be used to draw a seed (currently not used)
cutoff (float) – Cutoff value for this scenario (upper runnning time limit)
threshold (float) – Highest possible values (e.g. cutoff * parX).
model (BaseEPM) – Predictive model (i.e. RandomForestWithInstances)
change_threshold (float) – Stop imputation if change is less than this.
max_iter (int) – Maximum number of imputation iterations.
- logger¶
- Type
logging.Logger
- max_iter¶
- Type
int
- change_threshold¶
- Type
float
- cutoff¶
- Type
float
- threshold¶
- Type
float
- seed¶
Created by drawing random int from rng
- Type
int
- var_threshold¶
- Type
float
- impute(censored_X, censored_y, uncensored_X, uncensored_y)[source]¶
Imputes censored runs and returns new y values.
- Parameters
censored_X (np.ndarray [N, M]) – Feature array of all censored runs.
censored_y (np.ndarray [N, 1]) – Target values for all runs censored runs.
uncensored_X (np.ndarray [N, M]) – Feature array of all non-censored runs.
uncensored_y (np.ndarray [N, 1]) – Target values for all non-censored runs.
- Returns
imputed_y – Same shape as censored_y [N, 1]
- Return type
np.ndarray