Added sympy. Fixed derivation issue.

This commit is contained in:
2026-07-02 22:42:48 +03:00
parent a82885fe2d
commit 7ff2ef6835
2 changed files with 8 additions and 5 deletions
+2 -4
View File
@@ -602,12 +602,10 @@ Therefore, our derivative to calculate from before is equal to:
\frac{\partial \hat{F}_0^{-1}(\alpha ; \mathcal{B}_0)}{\partial f_\theta(\mathbf{x}_i)} = \frac{1}{\sigma^{-1}'\left( \sigma(\tau - f_{\theta}(\mathbf{x}_i)) \right)\cdot\left( \sum_{\mathbf{x}_j \in \mathcal{B}_0 ; j \neq i}\sigma'(\tau - f_{\theta}(\mathbf{x}_j))\right) + 1 }
\]
Recalling the inverse derivative identity $\frac{1}{(f^{-1})'(f(x))} = f'(x)$, we note that $\frac{1}{\sigma^{-1}'(\sigma(\tau - f_{\theta}(\mathbf{x}_i)))} = \sigma'(\tau - f_{\theta}(\mathbf{x}_i))$.
Therefore:
Substituting $\sigma^{-1}'(\sigma(u)) = \frac{1}{\sigma'(u)}$ and multiplying numerator and denominator by $\sigma'(\tau - f_{\theta}(\mathbf{x}_i))$:
\[
\frac{\partial \hat{F}_0^{-1}(\alpha ; \mathcal{B}_0)}{\partial f_\theta(\mathbf{x}_i)} = \frac{\sigma'(\tau - f_{\theta}(\mathbf{x}_i))}{\left( \sum_{\mathbf{x}_j \in \mathcal{B}_0 ; j \neq i}\sigma'(\tau - f_{\theta}(\mathbf{x}_j))\right) + 1}
\frac{\partial \hat{F}_0^{-1}(\alpha ; \mathcal{B}_0)}{\partial f_\theta(\mathbf{x}_i)} = \frac{\sigma'(\tau - f_{\theta}(\mathbf{x}_i))}{\displaystyle\sum_{\mathbf{x}_j \in \mathcal{B}_0}\sigma'(\tau - f_{\theta}(\mathbf{x}_j))}
\]
Which we can plug back into the ROLL derivation framework.