Code Monkey home page Code Monkey logo

bayesicfitting's Introduction



Navigation

Content Global Documentation
1. History Home Manual
2. Setup Readme Glossary
3. Structure Notes Design
4. Status Examples Trouble
5. Versions

ย 

Readme.

A package for model fitting and Bayesian evidence calculation.

We have a paper out in "Astronomy and Computing" about BayesicFitting. Kester and Mueller (2021).

In case you are wondering what that is about take a quick look at this example.

Citation index for the BayesicFitting package: DOI: 10.5281/zenodo.2597200

What's new.

  • 27 March 2024 version 3.2.1
    A lot of fairly small stuff.
    • status changed to Alpha for some newer additions
    • Priors:
      • Adapt to input arrays
      • Made limited and/or circular
      • Proper integral when limited
    • Engines:
      • Add bestCheck and bestBoost
      • Minor restructoring
    • Models:
      • Minor restructoring and renaming
      • setLimits() replaced by setPrior() in RepeatingModel
      • provide for more dimensions of outputs in derivative
    • Problems:
      • toString() method restructured
    • Walker and WalkerList:
      • Add logPrior attribute
      • Change in inheritance reporting
    • PhantomCollection:
      • getList() method
    • NestedSampler:
      • Add repiter attribute: report every repiter when verbose=2
      • Add bestBoost
    • ModelDistribution:
      • put internal sample() method in try-except block
    • Tools:
      • subclassof() method
      • printclass finetuning
    • Test and documentation. Update.

1. History

The BayesicFitting package is a python version of the the fitter classes in Herschel Common Science System (HCSS). HCSS was the all encompassing software system for the operations and analysis of the ESA satelite Herschel. The HCSS version of the fitting software was written in JAVA, mostly by me. I encoded features and classes that were requested by my Herschel colleagues or that I remembered having used myself during my lifelong career as data analyst for earlier satellites as IRAS, ISO and AKARI. So most of the stuff in here was needed and used at a certain moment in time. Later, the package was developing in directions that were needed by my work for the James Webb Space Telescope (JWST).

The HCSS system is in the public domain under GPL3. It was used by the 3 instrument groups of the Herschel satellite to write calibration and analysis software. Since the end of the mission HCSS is not being maintained

I used a customized version of java2python (j2py on github) to translate the JAVA classes to python. However, the actual code needed serious pythonization. Every line has been inspected. Every construct has been revised.

The documentation got most profit from the automated conversion. Also the structure into classes, the inheritance, methods and dependencies are largely the same as in the original HCSS.

2. Setup

The package is written in python3 although I am not aware of using any specific python3 features. It uses numpy (>= 1.9) for its array structure, scipy (>=1.0) for linear algebra and other stuff and astropy (>=2.0) for units. Matplotlib (>=2.0) is used for plotting.

Download and unpack the BayesicFitting zip file from github. Move into the BayesicFitting-master directory and run:

python setup.py install

where python is python3. Or install it as :

pip install BayesicFitting

3. Structure

source

The BayesicFitting package consists of over 100 classes, each class in its own file. These classes can be divided into 3 broad categories: models, fitters and nested sampling. About 50 models, 10 fitters and the remainder is needed to run the nested sampling algorithm. All these classes are in a directory BayesicFitting/source. A special type of functions are found in BayesicFitting/source/kernels. They can be used to construct a model.

examples

In BayesicFitting/examples a number of scripts can be found to exercise the classes. They are in the form of jupyter notebooks. Some are using real data; others have synthetic data specially constructed to make some point.

All examples can be inspected by clicking on them. They will fold out in the browser.

To actually exercise the examples and maybe adapt then, start a jupyter notebook in your examples directory.

jupyter notebook

The program will open a list in your webbrowser where you can select a notebook file (.ipynb), which can be run.

documentation

In the documenation directory a number of documents can be found.

  • Manual: A first draft of a manual. It obviously needs more work.

  • Troubles: A list of troublesome situations and what to do about it.

  • Glossary: A list of the terms used throughout this package, with explanations.

  • Design: An architectural design document, displaying the relationships between the classes.

  • Style: A few notes on my style of code and documenation.

  • References: A list of external references for BayesicFitting.

