<jupyter_start><jupyter_text>Exact one step ahead cross validationRefit the model including from 30 to 99 observations.<jupyter_code>from arviz.stats.stats_utils import logsumexp
splits = np.arange(30, 99)
elpd_lfo = np.empty(len(splits))
for idx, split_id in enumerate(splits):
    stan_data = split_data_dict(split_id)
    fit = stan_model.sampling(data=stan_data, **sample_kwargs)
    idata = az.from_pystan(posterior=fit, **idata_kwargs)
    elpd_lfo[idx] = np.exp(
        idata.log_likelihood.y_ex.isel(day_ex=0).stack(sample=("chain", "draw"))
    ).mean().item()
elpd_lfo.sum()
elpd_lfo = np.log(elpd_lfo)
print(f"elpd_lfo   : {elpd_lfo.sum()}\nelpd_lfo_se: {(len(splits)*np.var(elpd_lfo))**.5}")<jupyter_output>elpd_lfo   : -210.54626842098617
elpd_lfo_se: 5.999860267422607
{'fraction_non_alphanumeric': 0.1417624521072797, 'fraction_numerical': 0.05491698595146871, 'mean_word_length': 5.938053097345133, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '322111', 'license': 'Apache-2.0', 'n_tokens_mistral': 360, 'n_tokens_neox': 329, 'n_words': 49, 'path': 'leave_future_out/sir_ode_lfo_py.ipynb', 'repo_name': 'OriolAbril/calaix_de_sastre', 'size': '783'}