Skip to main content

Tensor of Belief Function

Install the package

pip install TensorBeliefFunction

Example using TensorBeliefFunction (TensorBF)

from TensorBeliefFunction.tensords import TensorMassFunction
TensorMassFunction.SetFrame(['a','b','c'])
tm1 = TensorMassFunction({'a':0.3, 'c':0.2, 'ab':0.2, 'ac':0.3}) 
tm2 = TensorMassFunction({'b':0.2, 'c':0.1, 'ab':0.5, 'abc':0.2}) 
elements = ['a', 'b', 'c', 'd']
m12 = tm1.Combine(tm2)
m12.ConvertToOriginalMassFunction()
print(m12)

Example using TensorBeliefFunction with mask (TensorBF (mask))

from TensorBeliefFunction.tensords_mask import TensorMassFunctionMask
TensorMassFunctionMask.SetFrame(['a','b','c'])
tm1 = TensorMassFunctionMask({'a':0.3, 'c':0.2, 'ab':0.2, 'ac':0.3}) 
tm2 = TensorMassFunctionMask({'b':0.2, 'c':0.1, 'ab':0.5, 'abc':0.2}) 
elements = ['a', 'b', 'c', 'd']
m12 = tm1.Combine(tm2)
m12.ConvertToOriginalMassFunction()
print(m12)

Example using TensorBeliefFunction with sparse mask (TensorBF (mask_csc))

from TensorBeliefFunction.tensords_mask_csc import TensorMassFunctionMask_CSC
TensorMassFunctionMask_CSC.SetFrame(['a','b','c'])
tm1 = TensorMassFunctionMask_CSC({'a':0.3, 'c':0.2, 'ab':0.2, 'ac':0.3}) 
tm2 = TensorMassFunctionMask_CSC({'b':0.2, 'c':0.1, 'ab':0.5, 'abc':0.2}) 
elements = ['a', 'b', 'c', 'd']
m12 = tm1.Combine(tm2)
m12.ConvertToOriginalMassFunction()
print(m12)

Example using TensorBeliefFunction with sparse vector (TensorBF (csc))

from TensorBeliefFunction.tensords_csc import TensorMassFunction_CSC
TensorMassFunction_CSC.SetFrame(['a','b','c'])
tm1 = TensorMassFunction_CSC({'a':0.3, 'c':0.2, 'ab':0.2, 'ac':0.3}) 
tm2 = TensorMassFunction_CSC({'b':0.2, 'c':0.1, 'ab':0.5, 'abc':0.2}) 
elements = ['a', 'b', 'c', 'd']
m12 = tm1.Combine(tm2)
m12.ConvertToOriginalMassFunction()
print(m12)

Example using TensorBeliefFunction with csc wise (TensorBF (csc_wise))

from TensorBeliefFunction.tensords_csc_wise import TensorMassFunction_CSC_Wise
TensorMassFunction_CSC_Wise.SetFrame(['a','b','c'])
tm1 = TensorMassFunction_CSC_Wise({'a':0.3, 'c':0.2, 'ab':0.2, 'ac':0.3}) 
tm2 = TensorMassFunction_CSC_Wise({'b':0.2, 'c':0.1, 'ab':0.5, 'abc':0.2}) 
elements = ['a', 'b', 'c', 'd']
m12 = tm1.Combine(tm2)
m12.ConvertToOriginalMassFunction()
print(m12)

Metadata

Release files for TensorBeliefFunction 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for TensorBeliefFunction 0.0.8
File Size Uploaded
tensorbelieffunction-0.0.8.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for TensorBeliefFunction 0.0.8
File Interpreter ABI Platform
tensorbelieffunction-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 22.6 kB

Release files / tensorbelieffunction-0.0.8.tar.gz

Download URL tensorbelieffunction-0.0.8.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5788c69791611c698c3c4dc4ea27c385f414b013dff46bcc967cfa3a0ec14512
BLAKE2b-256 checksum
How to use checksums
1923e63ec31c7454c74591a123c25e842d63b7a9c0ec6d50b4d8e07727c4158b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / tensorbelieffunction-0.0.8-py3-none-any.whl

Download URL tensorbelieffunction-0.0.8-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
06f42ee713261de87abcbcbfbad20163fdc08516ed05f44a035be7e12ba1bb34
BLAKE2b-256 checksum
How to use checksums
020b04e5af281d067d018cde31e514831d6a6d4d27c4e0619a04af70c126b081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.4

2 release files

0.0.2

3 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page