test

Almost all classes have a test harness. These are located in BayesicFitting/test. They can be execised as:

python -m unittest <file>

where python refers to python3 and file refers to one of the files in BayesicFitting/test.
As most functionality is tested in a test harness, examples on how to use the classes can be found there too.

4. Status

A package like this is never finished. Always more classes and/or functionalities can be added. I present it now as it is in the hope it will be usefull and it will generate feedback.

According to Wikipedia -> "Software release life cycle" it is called "Perpetual Beta". It continues to be in a beta-release because new classes and features can be added.

Some of the newer additions will be indicated as having and "Alpha" status and keep that until they ripened somewhat further. The classes are more prone to change in their interfaces, methods etc.

More work needs to be done in:

  • Introduction of more Classes: NeuralNetModel, Filters (maybe) ...

5. Versions

  • 4 Jan 2018 version 0.9.0.
  • Initial upload to github.
  • 26 Jan 2018 version

  • 5 Mar 2018 version 1.0.1

  • Package on pypi.com.
  • Restructured all import statement to comply with PYPI package.
  • 14 Mar 2018 version 1.0.2

    • Added Dynamic Models
    • Added piping of models
  • 23 Mar 2018 version 1.0.3

    • Some issues with ErrorDistributions and map fitting
    • 2-d fitting examples added
    • All examples revisited
    • Links in README.md updated
  • 28 May 2018 version 1.0.4

    • New classes: CircularUniformPrior, PseudoVoigtModel
    • VoigtModel uses scipy.special.wozf() and has partials now,
    • Refactoring Priors to the BaseModel
    • Restructuring Dynamic
    • Threading optional in NestedSampler.
    • New classes: UniformErrorDistribution, FreeShapeModel and kernels/Tophat
    • added to testharnesses and examples
  • 27 June 2018 version 1.0.5

    • New classes: RadialVelocityModel and MixedErrorDistribution
    • testharnesses and examples
    • documentation updates
  • 28 June 2018 version 1.0.6

    • longdescription set to markdown (Still not OK on pypi.org)
  • 28 July 2018 version 1.0.7

    • small compilation error in 1.0.6
  • 11 October 2018 version 1.0.8

    • refactoring the setting of attributes in Models
    • documentation (manual, design, etc.) updated.
  • 28 December 2018 version 2.0.0

    • Introduction of Problem Classes:
      • Problem.
        Base class for problems to be handled by NestedSampler.
      • ClassicProblem.
        Common class for everything that was possible in version 1. ClassicProblem is transparant as all interfaces to NestedSampler have remained the same as they were in version 1.0, even though behind the scenes a ClassicProblem has been invoked.
      • ErrorsInXandYProblem.
        Problem that have errors in the xdata and in the ydata.
      • ... more to come.
    • Introduction of Walker and WalkerList to represent the internal ensemble in NestedSampler.
    • Adaptations in NestedSampler, ErrorDistributions, Engines, Sample, SampleList.
    • Better separation of responsibilities of ErrorDistribution and Problem.
      Consequently ErrorDistribution has a new initialisation, which is incompatible with previous versions. In most cases this has no effect on the calling sequences of NestedSampler.
    • Rename GenGaussErrorDistribution into ExponentialErrorDistribution.
    • New testharnesses and examples.
    • Adaptations of documentation: manual and design.
  • 16 Jan 2019 version 2.1.0

    • MultipleOutputProblem. Problems with more dimensional outputs
    • StellarOrbitModel. A 2 dim output model to calculate the orbit of a double star
    • Keppler2ndLaw. To calculate the radius and true anomaly according to Kepplers 2nd law. (and derivatives)
    • RadialVelocityModel: adapted to Kepplers2ndLaw. A slight change in the order of the parameters.
    • NestedSampler: some improvements in output layout.
    • New tests, examples and updates for documentation.
  • 7 Feb 2019 version 2.2.0

    • ChordEngine. Implementation of the POLYCHORD engine, developed by Handley etal. (2015) MNRAS
    • OrthogonalBasis. Helper class fot ChordEngine.
    • Tests and examples
  • 19 Feb 2019 version 2.2.1

    • AmoebaFitter still mentioned GenGaussErrorDistribution; replaced by ExponentialErrorDistribution
    • Some documentation issues repaired.
  • 20 Jun 2019 version 2.3.0

    • Add LogisticModel and SampleMovie
    • Periodic residuals in Problem
    • Small issues repaired
    • Rerun all examples
    • Pictures moved to documentation/images
    • Some documentation issues repaired.
  • 14 Nov 2019 version 2.4.0 to 2.4.2

    • New Classes:
      • DecisionTreeModel A DecisionTree Model (DTM) is mostly defined on multiple input dimensions (axes). It splits the data in 2 parts, according low and high values on a certain input axis. The splitting can continue along other axes.
      • Modifiable Interface to define modifiable behaviour of some Models.
      • StructureEngine Engine to modify Models that implement Modifiable
    • Introduce Table from astrolib as (multidimensional) xdata
    • Some restructering necessitated by the classes above.
    • Testcases and examples for the classes above
  • 3 Feb 2020 version 2.4.3

    • Clean up and unification of the python doc strings.
    • Reran all examples and test harnasses in python 3.7.
    • Add random seed to several examples to make them more stable.
  • 17 Mar 2020 version 2.4.4

    • Moved BayesicFitting/BayesicFitting/documentation to BayesicFitting/docs
    • Added a references.md file which collects (external) references.
    • Updated the docs files.
    • Handling of weight in accordance with the definition in the Glossary.
    • Add keyword tail= to formatter to display last items of an array.
  • 4 Jun 2020 version 2.5.0

    • Add new models: BasicSplinesModel and SplinesDynamicModel
    • Option for constraints on the likelihood
    • Option for slow engines (working every slow-th iteration in NestedSampler)
    • Restructure growPrior setting
    • Print formatting in NestedSampler
    • Adapt to SplinesDynamicModel
    • Homogenized and improved plotoptions in test harnesses
    • Three more examples added
  • 5 Jun 2020 versions 2.5.1

    • Comment out NeuralNetModel (not yet available) and some typos.
  • 6 Jun 2020 versions 2.5.2

    • Two more bugs smashed (in StartEngine and Prior)
  • 29 Jun 2020 versions 2.5.3

    • Averaging of circular variables
    • Update of static class attributes
    • Attribute and printing issues.
  • 23 Oct 2020 version 2.6.0

    • New class: PhantomSampler; adaptations in Engines, Explorer, WalkerList
    • Restructured NestedSampler to accommodate PhantomSampler
    • Test harnass for PhantomSampler
    • Option: fix parameters in BasicSplinesModel
    • Confusing str method in compound models improved
  • 6 Nov 2020 versions 2.6.1

    • Avoid infinities in unbound Priors
    • mcycles in initialization of MonteCarlo
    • convert xdata, ydata, weights using numpy.asarray
  • 11 Dec 2020 versions 2.6.2

    • Add limits and circular to Priors
    • Finetune Engines
  • 18 Feb 2021 version 2.7.0

    • New class: EvidenceProblem & ModelDistribution; adaptations in NestedSampler and tests.
    • Change in constrain method definition
    • decay in ExpModel
    • some seldom errors, clean-up & new test harnasses.
  • 19 April 2021 version 2.7.1

    • remove CrossEngine completely
  • 20 April 2021 version 2.7.2

    • put some tests on hold
    • few minor issues/errors
  • 29 Oct 2021 version 2.8.0

    • New class: BernoulliErrorDistribution and SoftMaxModel, tests, examples and data
    • Adaptations To BernoulliED in some other classes
    • Multi-dim input and output issues
    • Updated some other tests and examples
    • Documentation and other small issues.
  • 25 Nov 2021 version 2.8.1

    • Cleanup in Plotter
    • Documentation issues; Replaced style.md by code-style.md
    • Correcting error on Windows systme
  • 07 Feb 2022 version 3.0.0

    • New classes: AstropyModel and UserModel
    • New class: NeuralNetUtilities
    • New classes: NestedSolver, OrderProblem, SalesmanProblem, DistanceCostFunction
    • New classes: OrderEngine, MoveEngine, SwitchEngine, LoopEngine, ShuffleEngine
    • New classes: ReverseEngine, NearEngine, StartOrderEngine
    • Make pipe work for more dimensional output | input
    • Test harnesses for the new classes
    • New examples for AstropyModel, UserModel and SalesmanProblem
    • Update existing examples to improve coverage of pytest
    • update Manual
  • 05 Apr 2022 version 3.0.1

    • Addressing issue #18: UserModel does not work for multiple dimensions.
  • 19 Nov 2022 version 3.1.0

    • Gauss2dErrorDistribution: New Class to handle correlated errors in X and Y
    • ErrorDistribution and GaussErrorDistribution : adaptation for covariant errors.
    • Small updates and corrections and removal of unused methods
    • Added / corrected version information and documentation issues
    • Rerun all examples and added tests
  • 18 Jan 2023 version 3.1.0 (still working on the same update)

    • Implementing accuracy in fitters and samplers
    • Update of documentation
    • More tests
  • 18 Jan 2023 version 3.1.1

    • remove GaussPriorNew from init.py
  • 31 Aug 2023 version 3.2.0

    • The new class, PhantomCollection is part of NestedSampler. It contains a sorted WalkerList, in which all valid positions are collected, proper walkers and phantoms. Each iteration the phantoms with log likelihood lower than the low limit for that iteration, are removed. The PhantomCollection is used to get a better estimate on the size of the bounding box for the walkers and to obtain starting positions for new walkers. In general the PhantomCollection contains an order of magnitude more items than the WalkerList itself.
    • NestedSampler has a new stopping criterion. It also stops when the log of the relative contribution to the logZ (evidence) integral is less than -tolerance (=12).
    • FootballModel: new class. Model to estimate strengths of football teams in several key parameters.
    • Address PhantomCollection and add **kwargs in all Engines
    • Quadratic (in stead of linear) interpolation on edge in GalileanEngine
    • Unnormalized Gauss prior changed into a normalized one
    • Some documentation issues
    • More dimensional arrays in LogFactorial
    • str() method in NestedSolver and PhantomSampler
    • Avoid numeric instabilities in sqrt in SampleList
    • New tools in Tools
    • More construction options in WalkerList
    • New example: Uefa2022.ipynb
    • New tests: TestPhantomCollection, TestFootballModel
    • Adaptations in existing tests
    • Reran all tests and examples
  • 20 March 2024 version 3.2.1

    • See above in Whats new





