stumpy
stumpy copied to clipboard
Add MPdist Tutorial
Now that mpdist
has been implemented, it would be useful to have an mpdist
tutorial
The paper is here
The supporting website is here
The goal of this tutorial would be to reproduce Figure 5 from the paper - An initial tutorial has been started here
Here is the code for retrieving the data for Figure 5
%matplotlib inline
from scipy.io import loadmat
import pandas as pd
import matplotlib.pyplot as plt
from zipfile import ZipFile
from urllib.request import urlopen
import io
import ssl
context = ssl.SSLContext() # Ignore SSL certificate verification for simplicity
plt.rcParams["figure.figsize"] = [20, 6] # width, height
plt.rcParams['xtick.direction'] = 'out'
fzip = ZipFile(io.BytesIO(urlopen("https://sites.google.com/site/mpdistinfo/home/words_dendrogram.zip?attredirects=0&d=1").read()))
mat = fzip.extract("words_dendrogram/LisaBeth/MaryBethAnhLisa_data.mat")
data = loadmat(mat)
dfs = {}
for i in range(data['XSsY4'][0].shape[0]):
name = data['XSsY4'][1][i][0]
df = pd.DataFrame(data['XSsY4'][0][i].flatten(), columns=[name])
dfs[name] = df
and then to plot the data:
fig, axs = plt.subplots(len(dfs), sharex=True, gridspec_kw={'hspace': 0})
plt.suptitle('Names', fontsize='30')
for i, (k, v) in enumerate(dfs.items()):
ymax = v.max()
axs[i].set_xlim(0, 300)
axs[i].plot(v)
axs[i].text(250, 0.99 * ymax, k, color="black", fontsize=20)
It may also be useful to demonstrate how to combine mpdist
with clustering (maybe hdbscan?)
@seanlaw going to start taking a look at this today!
@davidrhallartificialeducation I'd first recommend going over all of the existing STUMPY tutorials. For consistency, we try to use the same headings and writing style where possible (I can help with this). Though, I recommend working on the code first and then coming back and annotating the notebook with more detail afterward.
Let me know if you have any questions, comments, or concerns.
@seanlaw I think the wrong paper is linked here, it should be this.
I think the wrong paper is linked here, it should be this.
Updated. Thank you @asifmallik!
@seanlaw , I would like to work on this issue
Now that
mpdist
has been implemented, it would be useful to have anmpdist
tutorialThe paper is here
The supporting website is here
The goal of this tutorial would be to reproduce Figure 5 from the paper - An initial tutorial has been started here
Hi! is it possible to share the words_dendrogram.zip file somewhere? This website is down and the tutorial no longer works.
Now that
mpdist
has been implemented, it would be useful to have anmpdist
tutorial The paper is here The supporting website is here The goal of this tutorial would be to reproduce Figure 5 from the paper - An initial tutorial has been started hereHi! is it possible to share the words_dendrogram.zip file somewhere? This website is down and the tutorial no longer works.
Please see response here