Giter Club home page Giter Club logo

Comments (5)

r9y9 avatar r9y9 commented on June 12, 2024 1

Pushed a fix to master. Please feel free to reopen if the problem persists.

from nnsvs.

taroushirani avatar taroushirani commented on June 12, 2024

Hello, I have been consulted the same problem (https://pbs.twimg.com/media/FREU_d4UUAAxcxV?format=png&name=360x360). I'm not familiar with mathematics, but this problem seems to result from the inappropriate matrix(not positive-definite matrix) returned from build_poe in nnmnkwii/paramgen/_mlpg.py.

Can we use bandmat.linalg.solve instead of solveh when numpy.linalg.LinAlgError occurs? (In my understanding, solve is slower than solveh but has a looser restriction, right?)

  • nnmnkwii/paramgen/_mlpg.py(L195-)
        b, P = build_poe(bs, precisions, win_mats)
        try:
                y[:, d] = bla.solveh(P, b)
        except numpy.linalg.LinAlgError:
                y[:, d] = bla.solve(P, b)

from nnsvs.

r9y9 avatar r9y9 commented on June 12, 2024

Hi, thanks for looking into it. Your suggestion sounds reasonable.

Also, I highly suspect that this is a numerical stability issue that can be addressed differently. Looking into the attached features, I found that the generated variance contains a very small value.

> sigma = np.load("path/to/features/max_sigma_sq.npy")
> sigma.min(), sigma.max()
> (1.3833172716339162e-18, 142.80620706633766)

By clipping the sigma by np.clip(sigma, 1e-17, sigma.max()), MLPG works good for me. We can clip sigma by a larger value like 1e-14 or similar.

Could you check if it works okay for you?

from nnsvs.

taroushirani avatar taroushirani commented on June 12, 2024

Thank you for your rapid response. I don't have the data which causes this error, but Mr. Minato(@M_C3O2) have checked this problem and clipping sigma seems to work ok[1].

  1. https://twitter.com/M_C3O2/status/1518527034246692865 (written in Japanese)

from nnsvs.

stakira avatar stakira commented on June 12, 2024

max_sigma_sq = np.maxinum(max_sigma_sq, 1e-14) seem to be working fine, not sure how low it goes.

from nnsvs.

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.