bayesicfitting's People

Contributors

dokester avatar migomueller avatar toddrme2178 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bayesicfitting's Issues

compiling error

Hi Do,

I'm still working on getting everything installed. During installation I'm getting a few python errors:

file: OrderEngine.py, line 98: command is unfinished
file:FrogEngine.py", line 149: indx = []S SyntaxError: invalid syntax

finally I'm getting the following error message during installation:

Searching for python>=3.5
Reading https://pypi.python.org/simple/python/
No local packages or working download links found for python>=3.5
error: Could not find suitable distribution for Requirement.parse('python>=3.5')

However, my python version is 3.6!

lastly, it would be great if the relevant files would be copied to the "site-packages" directory of my python installation. Then you do not need to add anything to the python path.

Again, thanks,
VT

Can't import BayesicFitting: No module named 'BayesicFitting.source.CrossEngine'

import BayesicFitting results in error message

`---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
----> 1 import BayesicFitting

~/anaconda3/envs/miricle.test/lib/python3.8/site-packages/BayesicFitting/init.py in
47 from .source.ConstantModel import ConstantModel
48 from .source.ConvergenceError import ConvergenceError
---> 49 from .source.CrossEngine import CrossEngine
50 from .source.CurveFitter import CurveFitter
51 #from .source.CyclicResults import CyclicResults

ModuleNotFoundError: No module named 'BayesicFitting.source.CrossEngine'`

