Giter Club home page Giter Club logo

tvregdiff's People

Contributors

billtubbs avatar higgs-bosoff avatar stur86 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tvregdiff's Issues

Comparison with original MATLAB scripts from Chartrand

Has any testing been done to compare the outputs of TVRegDiff with Chartrand's original MATLAB code?

I see he has a couple of demo's included in his code:

  • demo_large.m
  • demo_small.m

I tried running tvregdiff with the same parameters as demo_small.m but couldn't get exactly the same results. Maybe I am doing something wrong.

Intended Behaviour in Adjoint Cumsum?

I'm currently having a hard time understanding the adjoint of the cumsum operator and while trying to understand it, I've encountered something. In line 281 - 283 in tvregdiff.py, the adjoint of the cumsum operator is defined as

def AT(w): return (sum(w) * np.ones(len(w)) -
    np.transpose(np.concatenate(([0.0], np.cumsum(w[:-1])))))

I'm wondering if the effect of

np.transpose(...)

is intended in this context? Since

np.concatenate(([0.0], np.cumsum(w[:-1])))

returns a 1D-vector and NumPy's transpose(...) has no effect on 1D-vectors, nothing will happen here (see also the docs). As example one can call

a = np.arange(0, 10)
np.allclose(a, np.transpose(a))    # evaluates to True because a is 1D
a = a.reshape((-1, 1))
np.allclose(a, np.transpose(a))    # evaluates to False because a is a 2D-column-vector, same applies to row vectors

As I said, I don't quite understand the adjoint of the cumsum, so I would like to ask if this behaviour (nothing happening) is intended or not?

Btw, instead of

sum(w) * np.ones(len(w))

one can use

np.full((len(w), ), fill_value = np.sum(w))

but this is just a very small detail.
Thanks and best regards!

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.