if feature_selection:
logger.info("Getting Univariate Support")
full_path = SSEP.join([directory, "model", "features_support_uni.pkl"])
support = joblib.load(full_path)
all_features = all_features[:, support]
// Load the RFE support vector, if any
After Change
X_predict, _ = get_data(model, Partition.predict)
// Load feature_map
model = load_feature_map(directory)
// Drop features
logger.info("Dropping Features: %s", drop)
X_predict = drop_features(X_predict, drop)
// Log feature statistics
logger.info("Feature Statistics")
logger.info("Number of Prediction Rows : %d", X_predict.shape[0])
logger.info("Number of Prediction Columns : %d", X_predict.shape[1])
// Apply treatments to the feature matrix
all_features = apply_treatments(model, X_predict)
// Create initial features
all_features = create_features(model, all_features)
// Generate interactions
all_features = create_interactions(model, all_features)
// Remove low-variance features
all_features = remove_lv_features(all_features)
// Load the univariate support vector, if any
if feature_selection:
logger.info("Getting Univariate Support")
support = model.feature_map["uni_support"]
all_features = all_features[:, support]
// Load the RFE support vector, if any
if rfe:
logger.info("Getting RFE Support")
support = model.feature_map["rfe_support"]
all_features = all_features[:, support]
// Load predictor
predictor = load_predictor(directory)