This is under BayesicFitting 2.7.0 installed via pip

Hardcoded number of cycles for Monte Carlo

The number of cycles for Monte Carlo calculation (file MonteCarlo.py) of the confidence interval is currently hardcoded in the class to 25. Maybe it would be better to have this as an input parameter the user can change, if necessary.

Is a 4 parameter logistic model possible?

Hello! For my research I'm trying to using a Bayesian approach to fit my dataset with a sigmoid model and have had success using your 3-parameter logistic function (LogisticModel()). I'd like to add a parameter to allow for an asymmetric sigmoid by raising the denominator to the power of p_4:

y = p_1 / ( 1 + exp( ( p_2 - x )/p_3 ) )**p_4

Is there a way to alter the 3-parameter LogisticModel() to incorporate this or otherwise create a new model class that has a parameter for asymmetry?

Thank you for you help!

[Feature Request] Correlated errors in X- and Y-

Hello, Do.

I just came across your very nice package and paper, and am still digesting the large amount of material here. In my main field, mass spectrometry, it often happens that we need to fit data with correlated errors in X and Y, such as a 3-isotope plot of X/Z vs. Y/Z, where X, Y, and Z are isotopes of the same element. For linear fits there are simple equations to find the best fit line, as described by York & Evensen (2004) https://doi.org/10.1119/1.1632486, but the situation is more complicated for higher order polynomials, exponentials, and the like.

