mirror of
https://github.com/Doctorado-ML/bayesclass.git
synced 2025-08-17 00:26:10 +00:00
Initial commit
This commit is contained in:
17
examples/plot_template.py
Normal file
17
examples/plot_template.py
Normal file
@@ -0,0 +1,17 @@
|
||||
"""
|
||||
===========================
|
||||
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()
|
Reference in New Issue
Block a user