Invisible fraction: How to draw a gradient when the output is defined by an equation

Seek hidden guidance along the same branch of resolution, check local exclusivity and solve the debris.

Thematic shorts • In-depthCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Seek implicit guidance along the same branch of resolution
  • Check Local Monopoly and Solver Deficiencies

Suggested first

  • Vector and Matrix Operations

The output may not come from a series of explicit attributions

Some of the calculation modules first seek an equation solution and then hand it over to subsequent models, such as balance states, optimisation sub-problems or binding parameters. The solver can be phased in and de-rated, and the equation defining the solution can be used to direct local guidance. The latter is known as the invisible fraction. It requires clarity as to which branch of the resolution is being tracked and whether the relevant guidance matrix is reversible and cannot be written with a counter-sign without ignoring the condition.

A complete process of a metric equation

Set Output z Satisfy z ²+ xz-1 =0 and choose the root. When x = 0, root z = 1. Reciprocal guidance for x on both sides of the equation, obtained by 2 z+x by z plus z equals zero, so the guide is -z divided by 2 z+x, with the current value -0.5. This is not to use z as a constant peer-to-peer deflection; The part of z that itself changes with x must be retained. Increase x to 0.1, root (-0.1+sqrt(4.01))/2, approximately 0.9514922. Linear approximation of 1-0.5 x 0.1 = 0.95, with error of about 0.000124922. The difference is non-linear and does not indicate a faulty guidance formula. When the reduction is moved, the approximate error should be checked for expected reduction.

Shape of a multidimensional situation

If z and the binding equation have several dimensions, the lead for z is a square array, and the lead for input may be a rectangular matrix. Actual realization should be achieved by decoupling a linear system without the need for an overt construction. If ultimately only a gradient of a mark of loss is required, it can also be converted to an equation to calculate vectors and reduce intermediate lead storage. The sensitivity of the solution becomes greater when the matrix of guidance for z is close to odd; Simple formulae may no longer apply if partial exclusivity is lost at the branch cross or folding point. The solver suddenly jumps from one branch to another and should not be treated as a normal gradient for the same smooth function.

Accept with numeric error

The z returned from the actual module may only approximate to the equation. The original equation is checked first, the linear system is checked for resolution, and finally compared to a limited margin. It is difficult to tell whether the error arose from the original problem or from the number of tests, depending only on the subsequent loss. (a) Optimal resolution of restraints, also addressing dynamic constraints, complementary conditions and possible non-glossal switching; These structures cannot be ignored simply after guidance on non-binding first-order conditions. The implicit approach reduces the cost of rolling out the trajectory and does not exempt the original problem from stability, local conditions or model assumptions.

F(z,x)=0; dzdx=−Fz−1Fx

Self-measurement and provocator

Why can't you just calculate the equation for x bias z and use it as an output gradient?

Since z in the equation is also modified by x, dz/ dx must be decoded by chain rules; The result of this case is -0.5 instead of 1.

Is the original equation very small and stable?

No guarantee. A guidance matrix for z, which is near and strange, may still result in a significant degression and gradient change.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Mathematics for Machine Learning — author textbook
  2. MIT 18.02SC Multivariable Calculus

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.