docstr: By default, Prophet uses the first 80% of the history to detect changepoints.
docstr_tok: ["By","default",",","Prophet","uses","the","first","80","%","of","the","history","to","detect","changepoints","."]
code: def test_get_changepoints(self, daily_univariate_ts, backend):
      """
      By default, Prophet uses the first 80% of the history to detect changepoints.
      """
      train, _ = train_test_split(
          daily_univariate_ts, daily_univariate_ts.shape[0] // 2
      )
      m = Prophet(stan_backend=backend)
      history = m.setup_dataframe(train, initialize_scales=True)
      m.history = history
      m.set_changepoints()
      cp = m.changepoints_t
      assert cp.shape[0] == m.n_changepoints
      assert len(cp.shape) == 1
      assert cp.min() > 0
      cp_indx = int(np.ceil(0.8 * history.shape[0]))
      assert cp.max() <= history["t"].values[cp_indx]
  
imports: import numpy
  import pandas
  import pytest
  from prophet import Prophet
  from prophet.utilities import warm_start_params
label_desc: Use image node_id 8 for calling the TestProphetTrendComponent obj's underlying member method code with example usage: obj.test_get_changepoints(daily_univariate_ts, backend) without return types