Quick Start¶
Install¶
$ pip3 install lvr
Tutorial¶
How much titanic fares make up for 90 percent of their total?
>>> from lvr import Lvr
>>> from lvr.data import titanic_fares
>>> Lvr(titanic_fares()).summary(effects=0.9)
{'causes': 0.6, 'effects': 0.9, 'entropy_ratio': 0.96, 'pareto': True}
Alike 20 percent of tickets:
>>> Lvr(titanic_fares()).summary(causes=0.2)
{'causes': 0.2, 'effects': 0.6, 'entropy_ratio': 0.96, 'pareto': True}
Overview of relevant cause-effect relations::
>>> Lvr(titanic_fares()).tbl()
{0.01: 0.1,
0.05: 0.3,
0.1: 0.5,
0.15: 0.56,
0.2: 0.66,
0.25: 0.7,
0.3: 0.75,
0.4: 0.8,
0.6: 0.9,
0.77: 0.95,
0.9: 1.0}
Examples¶
count object attribute causes effects entropy ratio 46,038 meteorites mass 0.004 0.5 0.71 8,235 debris mass 0.02 0.6 0.73 51,674 forest fires area 0.015 0.5 0.80 4,189 boxoffice revenue 0.08 0.5 0.91 891 titanic fares price 0.1 0.45 0.96 966 people missing teeth 0.1 0.45 0.92 11,110 womens sex partners 0.1 0.5 0.95