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
|
Gaussian Processes classification examples
|
||||||
"""
|
"""
|
||||||
|
MPL_AVAILABLE = True
|
||||||
try:
|
try:
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
|
|
||||||
import GPy
|
import GPy
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from GPy.util import datasets
|
|
||||||
|
|
||||||
|
MPL_AVAILABLE = True
|
||||||
try:
|
try:
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
@ -141,7 +141,12 @@ def boston_example(optimize=True, plot=True):
|
||||||
|
|
||||||
optimizer = "bfgs"
|
optimizer = "bfgs"
|
||||||
messages = 0
|
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]
|
degrees_freedoms = [3, 5, 8, 10]
|
||||||
X = data["X"].copy()
|
X = data["X"].copy()
|
||||||
Y = data["Y"].copy()
|
Y = data["Y"].copy()
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
"""
|
"""
|
||||||
Gaussian Processes regression examples
|
Gaussian Processes regression examples
|
||||||
"""
|
"""
|
||||||
|
MPL_AVAILABLE = True
|
||||||
try:
|
try:
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue