 </div>

    <div class="ref-description">
    <p>The safely_detect_changepoints() function calculates the optimal positioning
and number of changepoints for given data and penalty. It uses a PELT algorithm
with a nonparametric cost function based on the empirical distribution.
The implementation is inspired by the code available on https://github.com/rkillick/changepoint.</p>
    </div>

    <pre class="usage"><span class='fu'>safely_detect_changepoints</span>(<span class='no'>data</span>, <span class='kw'