Files
bayesclass/examples/plot_template.py
2022-11-04 11:53:06 +01:00

18 lines
407 B
Python

"""
===========================
Plotting Template Estimator
===========================
An example plot of :class:`bayesclass.template.TemplateEstimator`
"""
import numpy as np
from matplotlib import pyplot as plt
from bayesclass import TemplateEstimator
X = np.arange(100).reshape(100, 1)
y = np.zeros((100,))
estimator = TemplateEstimator()
estimator.fit(X, y)
plt.plot(estimator.predict(X))
plt.show()