-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds extended configurability of Bootstrapping methods. Updated README.md. Updated test cases.
- Loading branch information
1 parent
991aa8a
commit e516d58
Showing
10 changed files
with
290 additions
and
135 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import unittest | ||
|
||
from unquad.estimator.bootstrap.bootstrap_config import BootstrapConfiguration | ||
|
||
|
||
class TestEvaluationMetrics(unittest.TestCase): | ||
|
||
def test_bootstrap_configuration_with_n_b_m(self): | ||
bc_nbm = BootstrapConfiguration(n=1_000, b=20, m=0.5) | ||
self.assertEqual(bc_nbm._c, 10_000) | ||
|
||
def test_bootstrap_configuration_with_n_b_c(self): | ||
bc_nbc = BootstrapConfiguration(n=1_000, b=20, c=10_000) | ||
self.assertEqual(bc_nbc._m, 0.5) | ||
|
||
def test_bootstrap_configuration_with_n_m_c(self): | ||
bc_nmc = BootstrapConfiguration(n=1_000, m=0.5, c=10_000) | ||
self.assertEqual(bc_nmc.b, 20) | ||
|
||
def test_bootstrap_configuration_with_all(self): | ||
with self.assertRaises(ValueError): | ||
BootstrapConfiguration(n=1_000, b=20, m=0.5, c=10_000) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() |
Oops, something went wrong.