0 Daumen
443 Aufrufe

Aufgabe:

Hallo liebe Leute,

ich habe die folgende Formel:

$$L = ||y-Ax||^{2} - c * \sum \limits_{i}^n \sum \limits_{j, i \ne j}^n x_i*x_j$$ wobei c eine constante ist und $$x = \begin{pmatrix} x_1\\x_2\\...\\x_n \end{pmatrix}$$.

Ich muss diese Formel nach x_1 ableiten respektive $$\frac{delta L}{delta x_1}$$ berechnen. Jedoch bin ich mir nicht sicher, wie das geht.

Die Ableitung der Doppelsumme glaube ich ist $$-2 * c * \sum \limits_{i, i \ne 1}^n x_i $$ da die Doppelsumme als x_1 * x_2 + ... x_1 * x_n + x_n * x_1 + ... geschrieben werden kann. Bei dem Norm denke ich, dass dessen Ableitung gleich -2 * (y - Ax) * A' ist wobei A' nur in der ersten Spalte aus den Werten von A besteht und sonst nur 0 hat.

Ist diese Ableitung korrekt? Würde mich auf Antworten und Lösungen sehr freuen.

Liebe Grüsse

Avatar von

2 Antworten

0 Daumen
 
Beste Antwort

Aloha :)

$$L=\left\|\vec y-\mathbf A\cdot\vec x\right\|-c\sum\limits_{i=1}^n\sum\limits_{{j=1}\atop{i\ne j}}^n x_i\cdot x_j$$$$L=\sqrt{\left(\vec y-\mathbf A\cdot\vec x\right)^T\cdot\left(\vec y-\mathbf A\cdot\vec x\right)}-2c\sum\limits_{{i=1}}^{n-1}\sum\limits_{j=i+1}^n x_i\cdot x_j$$$$L=\sqrt{\vec y^T\cdot\vec y-(\mathbf A\vec x)^T\vec y-\vec y^T(\mathbf A\vec x)+(\mathbf A\vec x)^T(\mathbf A\vec x)}-2c\sum\limits_{{i=1}}^{n-1}x_i\sum\limits_{j=i+1}^n x_j$$$$L=\sqrt{\left\|\vec y\right\|^2-\vec x^T(\mathbf A^T\vec y)-(\vec y^T\mathbf A)\vec x+\vec x^T(\mathbf A^T\mathbf A)\vec x}-2c\sum\limits_{{i=1}}^{n-1}x_i\sum\limits_{j=i+1}^nx_j$$$$L=\sqrt{\left\|\vec y\right\|^2-\sum\limits_{i=1}^nx_i(\mathbf A^T\vec y)_i-\sum\limits_{i=1}^n(\vec y^T\mathbf A)_ix_i+\sum\limits_{i=1}^n\sum\limits_{j=1}^nx_i(\mathbf A^T\mathbf A)_{ij}x_j}-2c\sum\limits_{{i=1}}^{n-1}x_i\sum\limits_{j=i+1}^nx_j$$

Jetzt leiten wir die Wurzel partiell nach \(x_1\) mit der Kettenregel ab und achten besonders auf die innere Ableitung. Der Term hinter der Wurzel ist kein Problem.$$\frac{\partial L}{\partial x_1}=\frac{-(\mathbf A^T\vec y)_1-(\vec y^T\mathbf A)_1+\sum\limits_{j=1}^n(\mathbf A^T\mathbf A)_{1j}x_j+\sum\limits_{i=1}^nx_i(\mathbf A^T\mathbf A)_{i1}}{2\sqrt{\cdots}}-2c\sum\limits_{j=2}^nx_j$$

Da die Matrix \((\mathbf A^T\mathbf A)\) symmetrisch ist, können wir zusammenfassen:$$\frac{\partial L}{\partial x_1}=\frac{-2(\mathbf A^T\vec y)_1+2\sum\limits_{j=1}^n(\mathbf A^T\mathbf A)_{1j}x_j}{2\sqrt{\cdots}}-2c\sum\limits_{j=2}^nx_j$$$$\frac{\partial L}{\partial x_1}=\frac{-(\mathbf A^T\vec y)_1+((\mathbf A^T\mathbf A)\vec x)_1}{\sqrt{\cdots}}-2c\sum\limits_{j=2}^nx_j$$$$\frac{\partial L}{\partial x_1}=\frac{\left(\mathbf A^T\mathbf A\vec x-\mathbf A^T\vec y\right)_1}{\left\|\vec y-\mathbf A\cdot\vec x\right\|}-2c\left(\sum\limits_{j=1}^nx_j-x_1\right)$$

Ich habe das Ergebnis noch symmetrisch aufgeschrieben, damit sofort klar ist, wie die partielle Ableitung nach den anderen Komponenten aussieht.

Avatar von 149 k 🚀

Wow, vielen Dank für diese sehr ausführliche Antwort. Müsste die Wurzel nicht wegfallen weil ||y - Ax||^{2} benutzt wird? Das würde ja dann bedeuten, dass der Nenner wegfällt und somit der erste Term $$2*( A^{T}A\vec{x} - A^{T}\vec{y})_1 = 2 * A^{T} (A\vec{x} - \vec{y})_1$$ ist, oder?

Habe ich es richtig verstanden, dass zum Beispiel mit $$(A^{T}\vec{y})_1$$ der erste Wert vom resultierenden Vektor gemeint ist?

Die Wurzel im Nenner fällt leider nicht weg, weil es die äußere Ableitung ist:$$\left(\sqrt{f(x)}\right)'=\frac{f'(x)}{2\sqrt{f(x)}}$$

Und ja, \((A^T\vec y)_1\) ist die erste Komponente des Vektors \(A^T\vec y\).

0 Daumen

\(-2 * c * \sum \limits_{i, i \ne 1}^n x_i \)

wohl eher so

\(-2 * c * \sum \limits_{i = 2}^n x_i \)

Avatar von 288 k 🚀

Das ist tatsächlich die bessere Schreibweise. Aber weisst du, wie die Ableitung von dem vorderen Teil aussieht?

Ein anderes Problem?

Stell deine Frage

Willkommen bei der Mathelounge! Stell deine Frage einfach und kostenlos

x
Made by a lovely community