<jupyter_start><jupyter_text>State-space modelsThis is an example of a state-space model<jupyter_code>import breeze.linalg.DenseVector
import org.ruivieira.science.ssm.univariate.{StateGenerator, UnivariateGenerator, UnivariateStructure}

val structure = UnivariateStructure.createLocallyConstant(W = 1.5)

val states = StateGenerator.states(nobs = 1000,
  structure = structure,
  state0 = DenseVector[Double](0.0))

val observations = UnivariateGenerator.gaussian(states = states,
  structure = structure,
  V = 1.0)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09671532846715329, 'fraction_numerical': 0.020072992700729927, 'mean_word_length': 6.8428571428571425, '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': '621980', 'license': 'Apache-2.0', 'n_tokens_mistral': 191, 'n_tokens_neox': 173, 'n_words': 34, 'path': 'notebooks/ssm.ipynb', 'repo_name': 'ruivieira/scala-science', 'size': '548'}