<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Visualization of pre-generated images.
This is a notebook to load and display pre-generated images used in parameter exploration.
Step1:  Now we need to build a function that takes distance, base and value as a parameter and returns the the SLE, STDM, Visualize Cluster Matrix.
Step2:  Now we build the widget for each exploration
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.image as mpimg
# Widgets library
from ipywidgets import interact
%matplotlib inline
# We need to load all the files here
# Load the file
folder = '../results/'
name = 'parameter_swep_SLM-0.00-0.00-10.00.png'
file_name = folder + name
image = mpimg.imread(file_name)
# Now let's plot it
figsize = (16, 12)
figure = plt.figure(figsize=figsize)
ax = figure.add_subplot(1, 1, 1)
ax.set_axis_off()
ax.imshow(image)
Explanation: Visualization of pre-generated images.
This is a notebook to load and display pre-generated images used in parameter exploration.
End of explanation
def load_SLM(base, distance, value):
    # Load the image
    folder = '../results/'
    name = 'parameter_swep_SLM'
    parameter_marker = '-{0:4.2f}-{1:4.2f}-{2:4.2f}'.format(base, distance, value)
    file_name = folder + name + parameter_marker + '.png'
    image = mpimg.imread(file_name)
    # Plot 
    figsize = (16, 12)
    figure = plt.figure(figsize=figsize)
    ax = figure.add_subplot(1, 1, 1)
    ax.set_axis_off()
    ax.imshow(image)
def load_STDM(base, distance, value):
    folder = '../results/'
    name = 'parameter_swep_STDM'
    parameter_marker = '-{0:5.2f}-{1:5.2f}-{2:5.2f}'.format(base, distance, value)
    file_name = folder + name + parameter_marker + '.png'
    image = mpimg.imread(file_name)
    # Plot 
    figsize = (16, 12)
    figure = plt.figure(figsize=figsize)
    ax = figure.add_subplot(1, 1, 1)
    ax.set_axis_off()
    ax.imshow(image)
def load_cluster(distance, base, value):
    folder = '../results/'
    name = 'parameter_swep_cluster'
    parameter_marker = '-{0:5.2f}-{1:5.2f}-{2:5.2f}'.format(base, distance, value)
    file_name = folder + name + parameter_marker + '.png'
    image = mpimg.imread(file_name)
    # Plot 
    figsize = (16, 12)
    figure = plt.figure(figsize=figsize)
    ax = figure.add_subplot(1, 1, 1)
    ax.set_axis_off()
    ax.imshow(image)
def load_cluster_SLM(base, distance, value):
    folder = '../results/'
    name = 'parameter_swep_cluster_SLM'
    parameter_marker = '-{0:5.2f}-{1:5.2f}-{2:5.2f}'.format(base, distance, value)
    file_name = folder + name + parameter_marker + '.png'
    image = mpimg.imread(file_name)
    # Plot 
    figsize = (16, 12)
    figure = plt.figure(figsize=figsize)
    ax = figure.add_subplot(1, 1, 1)
    ax.set_axis_off()
    ax.imshow(image)
Explanation: Now we need to build a function that takes distance, base and value as a parameter and returns the the SLE, STDM, Visualize Cluster Matrix.
End of explanation
interact(load_SLM, base=(0, 200, 40), distance=(0, 601, 40), value=(10, 200, 38))
interact(load_STDM, base=(0, 200, 40), distance=(0, 601, 40), value=(10, 200, 38))
interact(load_cluster, base=(0, 200, 40), distance=(0, 601, 40), value=(10, 200, 38))
interact(load_cluster_SLM, base=(0, 200, 40), distance=(0, 601, 40), value=(10, 200, 38))
Explanation: Now we build the widget for each exploration
End of explanation
<END_TASK>