GithubHelp home page GithubHelp logo

Comments (3)

siudej avatar siudej commented on August 27, 2024

This paper provides an algorithm to metricize and keep the correction minimal in L2 sense:
http://papers.nips.cc/paper/2598-triangle-fixing-algorithms-for-the-metric-nearness-problem.pdf
However, it requires a lot of memory to store all the correction terms.

from ricci.

micah541 avatar micah541 commented on August 27, 2024

I'm really confused as to when and why this happens. For example, I've
been using idist = dist before starting the Ricci flow, and then, after
doing the Ricci flow, printing idist. idist does not change, but dist
does change and I can see them right next to each other. This seems
to be my usual experience, so I'm not sure why it would be any different
here.

On 3/17/2016 9:12 AM, Bartek Siudeja wrote:

In |metricize| we have |olddist=dist| and the same with |d_ij|. These
do not create copies of the original matrix, just fresh reference
(pointer) to the same numpy array.

So the algorithm is changing entries of the matrix and uses the
changed entries to compute other entries, in one while run. Also,
|olddist==dist| is automatically true, so while never runs more than once.

Adding |np.copy(dist)| should fix this, but will also slow down the
algorithm significantly. And it is already very slow.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#6

from ricci.

siudej avatar siudej commented on August 27, 2024

You do
idist = sqdist
then before you initial_L1 you change sqdist.
Check if idist is also different. It should.

Later in the loop you have
sqdist = ne.evaluate(…)
This creates a completely new sqdist.

So in general
array = ..
first forgets whatever was in array, them creates something new.

In contrast:
array +=
array[:] =
ne.evaluate(…, out=array)
np.exp(…, out=array)
all replace values in the array.

from ricci.

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.