Comments (4)
Thanks for reporting, that is indeed a bug. I will see how this can be fixed. A temporary workaround for you is
# Minuit fit
p0 = np.array([2., 2., 0., -1., -1.5])
mFit = LeastSquares(x, y, ey, fitFun)
mFit.visualize = lambda x, *args: None
m = Minuit(mFit, p0) # pass starting values
m.migrad()
# m.hesse()
from iminuit.
If you want to fit a smooth function
from numba_stats import bernstein
def model(x, p):
domain_of_polynomial = (-0.4, 0.4)
return bernstein.density(x, p, *domain_of_polynomial)
start = np.ones(4) # increase this to increase flexibility of Bernstein polynomial
m = Minuit(LeastSquares(x, y, ey, model), start)
m.limits = (0, None) # ensure positiveness
m.migrad()
from iminuit.
Yes I know :)
We are working with people that like splines (I dont), so here we are....
C.
from iminuit.
I like splines, too :). Bernstein polynomials are a special case of splines.
from iminuit.
Related Issues (20)
- Tests fail without ipywidgets HOT 3
- `_safe_log` is not safe HOT 5
- iminuit hangs when trying to visualize step function HOT 1
- Better documentation for errordef HOT 1
- arm64 test failure in test_without_numba HOT 2
- test_minimize.py fails two tests HOT 2
- CostSum support for cost functions accepting a parameter array HOT 3
- Error when calling mnprofile with NumPy >= 1.24 HOT 2
- Misleading documentation for iminuit.util.make_with_signature() HOT 1
- Python 3.12 support HOT 7
- Specifying relationships between fit parameters HOT 1
- Bundled root version uses the imp module (removed with Python 3.12) HOT 1
- cost.LeastSquares fails with data with more than 2 dimensions HOT 1
- 1 test fails: pytest.PytestDeprecationWarning: <class 'pytest_black.BlackItem'> is not using a cooperative constructor and only takes {'parent', 'fspath'}. HOT 1
- Build fails with LTO HOT 4
- Update to trusted publisher releases
- Support keyword-only cost functions
- Feature Request: mix arguments of different-sized arrays (& floats)? HOT 3
- Error: IMinuitWarning: MIGRAD fails to converge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iminuit.