reineking / pyds Goto Github PK
View Code? Open in Web Editor NEWA Python library for performing calculations in the Dempster-Shafer theory of evidence.
License: BSD 3-Clause "New" or "Revised" License
A Python library for performing calculations in the Dempster-Shafer theory of evidence.
License: BSD 3-Clause "New" or "Revised" License
The latest version from PIP does not seem to work with the default Python version (2.7.10) on MacOS Sierra:
macmini:~ troeger$ python
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyds
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/pyds.py", line 85
class Statements(object, metaclass = abc.ABCMeta):
^
SyntaxError: invalid syntax
>>>
Works for a Python 3.5.2 installation on the same machine:
macmini:~ troeger$ python3
Python 3.5.2 (default, Nov 21 2016, 09:59:04)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyds
>>>
Could you please tell me how to stop the MassFunction to arrange the output from big to small
Hi,
I am new to python. I am using scikit learn for classification purpose. I want to fuse the results of multi classifiers (DT, RF, NB) using dumpster safer theory.
However i could not understand the usage of the package by looking at example.py.
Need help in same
Hi @reineking, thanks for this lib!
I'm trying to create a conda package for it at @conda-forge, but there is a missing requirement: the latest package from PyPI (py_dempster_shafer-0.7.tar.gz
) is missing a license file (LICENSE
or LICENSE.txt
). It's also missing license information in the PKG-INFO (it's currently License: UNKNOWN
).
I've noticed that the test files are also missing. It's not really necessary, but it would be nice to have the test files in the PyPI package, so it could be tested during package creation.
Hi, I am passing a dictionary to Massfunction (constructor), and that works fine. However, when I want to construct a Massfunction via from_bel(dict) or from_pl(dict) that does not work. Please see the errors described below:
File "C:\PortableGit\REPO\science\Python\py_dempster_shafer-0.7\pyds.py", line 117, in
v = fsum([bel[h2] * (-1)**(len(h1 - h2)) for h2 in powerset(h1)])
KeyError: frozenset()
AND:
File "C:\PortableGit\REPO\science\Python\py_dempster_shafer-0.7\pyds.py", line 134, in
bel = {frozenset(frame - h):bel_theta - v for (h, v) in pl.items()} # follows from bel(-A) = bel(frame) - pl(A)
TypeError: unsupported operand type(s) for -: 'str' and 'str'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.