Skip to main content

Tensor of Belief Function

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tensorbelieffunction-0.0.8.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tensorbelieffunction-0.0.8-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file tensorbelieffunction-0.0.8.tar.gz.

File metadata

  • Download URL: tensorbelieffunction-0.0.8.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for tensorbelieffunction-0.0.8.tar.gz
Algorithm Hash digest
SHA256 5788c69791611c698c3c4dc4ea27c385f414b013dff46bcc967cfa3a0ec14512
MD5 a1eaefaa75344169298eac917834012a
BLAKE2b-256 1923e63ec31c7454c74591a123c25e842d63b7a9c0ec6d50b4d8e07727c4158b

See more details on using hashes here.

File details

Details for the file tensorbelieffunction-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for tensorbelieffunction-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 06f42ee713261de87abcbcbfbad20163fdc08516ed05f44a035be7e12ba1bb34
MD5 efb1355f162d651b4a2d32e2b0ffcd6f
BLAKE2b-256 020b04e5af281d067d018cde31e514831d6a6d4d27c4e0619a04af70c126b081

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page