mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-27 14:25:16 +02:00
Fix MPL_AVAILABLE error.
This commit is contained in:
parent
b0e66c5cb5
commit
b174b58b79
3 changed files with 9 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
"""
|
||||
Gaussian Processes classification examples
|
||||
"""
|
||||
MPL_AVAILABLE = True
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
import GPy
|
||||
import numpy as np
|
||||
from GPy.util import datasets
|
||||
|
||||
MPL_AVAILABLE = True
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
|
|
@ -141,7 +141,12 @@ def boston_example(optimize=True, plot=True):
|
|||
|
||||
optimizer = "bfgs"
|
||||
messages = 0
|
||||
data = datasets.boston_housing()
|
||||
try:
|
||||
import pods
|
||||
except ImportError:
|
||||
print("pods unavailable, see https://github.com/sods/ods for example datasets")
|
||||
return
|
||||
data = pods.datasets.boston_housing()
|
||||
degrees_freedoms = [3, 5, 8, 10]
|
||||
X = data["X"].copy()
|
||||
Y = data["Y"].copy()
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
"""
|
||||
Gaussian Processes regression examples
|
||||
"""
|
||||
MPL_AVAILABLE = True
|
||||
try:
|
||||
import matplotlib.pyplot as plt
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue