Coder Social home page Coder Social logo

Comments (6)

rlober avatar rlober commented on August 19, 2024

The 1/2 won't affect the global optimum as long as it is missing (or present) for all objectives.

from orca.

ZzhengP avatar ZzhengP commented on August 19, 2024

When I define a class of gravity regularization, I define E like a identity matrix and f equals to -g. But the simulation shows that the robot compensates too much gravity torque. By multiplying H by 2, I solved the problem. I think 1/2 affect regularization resolution.

from orca.

rlober avatar rlober commented on August 19, 2024

It still shouldn't make any difference because the gradient is multiplied by 2 already :

Gradient_.noalias() = 2.0 * SelectionVector.asDiagonal() * Weight * A.transpose() * b ;

0.5 x'Hx +x'g = x'Hx + 2x'g

Can you post links to the relevant parts of your code? I think the problem is something more subtle.

from orca.

ZzhengP avatar ZzhengP commented on August 19, 2024

(Ex+f)'(Ex+f) = (x'E'Ex + 2x'E'f) = x'Hx + x'g. Therefore, this factor 2 means 2E'f = g.
https://github.com/ZzhengP/Stage_M2/blob/b4b9c2b77ed5880b013df82be87038c462ffcbb6/rtt_orca_reg.hpp#L13

from orca.

ahoarau avatar ahoarau commented on August 19, 2024

(Ex+f)'(Ex+f) = (x'E'Ex + 2x'E'f)
and
0.5 x'Hx +x'g = x'Hx + 2x'g

Means that
H = E'E
and
E'f = g

In the code it's 2E'f = g

Problem ! Thanks for reporting. This is a nasty one

from orca.

ahoarau avatar ahoarau commented on August 19, 2024

Fixed in 64f5637
Thanks !

from orca.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.