Code Monkey home page Code Monkey logo

Comments (1)

MatthewReid854 avatar MatthewReid854 commented on May 29, 2024

Thanks for identifying this. It is caused by a floating point precision error which is inherent in Python. Numpy manages to resolve this somehow but python's sum function (which I was using) does not.

import numpy as np
p = np.full(10, 0.1)
print(np.sum(p))
print(p.sum())
print(sum(p)) # this has a floating point error

Output:
1.0
1.0
0.9999999999999999

I have fixed this, but I won't be doing a new release just for this since I believe it's a very rare bug to encounter. It will be part of the next release, which will be when I fix another more significant bug.

As for your use of the Mixture Model, please try to limit the number of components in the mixture to no more than 5. A lower number like 2 or 3 is better. This isn't for any mathematical or programmatic reasons, but it is for practical reasons. It's unlikely that a Distribution with 10 components will have all 10 components identified correctly from data, especially if they are similar distributions. In the Fit_Weibull_Mixture it only searches for 2 Weibull distributions. Also, in your example, all of the components are the same so it's not really a mixture.

from reliability.

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.