artefactory / choice-learn

Discrete choice modeling in Python with large datasets & models - Assortment & Pricing Optimization .
https://artefactory.github.io/choice-learn
MIT License
32 stars 3 forks source link

[THREAD] Additional tests to be developed #101

Open VincentAuriau opened 3 months ago

VincentAuriau commented 1 month ago

131 : Add basic tests for Baseline Models

133: Add some more tests for Baseline Models

137: Add test for softmax with exit choice

148: Add tests for Indexers and ChoiceDataset from DF

149: Add Storage & ChoiceDataset tests

github-actions[bot] commented 1 month ago

Coverage

Coverage Report for Python 3.9
FileStmtsMissCoverMissing
choice_learn
   __init__.py20100% 
   tf_ops.py480100% 
choice_learn/data
   __init__.py30100% 
   choice_dataset.py6383395%108–112, 198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 942, 1127, 1146–1148, 1161–1163, 1191, 1196, 1205, 1222, 1263, 1275, 1289, 1328, 1343, 1348, 1377, 1390, 1425–1426
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   __init__.py40100% 
   base.py34320241%39–40, 62–69, 91–97, 119, 186, 192–221, 226–295, 310–359, 374–406, 415–482, 567–579, 582–585, 588, 595–606, 610–623, 632–658, 666, 672, 739, 826, 871, 920, 1005
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/datasets/data
   __init__.py00100% 
choice_learn/models
   __init__.py12283%13–14
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   baseline_models.py490100% 
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   __init__.py00100% 
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2362360%3–675
   or_tools_opt.py2262260%3–666
TOTAL3797207345% 

Tests Skipped Failures Errors Time
73 0 :zzz: 0 :x: 0 :fire: 45.356s :stopwatch:
github-actions[bot] commented 1 month ago

Coverage

Coverage Report for Python 3.10
FileStmtsMissCoverMissing
choice_learn
   __init__.py20100% 
   tf_ops.py480100% 
choice_learn/data
   __init__.py30100% 
   choice_dataset.py6383395%108–112, 198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 942, 1127, 1146–1148, 1161–1163, 1191, 1196, 1205, 1222, 1263, 1275, 1289, 1328, 1343, 1348, 1377, 1390, 1425–1426
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   __init__.py40100% 
   base.py34320141%37, 62–69, 91–97, 119, 186, 192–221, 226–295, 310–359, 374–406, 415–482, 567–579, 582–585, 588, 595–606, 610–623, 632–658, 666, 672, 739, 826, 871, 920, 1005
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/datasets/data
   __init__.py00100% 
choice_learn/models
   __init__.py12283%13–14
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   baseline_models.py490100% 
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   __init__.py00100% 
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3799207445% 

Tests Skipped Failures Errors Time
73 0 :zzz: 0 :x: 0 :fire: 47.182s :stopwatch:
github-actions[bot] commented 1 month ago

Coverage

Coverage Report for Python 3.11
FileStmtsMissCoverMissing
choice_learn
   __init__.py20100% 
   tf_ops.py480100% 
choice_learn/data
   __init__.py30100% 
   choice_dataset.py6383395%108–112, 198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 942, 1127, 1146–1148, 1161–1163, 1191, 1196, 1205, 1222, 1263, 1275, 1289, 1328, 1343, 1348, 1377, 1390, 1425–1426
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   __init__.py40100% 
   base.py34320141%37, 62–69, 91–97, 119, 186, 192–221, 226–295, 310–359, 374–406, 415–482, 567–579, 582–585, 588, 595–606, 610–623, 632–658, 666, 672, 739, 826, 871, 920, 1005
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/datasets/data
   __init__.py00100% 
choice_learn/models
   __init__.py12283%13–14
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   baseline_models.py490100% 
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   __init__.py00100% 
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3799207445% 

Tests Skipped Failures Errors Time
73 0 :zzz: 0 :x: 0 :fire: 47.141s :stopwatch:
github-actions[bot] commented 1 month ago

Coverage

Coverage Report for Python 3.12
FileStmtsMissCoverMissing
choice_learn
   __init__.py20100% 
   tf_ops.py480100% 
choice_learn/data
   __init__.py30100% 
   choice_dataset.py6383395%108–112, 198, 250, 283, 421, 463–464, 589, 724, 738, 840, 842, 942, 1127, 1146–1148, 1161–1163, 1191, 1196, 1205, 1222, 1263, 1275, 1289, 1328, 1343, 1348, 1377, 1390, 1425–1426
   indexer.py2372291%20, 31, 45, 60–67, 202–204, 219–230, 265, 291
   storage.py161696%22, 33, 51, 56, 61, 71
   store.py72720%3–275
choice_learn/datasets
   __init__.py40100% 
   base.py34320141%37, 62–69, 91–97, 119, 186, 192–221, 226–295, 310–359, 374–406, 415–482, 567–579, 582–585, 588, 595–606, 610–623, 632–658, 666, 672, 739, 826, 871, 920, 1005
   expedia.py1029210%27–301
   tafeng.py49198%50
choice_learn/datasets/data
   __init__.py00100% 
choice_learn/models
   __init__.py12283%13–14
   base_model.py24310656%92, 97–98, 105–123, 135, 177, 213–241, 274, 292–333, 340, 369, 383, 388, 396–424, 429–430, 475–508, 518–526, 544–559, 625–626, 628–633, 681–683, 705–727, 782, 784–787
   baseline_models.py490100% 
   conditional_logit.py23513742%45, 48, 50, 81, 84, 87–91, 94–98, 132, 135, 175–178, 297, 334, 391, 438–576, 593–598, 625–634, 650–671, 696–720, 724–747
   latent_class_base_model.py2802800%3–930
   latent_class_mnl.py60600%3–302
   nested_logit.py29126310%54–82, 124–162, 188, 220, 229–236, 251–274, 284–317, 322, 332–353, 363–364, 398–547, 586–628, 664–707, 724–729, 756–765, 781–802, 827–874, 883–909
   rumnet.py24516035%171–175, 186–218, 235–243, 268–272, 285–317, 334–341, 364–368, 381–417, 432–442, 532, 534, 561–567, 604, 639–683, 722–766, 807–834, 888–940, 970–988, 993, 1032–1086, 1125–1169, 1207–1234
   simple_mnl.py1409234%75–81, 92–98, 139–177, 204, 238, 255–276, 301–325, 329–357
   tastenet.py945640%15, 64, 90–104, 140–142, 177–207, 223, 238–254, 273–289
choice_learn/toolbox
   __init__.py00100% 
   assortment_optimizer.py27270%4–180
   gurobi_opt.py2382380%3–675
   or_tools_opt.py2262260%3–666
TOTAL3799207445% 

Tests Skipped Failures Errors Time
73 0 :zzz: 0 :x: 0 :fire: 1m 6s :stopwatch: