mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Implemented MLP gradients with respect to X.
This commit is contained in:
parent
b127c96bf2
commit
84b7156d23
4 changed files with 32 additions and 46 deletions
|
|
@ -5,7 +5,13 @@ import numpy as np
|
|||
import matplotlib as mpl
|
||||
import time
|
||||
import Image
|
||||
# import visual
|
||||
try:
|
||||
import visual
|
||||
visual_available = True
|
||||
|
||||
except ImportError:
|
||||
visual_available = False
|
||||
|
||||
|
||||
class data_show:
|
||||
"""
|
||||
|
|
@ -24,7 +30,6 @@ class data_show:
|
|||
def close(self):
|
||||
raise NotImplementedError, "this needs to be implemented to use the data_show class"
|
||||
|
||||
|
||||
class vpython_show(data_show):
|
||||
"""
|
||||
the vpython_show class is a base class for all visualization methods that use vpython to display. It is initialized with a scene. If the scene is set to None it creates a scene window.
|
||||
|
|
@ -318,7 +323,7 @@ class mocap_data_show_vpython(vpython_show):
|
|||
for i in range(self.vals.shape[0]):
|
||||
self.spheres.append(visual.sphere(pos=(self.vals[i, 0], self.vals[i, 2], self.vals[i, 1]), radius=self.radius))
|
||||
self.scene.visible=True
|
||||
|
||||
|
||||
def draw_edges(self):
|
||||
self.rods = []
|
||||
self.line_handle = []
|
||||
|
|
@ -435,7 +440,6 @@ class mocap_data_show(matplotlib_show):
|
|||
self.axes.set_ylim(self.y_lim)
|
||||
self.axes.set_zlim(self.z_lim)
|
||||
|
||||
|
||||
class stick_show(mocap_data_show_vpython):
|
||||
"""Show a three dimensional point cloud as a figure. Connect elements of the figure together using the matrix connect."""
|
||||
def __init__(self, vals, connect=None, scene=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue