-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a base class for the two-level model #84
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ik heb een bescrijving (zo goed mogelijk) van het two-level-model toegevoegd. |
wowtor
added a commit
that referenced
this pull request
Oct 25, 2023
commit 1b659b6 Author: wb <20113294+wowtor@users.noreply.github.com> Date: Wed Oct 25 15:36:06 2023 +0200 static methods commit 4ae11b2 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Oct 19 15:40:36 2023 +0200 corrected path definitions commit 210b879 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Oct 19 15:18:56 2023 +0200 changed datadirectory from data to recources commit a14ad9a Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Oct 19 14:57:40 2023 +0200 removed redundant 'dummmy' file and added pandas to setup.py commit 203317f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Oct 19 14:52:21 2023 +0200 bugfix: in predict_proba changed return array.reshape to np.transpose (array) commit 0c71c5f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Oct 17 12:17:47 2023 +0200 some cosmetics commit 71926bf Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Oct 17 09:13:00 2023 +0200 fixed bug in predict_proba commit dca5bd7 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Oct 16 16:55:48 2023 +0200 added some more comments commit 80bff2e Merge: e42990e 4423990 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Oct 16 16:16:46 2023 +0200 Merge branch 'TLM' of https://github.com/NetherlandsForensicInstitute/lir into TLM commit 4423990 Merge: 65bd6e4 fcafeb7 Author: vergep <65766436+vergep@users.noreply.github.com> Date: Sun Oct 15 15:45:39 2023 +0200 Merge pull request #93 from NetherlandsForensicInstitute/remove_devPAV_bug Remove dev pav bug commit e42990e Merge: e617afb fcafeb7 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Sun Oct 15 15:28:23 2023 +0200 Merge branch 'remove_devPAV_bug' into TLM commit fcafeb7 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Sun Oct 15 15:26:19 2023 +0200 fixed bug in detection of pathological cases in devPAV - made new detection of pathological cases - created output for pathological cases - adjusted tests commit 65bd6e4 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Mon Oct 9 15:04:31 2023 +0200 Removed ValueError for difference in shapes of references and traces. commit 8cd06bc Merge: e617afb c423bfe Author: vergep <65766436+vergep@users.noreply.github.com> Date: Mon Oct 9 13:17:28 2023 +0200 Merge pull request #91 from NetherlandsForensicInstitute/predict_log10_LR TwoLevelModelNormalKDE class and functions ready for review commit c423bfe Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Oct 5 13:47:14 2023 +0200 predict-lr takes multiple samples commit f2df21d Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Oct 5 10:42:26 2023 +0200 clean tests commit 8fd4837 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Fri Sep 29 15:44:26 2023 +0200 changed TwoLevelModel to TwoLevelModelNormalKDE and fixed minor bug in fit function commit f64d508 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Fri Sep 29 15:28:14 2023 +0200 added check that n_features is the same in train, trace and ref commit 7169922 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Fri Sep 29 14:58:17 2023 +0200 added tests for fit&_predict_LLR, fit&transform and fit&predict_proba commit 7bc2f50 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Fri Sep 29 11:43:08 2023 +0200 Added script for ln_den_terms to class and test Added script for calculation of log10 LRs according to formula in Bolck et al and test commit 7b1aacc Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 28 17:36:36 2023 +0200 Made old code working again for debugging new code. Added script for ln_num1 to class and test commit 464a98e Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 28 16:58:39 2023 +0200 added code and tests for updated_ref_mean (mu_h) commit 57ee3bd Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Thu Sep 28 14:24:20 2023 +0200 Renamed the U variables and added some clearer explanation in the docstring. And fixed some minor issues. commit 8daed0b Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 17:29:38 2023 +0200 added class Test_TwoLevelModel_predict_functions and performed first test commit 2b37823 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 16:53:56 2023 +0200 changed names of TLM folder to 'two_level_model' commit 329cb96 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 16:53:09 2023 +0200 changed names of TLM folder to 'two_level_model' commit 6a3240e Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 16:50:13 2023 +0200 changed names of data folder to 'resources' and changed names of input data commit aac38d6 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 16:47:38 2023 +0200 added between_cov to two_level_model and test commit 7335ff3 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 16:18:44 2023 +0200 Added the H0 (between covariance) calculations to the tlm class and test. Not yet functional. commit 191230f Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 15:51:13 2023 +0200 Included calculations for kernel bandwidth in the tlm class and test. commit 9bbae92 Merge: dd04940 1aca264 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 15:32:07 2023 +0200 merged main TLM branch into this predict_log10_LR branch. commit 1aca264 Merge: 14dbc2c 6f6517d Author: camillevandijk <144999965+camillevandijk@users.noreply.github.com> Date: Tue Sep 26 15:23:35 2023 +0200 Merge pull request #80 from NetherlandsForensicInstitute/means_z added code for calculation and test of means_z and implemented the comments. commit 6f6517d Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 15:21:09 2023 +0200 Removed redundant files commit c3f1c27 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 15:19:45 2023 +0200 Added the means function to the tlm class and updated the test accordingly. commit 96fa48c Merge: 6a29a8c 14dbc2c Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 15:03:16 2023 +0200 Merged TLM branch into means_z branch. commit 14dbc2c Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 11:58:54 2023 +0200 Incorporated the mean_covariance_within function and the test in the TLM class. Removed previous files. commit 84c6102 Merge: d3b5fd0 e617afb Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 11:33:36 2023 +0200 Merge branch 'TLM' into MSwithin commit d3b5fd0 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 11:31:40 2023 +0200 added testdata in Routput folder commit 992f88e Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 26 11:30:43 2023 +0200 Resolved some comments, added comments, made it more generic and changed function name. commit 53c4a0f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 10:56:44 2023 +0200 added testdata in input folder commit 5316a0f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 10:25:01 2023 +0200 refined some comments commit e617afb Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 09:45:05 2023 +0200 refined some comments commit caeb251 Merge: bd09fdd b74bafd Author: vergep <65766436+vergep@users.noreply.github.com> Date: Tue Sep 26 09:38:44 2023 +0200 Merge pull request #84 from NetherlandsForensicInstitute/feature/tlm_base_class Create a base class for the two-level model commit b74bafd Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 26 09:37:39 2023 +0200 added predict_proba commit dd04940 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:54:11 2023 +0200 added line break commit 76ac4d5 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:53:29 2023 +0200 added some more comments in TLM_calc_log_10_LR commit 6eee46a Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:49:24 2023 +0200 revised some lines in TLM_calc_ln_den_term commit 7a8bece Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:47:49 2023 +0200 minor change in comment commit 6bffdbe Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:47:21 2023 +0200 changed some divisions to additions through log in TLM_calc_log10_LR. And added some more comments commit 95f70e2 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:46:00 2023 +0200 changed some divisions to additions through log commit ce5b0ab Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:39:02 2023 +0200 updated some comments commit 1b5258c Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:37:27 2023 +0200 updated some comments and run.py commit 44c76b9 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:33:33 2023 +0200 made predict LLR function and test for all pairs commit a838c8b Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 15:05:06 2023 +0200 caculated and tested first log10_LR comparison, and removed redundant split of two denominator terms since algebra for the two terms is identical commit 7c88e96 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 14:38:22 2023 +0200 added calculation and test for natural log of right denominator term of LR in Bolck et al. (natural log of den in R script) commit 8ae5206 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 14:31:43 2023 +0200 added calculation and test for natural log of left denominator term of LR in Bolck et al. (natural log of num2 in R script) commit bc3c3f4 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 14:25:09 2023 +0200 added calculation and test for natural log of numerator of LR in Bolck et al. (natural log of num1 in R script) commit 2fafb14 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 12:54:45 2023 +0200 added calculation of mu_h and test commit b3a60f1 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 12:53:49 2023 +0200 added calculation of mu_h commit 7bdd07d Merge: 66f3918 ef05093 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 10:37:10 2023 +0200 Merge branch 'predict_U' of https://github.com/NetherlandsForensicInstitute/lir into predict_U commit e3d9f94 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 09:08:39 2023 +0200 added a model description commit 66f3918 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 25 08:49:35 2023 +0200 changed some comment commit d981210 Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Sep 21 15:36:03 2023 +0200 fix test commit d650016 Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Sep 21 15:30:12 2023 +0200 remove sklearn inheritance and replace predict_proba by transform commit 77f9e4c Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Sep 21 13:51:53 2023 +0200 add basic properties commit a2cb3be Author: Kim de Bie (DBS) <kim@7zj9vz2-l.holmes.nl> Date: Thu Sep 21 09:51:44 2023 +0200 create branch commit ef05093 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Wed Sep 20 14:21:34 2023 +0200 Update comments commit a8dbec4 Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Wed Sep 20 14:14:08 2023 +0200 Add calculations and test for U_hn. Plus transformed T0 to numpy instead of pandas for consistency. commit 6052cdf Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Wed Sep 20 12:21:11 2023 +0200 Added tests for U_h0 and U_hx. commit 6810345 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 17:10:49 2023 +0200 added intermediate 'predict' results from R commit e8ebed5 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 16:54:48 2023 +0200 calculation of U_h0 and U_hx commit aa0401e Author: Camille van Dijk <c.van.dijk@nfi.nl> Date: Tue Sep 19 15:50:52 2023 +0200 Set up of calculations of U0 and UU for the predict part. commit 4168c5f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 15:47:14 2023 +0200 input data en R-output data added to git commit 21e0498 Merge: 8d3a11f 7064b1b Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 14:13:05 2023 +0200 Merge branch 'h' into T0 # Conflicts: # lir/classifiers.py # tests/run.py # tests/test_TLM.py commit 8d3a11f Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 13:56:55 2023 +0200 script and test for T0 commit 7064b1b Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 10:00:46 2023 +0200 added some comments commit 33cabd9 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Tue Sep 19 09:58:17 2023 +0200 script and test for h^2 calculation commit 9cd21bd Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 17:00:31 2023 +0200 work in progress to write function for T0 commit b17b482 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 15:44:06 2023 +0200 added some comments commit 1f826aa Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 15:41:09 2023 +0200 code and test for kappa commit 6a29a8c Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 13:50:39 2023 +0200 removed 'z' from calc_means_z commit f956225 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 13:49:57 2023 +0200 changed names of columns of covars df to more generic names commit a2ea89c Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 13:43:45 2023 +0200 added code for calculation and test of means_z commit 5725935 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Mon Sep 18 13:34:37 2023 +0200 removed some unused code in test_TLM.py commit 9deb3ed Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Fri Sep 15 16:07:33 2023 +0200 1. Creation of run.py, which contains main script used for debugging. 2. Script that calculates MSWithin + test script. commit 37c7416 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 14 15:48:24 2023 +0200 test geschreven voor MSwithin commit bd09fdd Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 14 10:08:31 2023 +0200 werkt dit? commit 6ea6a44 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 14 10:04:34 2023 +0200 nieuwe test commit 0f2d543 Author: Peter Vergeer <p.vergeer@nfi.nl> Date: Thu Sep 14 10:02:59 2023 +0200 dummy file to initialize TLM branch
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Base class structure/outline for the two-level model.