mirror of
https://github.com/Doctorado-ML/bayesclass.git
synced 2025-08-15 23:55:57 +00:00
18 lines
407 B
Python
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()
|