This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from sklearn.base import BaseEstimator, RegressorMixin | |
| import rpy2 | |
| from rpy2.robjects.numpy2ri import numpy2ri | |
| from rpy2.robjects.packages import importr | |
| gbm = importr('gbm') | |
| class GBMRegressor(BaseEstimator, RegressorMixin): | |
| def __init__(self, learning_rate=0.1, n_estimators=100, max_features=1.0, verbose=False, |