Giter Club home page Giter Club logo

Comments (12)

adler-j avatar adler-j commented on May 14, 2024

What would the action of that be?

(op+vec)(x) = op(x) + vec*x

right?

from odl.

adler-j avatar adler-j commented on May 14, 2024

If we do this we clearly want to add a op - vec aswell.

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

I was more thinking of (op+vec)(x) = op(x) + vec, for range elements at least. Actually mostly op-vec, as you wrote, as in residual_op = op - vec.

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

If there is no obvious behavior of this operator overload, then it's probably better to just create a class to support it.

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

Actually, your proposed action is already covered by op + vec.T, right?

from odl.

adler-j avatar adler-j commented on May 14, 2024

I dont think we should do what you propose then, simply because it would violate the distributive law.

What you said is equivalent to

(op + vec.T)(x) = op(x) + x.inner(vec)

I think we should implement this as a named operator in default_ops.

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

Err, I don't quite follow. This is already supported, or am I missing something? vec.T is an Operator, and that you can add to op as long as op is a functional.

Can you be more specific about the distributive law violation? I don't see it.

from odl.

adler-j avatar adler-j commented on May 14, 2024

op + vec.T is supported where op is a functional, indeed.

Regarding violating the distributive law, one would expect

(A+B)(x) = A(x) + B(x)

Here A=op so the intepretation is obvious, but with B=vec this is nonobvious. For most of us, one generally inteprets vec as multiplication by the vector. See e.g. our quasi-newton algorithm

(vec * vec.T)(x) = vec * vec.T(x)

The other case doesnt realy make sense to me, then we would have vec(x) = vec, which doesnt realy rhyme for me, and I've never seen this use in the literature (I think).

One option would be to add (and we prolly should do this anyhow) a function called ConstantOperator such that:

ConstantOperator(vec)(x) = vec

That way we could write, very clearly

(A - ConstantOperator(vec))(x) = A(x) - vec

from odl.

adler-j avatar adler-j commented on May 14, 2024

Any decision on this?

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

Dunno. But the expression type operator looks fine to me, and if we want some shortcut later, we can still add it. Or just forget about that this issue ever existed 😉

from odl.

kohr-h avatar kohr-h commented on May 14, 2024

Does the ConstantOperator exist? We may want to implement it together with the ResidualOperator.

from odl.

adler-j avatar adler-j commented on May 14, 2024

Proposal made for that, closing this.

from odl.

Related Issues (20)

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.