Slide 32
Slide 32 text
Scikit-learn: example
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestRegressor
x = 10 * np.random.rand(100)
y = np.sin(x) + 0.1 * np.random.randn(100)
model = RandomForestRegressor()
model.fit(x[:, np.newaxis], y)
xfit = np.linspace(-1, 11, 1000)
yfit = model.predict(xfit[:, np.newaxis])
plt.plot(x, y, '.k')
plt.plot(xfit, yfit)