Closes #LATEX-FINAL-FIX - Fix LaTeX syntax and backslash escaping in CryptoDemo
This commit is contained in:
12
DEV_LOG.md
12
DEV_LOG.md
@@ -343,6 +343,18 @@ This document tracks all modifications, npm packages, active compilation states,
|
||||
* **Active Bugs**: None.
|
||||
* **Type Checker Status**: Verified 100% clean type verification (`npx tsc --noEmit` returns exit code 0).
|
||||
|
||||
---
|
||||
|
||||
## [2026-06-17] - KaTeX Rendering & Escape Character Repair (#LATEX-FINAL-FIX)
|
||||
|
||||
### Fixed
|
||||
* **LaTeX Syntax Formatting**: Resolved LaTeX rendering corruption in the "Explain Calibration" dropdown container and the "Mathematical Formulation Accordion" inside [CryptoDemo.tsx](file:///c:/Users/jannr/.gemini/antigravity/scratch/investment-sandbox/components/modules/crypto/CryptoDemo.tsx) by replacing double-escaped backslashes with single backslashes in raw strings, ensuring proper compilation and correct mathematical representation.
|
||||
|
||||
### Active Bugs / Compile Status
|
||||
* **Active Bugs**: None.
|
||||
* **Type Checker Status**: Verified 100% clean type verification (`npx tsc --noEmit` returns exit code 0).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ This document serves as the permanent, centralized system architecture design an
|
||||
* *Features*: Destructured the dual-column layout inside `CryptoDemo.tsx` into centered full-width panels. Added human-readable time conversion for pending countdowns, interactive calibration details toggle, individual horizon accuracy tracking, and an accordion detail toggle showing correctness checkmarks for all 5 models.
|
||||
* *Status*: **Fully Operational (Production Lock)**.
|
||||
* **Phase 9.5: Quantitative Hotfix: strict calendar time-locks, local row hiding, Hit Ratio Counter correction, and LaTeX repairs**
|
||||
* *Features*: Integrated strict system date time-locks to prevent look-ahead resolution. Implemented non-destructive row hiding (`isHidden`) preserving local storage data. Corrected hit ratio formatting and LaTeX formatting.
|
||||
* *Features*: Integrated strict system date time-locks to prevent look-ahead resolution. Implemented non-destructive row hiding (`isHidden`) preserving local storage data. Corrected hit ratio formatting. Repaired KaTeX math formatting inside dropdowns and accordions by converting all double-escaped backslashes to clean single-escaped raw strings.
|
||||
* *Status*: **Fully Operational (Production Lock)**.
|
||||
|
||||
---
|
||||
|
||||
@@ -968,10 +968,10 @@ export default function CryptoDemo() {
|
||||
<strong>Hit Ratio Counter (Successes vs. Failures)</strong>: Tracks the running count of correct directional predictions (<InlineMath math="\alpha" />) against incorrect ones (<InlineMath math="\beta" />) since initialization.
|
||||
</p>
|
||||
<p className="leading-relaxed">
|
||||
<strong>Bayesian Confidence (<InlineMath math="\\mathbb{E}[\\theta]" />)</strong>: Represents the posterior probability expectation that the model is correct, calculated using conjugate Beta updating:
|
||||
<strong>Bayesian Confidence (<InlineMath math="\mathbb{E}[\theta]" />)</strong>: Represents the posterior probability expectation that the model is correct, calculated using conjugate Beta updating:
|
||||
</p>
|
||||
<div className="py-1 overflow-x-auto">
|
||||
<BlockMath math="\\mathbb{E}[\\theta] = \\frac{\\alpha}{\\alpha + \\beta}" />
|
||||
<BlockMath math="\mathbb{E}[\theta] = \frac{\alpha}{\alpha + \beta}" />
|
||||
</div>
|
||||
<p className="leading-relaxed">
|
||||
This mathematical calibration dampens overconfident signals when models suffer from historical drift.
|
||||
@@ -1502,19 +1502,19 @@ export default function CryptoDemo() {
|
||||
We model the error rate confidence interval of the model using a Beta distribution. The prior error state is represented by the parameters <InlineMath math="\alpha" /> (Successes) and <InlineMath math="\beta" /> (False Alarms):
|
||||
</p>
|
||||
<div className="py-2 overflow-x-auto text-slate-200">
|
||||
<BlockMath math="P \\sim \\text{Beta}(\\alpha, \\beta) \\quad \\text{with expected value } \\mathbb{E}[P] = \\frac{\\alpha}{\\alpha + \\beta}" />
|
||||
<BlockMath math="P \sim \text{Beta}(\alpha, \beta) \quad \text{with expected value } \mathbb{E}[P] = \frac{\alpha}{\alpha + \beta}" />
|
||||
</div>
|
||||
<p className="mb-2">
|
||||
With a new ML signal <InlineMath math="P_{\\text{ML}}" />, we perform a conjugate Bayes update with a confidence weight <InlineMath math="w" />:
|
||||
With a new ML signal <InlineMath math="P_{\text{ML}}" />, we perform a conjugate Bayes update with a confidence weight <InlineMath math="w" />:
|
||||
</p>
|
||||
<div className="py-2 overflow-x-auto text-slate-200">
|
||||
<BlockMath math="\\alpha_{\\text{post}} = \\alpha + w \\cdot P_{\\text{ML}}, \\quad \\beta_{\\text{post}} = \\beta + w \\cdot (1 - P_{\\text{ML}})" />
|
||||
<BlockMath math="\alpha_{\text{post}} = \alpha + w \cdot P_{\text{ML}}, \quad \beta_{\text{post}} = \beta + w \cdot (1 - P_{\text{ML}})" />
|
||||
</div>
|
||||
<div className="py-2 overflow-x-auto text-slate-200">
|
||||
<BlockMath math="P_{\\text{Posterior}} = \\frac{\\alpha_{\\text{post}}}{\\alpha_{\\text{post}} + \\beta_{\\text{post}}}" />
|
||||
<BlockMath math="P_{\text{Posterior}} = \frac{\alpha_{\text{post}}}{\alpha_{\text{post}} + \beta_{\text{post}}}" />
|
||||
</div>
|
||||
<p className="text-slate-400">
|
||||
If the model is historically highly unstable (high <InlineMath math="\\beta" />), the Bayesian term corrects an overconfident ML signal downwards, safeguarding the robustness of the system.
|
||||
If the model is historically highly unstable (high <InlineMath math="\beta" />), the Bayesian term corrects an overconfident ML signal downwards, safeguarding the robustness of the system.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1524,10 +1524,10 @@ export default function CryptoDemo() {
|
||||
The Random Forest simulates an ensemble of 10 weak decision trees. Each tree splits the data based on threshold criteria (e.g., 'Funding Rate < -0.04%' and 'Open Interest > 10%'):
|
||||
</p>
|
||||
<div className="py-2 overflow-x-auto text-slate-200">
|
||||
<BlockMath math="\\text{ML}_{\\text{prob}} = \\frac{1}{M} \\sum_{m=1}^{M} T_m(\\mathbf{x})" />
|
||||
<BlockMath math="\text{ML}_{\text{prob}} = \frac{1}{M} \sum_{m=1}^{M} T_m(\mathbf{x})" />
|
||||
</div>
|
||||
<p className="text-slate-400">
|
||||
where <InlineMath math="T_m(\\mathbf{x})" /> is the predicted output value of the <InlineMath math="m" />-th decision tree for the feature vector <InlineMath math="\\mathbf{x}" />.
|
||||
where <InlineMath math="T_m(\mathbf{x})" /> is the predicted output value of the <InlineMath math="m" />-th decision tree for the feature vector <InlineMath math="\mathbf{x}" />.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user