from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import make_regression
# Create a random forest regressor estimator object
rf = RandomForestRegressor(n_estimators=100, random_state=42)
# Get the current parameters and their values
params = rf.get_params()
print(params)
# Fit the estimator to some data
X, y = make_regression(random_state=42)
rf.fit(X, y)
# Get the feature importances
importances = rf.feature_importances_
print(importances)