Note
Go to the end to download the full example code.
Plotting Template Transformer#
An example plot of skltemplate.template.TemplateTransformer
import numpy as np
from matplotlib import pyplot as plt
from skltemplate import TemplateTransformer
X = np.arange(50, dtype=np.float64).reshape(-1, 1)
X /= 50
estimator = TemplateTransformer()
X_transformed = estimator.fit_transform(X)
plt.plot(X.flatten(), label="Original Data")
plt.plot(X_transformed.flatten(), label="Transformed Data")
plt.title("Plots of original and transformed data")
plt.legend(loc="best")
plt.grid(True)
plt.xlabel("Index")
plt.ylabel("Value of Data")
plt.show()
Total running time of the script: (0 minutes 0.062 seconds)