Note
Click here to download the full example code
Plotting Template TransformerΒΆ
An example plot of consensuscluster.template.TemplateTransformer
import numpy as np
from matplotlib import pyplot as plt
from consensuscluster import TemplateTransformer
X = np.arange(50, dtype=np.float).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.193 seconds)