I looked at your ErrorsInXandYProblem, but it seems that the weights are only defined in the Y-direction. Would you have any thoughts regarding the implementation of a method that accepts X-weights and correlations between X- and Y-uncertainties?

Thank you.

NeuralNetModel not found at package import

I just installed BayesicFitting and tried to import it in my python 3.7 interactive session:

(works) xmmm24: BayesicFitting $ ipython
Python 3.7.4 (default, Aug 13 2019, 15:17:50) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import BayesicFitting                                                                                           
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-389169ef999f> in <module>
----> 1 import BayesicFitting

~/miniconda3/envs/works/lib/python3.7/site-packages/BayesicFitting-2.5.0-py3.7.egg/BayesicFitting/__init__.py in <module>
     96 from .source.MultipleOutputProblem import MultipleOutputProblem
     97 from .source.NestedSampler import NestedSampler
---> 98 from .source.NeuralNetModel import NeuralNetModel
     99 from .source.NoiseScale import NoiseScale
    100 from .source.NonLinearModel import NonLinearModel

ModuleNotFoundError: No module named 'BayesicFitting.source.NeuralNetModel'

In [2]:                                                                                                                 

I cannot find a file called NeuralNetModel in sources, so I had to comment this line in __init__.py and re-install the package again, in order to have it working.

#from .source.NeuralNetModel import NeuralNetModel

Tag style issue with v.3.2.1

Hi,

While refreshing astronomical packages for Guix, I encountered an issue
where the recently applied tag v.3.2.1 does not style others, causing problems
with refreshing the version downstream.

I wondering if it may updated?

Thanks,
Oleg

bspline missing from setup.py

I installed BayesicFitting from pypi in a fresh conda environment (Python=3):
conda create --name bayesPython3 python=3 astropy matplotlib numpy scipy ipython conda activate bayesPython3 pip install BayesicFitting

This leads to a corrupted installation:
` (bayesPython3) michaelm@lin-migo-1:~$ ipython
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import BayesicFitting

ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 import BayesicFitting

~/bin/anaconda2_v5.1/envs/bayesPython3/lib/python3.6/site-packages/BayesicFitting/init.py in ()
27 from .source.AnnealingAmoeba import AnnealingAmoeba
28 from .source.ArctanModel import ArctanModel
---> 29 from .source.BSplinesModel import BSplinesModel
30 from .source.BaseFitter import BaseFitter
31 from .source.BaseModel import BaseModel

~/bin/anaconda2_v5.1/envs/bayesPython3/lib/python3.6/site-packages/BayesicFitting/source/BSplinesModel.py in ()
4 # import (modified) bspline from Juha Jeronen
5 from . import bspline
----> 6 from . import splinelab
7
8 from .LinearModel import LinearModel

~/bin/anaconda2_v5.1/envs/bayesPython3/lib/python3.6/site-packages/BayesicFitting/source/splinelab.py in ()
18 import numpy as np
19
---> 20 import bspline
21
22

ModuleNotFoundError: No module named 'bspline' `

This is an issue with setup.py: the line for bspline is commented out.

