<jupyter_start><jupyter_text>Visualization<jupyter_code>trace1 = go.Scatter(
    x=[j for j in range(array[0].shape[1]) ],
    y=series_peaks,
    mode='lines',
    name='Original Plot'
)

trace2 = go.Scatter(
    x=indices_peaks,
    y=[series_peaks[j] for j in indices_peaks],
    mode='markers',
    marker=dict(
        size=8,
        color='rgb(255,0,0)',
        symbol='cross'
    ),
    name='Detected Peaks'
)

# data = [trace1, trace2]
# plotly.offline.iplot(data, filename='plot-with-peaks')
trace3 = go.Scatter(
    x=[j for j in range(array[0].shape[1]) ],
    y=series_valleys,
    mode='lines',
    name='Original Plot'
)

trace4 = go.Scatter(
    x=indices_valleys,
    y=[series_valleys[j] for j in indices_valleys],
    mode='markers',
    marker=dict(
        size=8,
        color='rgb(255,0,0)',
        symbol='cross'
    ),
    name='Detected Valleys'
)

# data = [trace3, trace4]
# plotly.offline.iplot(data, filename='plot-with-valleys')
trace5 = go.Scatter(
    x=starts,
    y=[series_peaks[j] for j in starts],
    mode='markers',
    marker=dict(
        size=8,
        color='rgb(255,0,255)',
        symbol='cross'
    ),
    name='Detected Starts'
)

trace6 = go.Scatter(
    x=ends,
    y=[series_peaks[j] for j in ends],
    mode='markers',
    marker=dict(
        size=8,
        color='rgb(0,255,255)',
        symbol='cross'
    ),
    name='Detected Ends'
)


data = [trace1, trace2, trace5, trace6]
plotly.offline.iplot(data, filename='plot-with-peaks_ends')
eachfile<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16244314489928524, 'fraction_numerical': 0.029889538661468484, 'mean_word_length': 3.095744680851064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '72365', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 619, 'n_tokens_neox': 595, 'n_words': 100, 'path': 'peak_max_projection.ipynb', 'repo_name': 'minh-doan/Peak_detection', 'size': '1539'}