6c2ce3d238
- Removed order_flow.rs (UnifiedTheoryParams, OrderFlowAnalyzer, MarketImpact) - Removed analyze_order_flow, unified_theory_params, market_impact Python bindings - Updated mod.rs documentation to be generic (no trading references) - Kept general-purpose: Hawkes, fBM, mfBM, Mittag-Leffler, Hurst estimation Finance-specific code moved to rust-hft-arbitrage-lab-internal
17 lines
369 B
Plaintext
17 lines
369 B
Plaintext
# API: HMM
|
|
|
|
```python
|
|
from optimizr import HMM
|
|
|
|
model = HMM(n_states=2)
|
|
model.fit(X, n_iterations=100, tolerance=1e-6)
|
|
states = model.predict(X)
|
|
logp = model.score(X)
|
|
```
|
|
|
|
Parameters
|
|
- `n_states`: number of hidden regimes
|
|
- `fit(X, n_iterations=100, tolerance=1e-6)`: train with Baum-Welch
|
|
- `predict(X)`: Viterbi decoding → `np.ndarray`
|
|
- `score(X)`: log-likelihood
|