def plot_boost(out_dir, duty_cycle=1000., max_boost=10): """ Generate some 3D plots for the boost. @param out_dir: The directory to save the plots in. @param duty_cycle: The duty cycle to use. This parameter must be a float. @param max_boost: The max boost to use. """ # Compute the range of values duty_cycles = np.arange(0, duty_cycle + 1) / duty_cycle min_duty_cycles = np.linspace(0, 1, duty_cycle + 1) # Make it into a mesh x, y = np.meshgrid(duty_cycles, min_duty_cycles) # Evaluate the boost at each instance z = np.array([[compute_boost(xii, yii, max_boost) for xii, yii in izip(xi, yi)] for xi, yi in izip(x, y)]) # Save the plots plot_surface(x, y, z, 'Active Duty Cycle', 'Minimum Active\nDuty Cycle', 'Boost', None, 'boost.png', False)
import sys import plot plot.plot_surface('ausmoho.mean', 100.0, 160.0, -45.0, -5.0, 64, 64)
import sys import plot plot.plot_surface('callbackex.mean', -50.0, 50.0, -50.0, 50.0, 100, 100)
import sys import plot plot.plot_surface('regression.mean', -50.0, 50.0, -50.0, 50.0, 100, 100)
import sys import plot plot.plot_surface('gaussian.mean', -50.0, 50.0, -50.0, 50.0, 100, 100)
import sys import plot plot.plot_surface('disc.median', -50.0, 50.0, -50.0, 50.0, 100, 100)