# /// script
# requires-python = ">=3.11"
# dependencies = []
# ///
"""Train on four- and six-particle frames and forecast from a nine-particle frame."""

import sys
from pathlib import Path
from random import Random

sys.path.insert(0, str(Path(__file__).resolve().parents[1] / "reference"))
from fit import cloud, forecast, train

scale, decoder_sd, coefficients, noise = train()
path = forecast(cloud(.2,-.4,9), scale, coefficients, noise, [.11,.17,.09], Random(9))
print(f"encoder scale {scale:.3f}, decoder standard deviation {decoder_sd:.3f}")
print(f"observable drift coupling {coefficients[0][2]:.3f}, correlated noise {noise[1][0]:.3f}")
print("nine-particle observable forecast", *(f"{x[0]:.4f}" for x in path))