Stay tuned for a (pretty trivial) pull request.

Combined model behavior and VoigtModel

Hello,

I'm trying to use BayesicFitting in spectrum analysis. The model contains several (many) Voigt profiles and coded as VoigtModel() + VoigtModel() + .... The model also has one more model of Astropy model type. But it seems that combined model recognize only one VoitModel + Astropy Model. Moreover, I cannot specify parameters for VoigtModel (although in help there's a statement that I can do it via model.setParameters). What am I doing wrong?

Fitter fails with error when using weights

I am trying to fit a polynomial model of order 2 to data with weights. The .fit() fails with the following error:

ValueError: Length of passed values is 3, index implies 189.
The size of each x, y and weights is 189. As far as I can tell, the error is in getHessian() method.

A simple notebook with demonstration of the problem is available here, the data file used in the notebook is here.

Let me know if you have problems accessing the code and the datafile.

UserModel does not work for multiple dimensions

Trying to create a UserModel for two-dimensional xdata causes a problem:

import numpy as np
import BayesicFitting
from BayesicFitting import UserModel, Fitter

def fitfunc(x, p):

    return x[:,0]*p[0] + x[:,1]*p[1] + p[2]

# Make 10 random 2-dimensional points
x = np.random.rand(10,2)

# Make fake data + noise
p = np.array([1,2,3])
cleandata = fitfunc(x, p)
noisedata = cleandata * np.random.normal(1, 0.05, x.shape[0])

# Find model parameters from noisy data
model = UserModel(len(p), fitfunc, ndim=2)
fitter = Fitter(x, model)
param = fitter.fit(noisedata)

Results in

ValueError: Model (1) and xdata (2) must be of the same dimensionality.

Also, checking model.ndim immediately after creation (with ndim=2) shows that ndim=1.

Tests failed :: TypeError: calling <class 'BayesicFitting.source.kernels.Uniform.Uniform'>

Hi,

During packing your project for Guix I faced with this issue in tests:

Traceback (most recent call last):
  File "/tmp/guix-build-python-bayesicfitting-3.0.1.drv-0/BayesicFitting-3.0.1/setup.py", line 9, in <module>
    setup(
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
    self.run_command(cmd)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/dist.py", line 1217, in run_command
    super().run_command(command)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
    cmd_obj.run()
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/command/test.py", line 224, in run
    self.run_tests()
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/command/test.py", line 227, in run_tests
    test = unittest.main(
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/main.py", line 100, in __init__
    self.parseArgs(argv)
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/main.py", line 124, in parseArgs
    self._do_discovery(argv[2:])
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/main.py", line 244, in _do_discovery
    self.createTests(from_discovery=True, Loader=Loader)
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/main.py", line 154, in createTests
    self.test = loader.discover(self.start, self.pattern, self.top)
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 349, in discover
    tests = list(self._find_tests(start_dir, pattern))
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 405, in _find_tests
    tests, should_recurse = self._find_test_path(
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 483, in _find_test_path
    tests = self.loadTestsFromModule(package, pattern=pattern)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/command/test.py", line 57, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 191, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/command/test.py", line 57, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 191, in loadTestsFromName
    return self.loadTestsFromModule(obj)
  File "/gnu/store/7my837qpak6w6vk8ifd99d24kmgjyp61-python-setuptools-64.0.3/lib/python3.9/site-packages/setuptools/command/test.py", line 57, in loadTestsFromModule
    tests.append(self.loadTestsFromName(submodule))
  File "/gnu/store/mhdb6jc5ilr43mxx1zqkbwj5gj7jq6wp-python-3.9.9/lib/python3.9/unittest/loader.py", line 211, in loadTestsFromName
    raise TypeError("calling %s returned %s, not a test" %
TypeError: calling <class 'BayesicFitting.source.kernels.Uniform.Uniform'> returned Uniform: 1 if |x| < 1 else 0, not a test

"from FitPlot import plotFit" in example notebooks

Hi,
I'm getting an error that in some example notebooks the following routine could not be found:

from FitPlot import plotFit

I could find plotFit in source/Plotter.py, however, the keyword "ftr" was missing.
Thank you,
VT

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.