|
@@ -9,7 +9,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 103,
|
|
|
+ "execution_count": 17,
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
@@ -35,7 +35,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 104,
|
|
|
+ "execution_count": 20,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -48,14 +48,14 @@
|
|
|
"import stumpy\n",
|
|
|
"\n",
|
|
|
"import eye_state_prototype\n",
|
|
|
- "from eye_state_prototype import motif_extraction, learn_prototype, combined_gaussian\n",
|
|
|
+ "from eye_state_prototype import motif_extraction, learn_prototype, learn_prototypes, combined_gaussian\n",
|
|
|
"from eye_state_prototype import fpm, find_peaks_in_ear_ts, cal_bpm_results\n",
|
|
|
"from eye_state_prototype import plot_ear, plot_results"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 105,
|
|
|
+ "execution_count": 3,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -71,7 +71,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 106,
|
|
|
+ "execution_count": 4,
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
@@ -90,7 +90,7 @@
|
|
|
"True"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 106,
|
|
|
+ "execution_count": 4,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
}
|
|
@@ -123,7 +123,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 107,
|
|
|
+ "execution_count": 5,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -133,16 +133,16 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 108,
|
|
|
+ "execution_count": 22,
|
|
|
"metadata": {},
|
|
|
"outputs": [
|
|
|
{
|
|
|
"data": {
|
|
|
"text/plain": [
|
|
|
- "[<matplotlib.lines.Line2D at 0x7fc67da6eec0>]"
|
|
|
+ "[<matplotlib.lines.Line2D at 0x7fa3d1782530>]"
|
|
|
]
|
|
|
},
|
|
|
- "execution_count": 108,
|
|
|
+ "execution_count": 22,
|
|
|
"metadata": {},
|
|
|
"output_type": "execute_result"
|
|
|
},
|
|
@@ -159,8 +159,8 @@
|
|
|
],
|
|
|
"source": [
|
|
|
"# get motif No.1\n",
|
|
|
- "motif_01 = learn_prototype(ear_r[0:20000], m=100, max_matches=10)\n",
|
|
|
- "plt.plot(motif_01)"
|
|
|
+ "motifs = learn_prototypes(ear_r[0:20000], m=100, max_matches=10)\n",
|
|
|
+ "plt.plot(motifs[0])"
|
|
|
]
|
|
|
},
|
|
|
{
|