reg = RandomForestRegressor()
params = reg.get_params()
# To get the model hyperparameters before you instantiate the class:
import inspect
import sklearn
models = [sklearn.ensemble.RandomForestRegressor]
for m in models:
hyperparams = inspect.getargspec(m.__init__).args
print(hyperparams)