Quantipy / quantipy

Python for people data
MIT License
66 stars 14 forks source link

1426 single classification chi square test as test against total #1368

Closed alexbuchhammer closed 5 months ago

alexbuchhammer commented 6 months ago

This PR introduces a new Test method, chi_square_sc(level=0.05, return_diagnostics=False). It is required to produce the Quantum-like tests against total, that follow a completely different approach than Dimensions (and Askia).

I have modified the respective code in the main test algorithm to combine the new Chi^2-test results with the established output computation. I am doing this by skipping the "regular" test against total results and instead append the Chi^2 ones.

Some notes:

Documentation can be found in our Confluence pages. George can also be consulted for additional testing vs. Quantum deliverables.

Unit tests are passing (skipping Excel ones):

tests\test_banked_chains.py ....                                         [  1%]
tests\test_batch.py ......................                               [  9%]
tests\test_chain.py ...............                                      [ 15%]
tests\test_chain_old.py .....                                            [ 17%]
tests\test_cluster.py .......                                            [ 19%]
tests\test_complex_logic.py ..................................           [ 32%]
tests\test_dataset.py ........................................           [ 47%]
tests\test_io_dimensions.py .                                            [ 48%]
tests\test_link.py ....                                                  [ 49%]
tests\test_logic_views.py .                                              [ 50%]
tests\test_merging.py .......                                            [ 52%]
tests\test_recode.py .                                                   [ 53%]
tests\test_rim.py ...                                                    [ 54%]
tests\test_rules.py ...............                                      [ 59%]
tests\test_stack.py ................................                     [ 71%]
tests\test_view_manager.py .......................                       [ 80%]
tests\test_view_mapper.py ......                                         [ 82%]
tests\test_view_maps.py ....................................             [ 96%]
tests\test_weight_engine.py .......                                      [ 98%]
tests\test_xlsx_formats.py ...        
================= 266 passed, 5 deselected in 434.25 seconds ==================
alexbuchhammer commented 6 months ago

@AndersFreund @LiaStefan This can be reviewed now.