Tests Documentation

This page contains the Tests Package documentation.

The test_convert Module

Tests for cmpy.infotheory.convert

cmpy.infotheory.tests.test_convert.test_validate_and_convert()

The test_conditional_distributions Module

Tests for the conditional distributions module.

cmpy.infotheory.tests.test_conditional_distributions.create_symbolic_coins()
cmpy.infotheory.tests.test_conditional_distributions.create_unbiased_coins()
cmpy.infotheory.tests.test_conditional_distributions.create_unbiased_log_coins()
cmpy.infotheory.tests.test_conditional_distributions.test_array()
cmpy.infotheory.tests.test_conditional_distributions.test_log_array()
cmpy.infotheory.tests.test_conditional_distributions.test_sym_array(*args, **kwargs)

The test_events Module

Tests for the events module.

class cmpy.infotheory.tests.test_events.TestBaseEvent

Bases: object

Methods

setUp()
test_copy()
test_equal1()
test_equal2()
test_equal3()
test_equal4()
test_equiv1()
test_gt()
test_gteq()
test_hash()
test_iter()
test_iter1()
test_lt()
test_lteq()
test_notequal()
test_pretty2()
test_raw()
test_repr()
test_str()
test_unmask()
baseevent1 = '0123456789'
baseevent2 = '01234'
baseevent3 = '43210'
setUp()
test_copy()
test_equal1()
test_equal2()
test_equal3()
test_equal4()
test_equiv1()
test_gt()
test_gteq()
test_hash()
test_iter()
test_iter1()
test_lt()
test_lteq()
test_notequal()
test_pretty2()
test_raw()
test_repr()
test_str()
test_unmask()
class cmpy.infotheory.tests.test_events.TestEvent

Bases: cmpy.infotheory.tests.test_events.TestBaseEvent

Methods

setUp()
test_copy()
test_equal1()
test_equal2()
test_equal3()
test_equal4()
test_equiv1()
test_gt()
test_gteq()
test_hash()
test_invertmask()
test_iter()
test_iter1()
test_len1()
test_lt()
test_lteq()
test_maskclean1()
test_notequal()
test_pretty()
test_pretty2()
test_raw()
test_reduced()
test_repr()
test_str()
test_unmask()
test_invertmask()
test_len1()
test_maskclean1()
test_pretty()
test_reduced()
class cmpy.infotheory.tests.test_events.TestJointEvent

Bases: cmpy.infotheory.tests.test_events.TestBaseEvent

Methods

setUp()
test_copy()
test_equal1()
test_equal2()
test_equal3()
test_equal4()
test_equiv1()
test_equiv2()
test_gt()
test_gteq()
test_hash()
test_init_with_ints()
test_init_with_mask1()
test_init_with_mask2()
test_init_with_mask3()
test_init_with_mask4()
test_init_with_wc()
test_invertmask()
test_iter()
test_iter1()
test_iter2()
test_len1()
test_lt()
test_lteq()
test_maskclean1()
test_nojoint()
test_notequal()
test_pretty()
test_pretty2()
test_raw()
test_reduced()
test_reindex1()
test_reindex2()
test_reindex3()
test_repr()
test_str()
test_unmask()
test_equiv2()
test_init_with_ints()
test_init_with_mask1()
test_init_with_mask2()
test_init_with_mask3()
test_init_with_mask4()
test_init_with_wc()
test_invertmask()
test_iter2()
test_len1()
test_maskclean1()
test_nojoint()
test_pretty()
test_reduced()
test_reindex1()
test_reindex2()
test_reindex3()

The test_distributions Module

Tests for the distributions module.

class cmpy.infotheory.tests.test_distributions.TestSymbolic

Bases: object

Methods

setupClass()
test_symbolic_conditional_first()
test_symbolic_conditional_first_clean()
test_symbolic_conditional_second()
test_symbolic_conditional_second_clean()
test_symbolic_conditional_third()
test_symbolic_conditional_third_clean()
test_symbolic_conditional_two_first()
test_symbolic_conditional_two_first_clean()
test_symbolic_conditional_two_second()
test_symbolic_conditional_two_second_clean()
test_symbolic_conditional_two_third()
test_symbolic_conditional_two_third_clean()
test_symbolic_marginal_first()
test_symbolic_marginal_first_clean()
test_symbolic_marginal_second()
test_symbolic_marginal_second_clean()
test_symbolic_marginal_third()
test_symbolic_marginal_third_clean()
test_symbolic_marginal_two_first()
test_symbolic_marginal_two_first_clean()
test_symbolic_marginal_two_second()
test_symbolic_marginal_two_second_clean()
test_symbolic_marginal_two_third()
test_symbolic_marginal_two_third_clean()
test_symbolic_to_dist()
test_symbolic_to_logdist()
classmethod setupClass()
test_symbolic_conditional_first()
test_symbolic_conditional_first_clean()
test_symbolic_conditional_second()
test_symbolic_conditional_second_clean()
test_symbolic_conditional_third()
test_symbolic_conditional_third_clean()
test_symbolic_conditional_two_first()
test_symbolic_conditional_two_first_clean()
test_symbolic_conditional_two_second()
test_symbolic_conditional_two_second_clean()
test_symbolic_conditional_two_third()
test_symbolic_conditional_two_third_clean()
test_symbolic_marginal_first()
test_symbolic_marginal_first_clean()
test_symbolic_marginal_second()
test_symbolic_marginal_second_clean()
test_symbolic_marginal_third()
test_symbolic_marginal_third_clean()
test_symbolic_marginal_two_first()
test_symbolic_marginal_two_first_clean()
test_symbolic_marginal_two_second()
test_symbolic_marginal_two_second_clean()
test_symbolic_marginal_two_third()
test_symbolic_marginal_two_third_clean()
test_symbolic_to_dist()
test_symbolic_to_logdist()
cmpy.infotheory.tests.test_distributions.check_getitem(dist, event, prob)
cmpy.infotheory.tests.test_distributions.create_biased_coins()
cmpy.infotheory.tests.test_distributions.create_biased_log_coins()
cmpy.infotheory.tests.test_distributions.create_integer_coins()
cmpy.infotheory.tests.test_distributions.create_symbolic_coins()
cmpy.infotheory.tests.test_distributions.create_unbiased_coins()
cmpy.infotheory.tests.test_distributions.create_unbiased_log_coins()
cmpy.infotheory.tests.test_distributions.test_array()
cmpy.infotheory.tests.test_distributions.test_coalesce_two()
cmpy.infotheory.tests.test_distributions.test_coalesce_twotwo()
cmpy.infotheory.tests.test_distributions.test_conditioning_first()
cmpy.infotheory.tests.test_distributions.test_conditioning_first_clean()
cmpy.infotheory.tests.test_distributions.test_conditioning_second()
cmpy.infotheory.tests.test_distributions.test_conditioning_second_clean()
cmpy.infotheory.tests.test_distributions.test_conditioning_third()
cmpy.infotheory.tests.test_distributions.test_conditioning_third_clean()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_first()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_first_clean()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_second()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_second_clean()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_third()
cmpy.infotheory.tests.test_distributions.test_conditioning_two_third_clean()
cmpy.infotheory.tests.test_distributions.test_delitem()
cmpy.infotheory.tests.test_distributions.test_fromlogs()
cmpy.infotheory.tests.test_distributions.test_getitems()
cmpy.infotheory.tests.test_distributions.test_init()
cmpy.infotheory.tests.test_distributions.test_init_nojoint()
cmpy.infotheory.tests.test_distributions.test_marginal_first()
cmpy.infotheory.tests.test_distributions.test_marginal_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_first()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_second()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_third()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_third_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_first()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_second()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_third()
cmpy.infotheory.tests.test_distributions.test_marginal_from_event_two_third_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_second()
cmpy.infotheory.tests.test_distributions.test_marginal_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_third()
cmpy.infotheory.tests.test_distributions.test_marginal_third_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_two_first()
cmpy.infotheory.tests.test_distributions.test_marginal_two_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_two_second()
cmpy.infotheory.tests.test_distributions.test_marginal_two_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginal_two_third()
cmpy.infotheory.tests.test_distributions.test_marginal_two_third_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_first()
cmpy.infotheory.tests.test_distributions.test_marginalize_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_second()
cmpy.infotheory.tests.test_distributions.test_marginalize_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_third()
cmpy.infotheory.tests.test_distributions.test_marginalize_third_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_first()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_first_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_second()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_second_clean()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_third()
cmpy.infotheory.tests.test_distributions.test_marginalize_two_third_clean()
cmpy.infotheory.tests.test_distributions.test_nonjoint()
cmpy.infotheory.tests.test_distributions.test_normalize()
cmpy.infotheory.tests.test_distributions.test_setitem()
cmpy.infotheory.tests.test_distributions.test_tologs()
cmpy.infotheory.tests.test_distributions.test_validate()
cmpy.infotheory.tests.test_distributions.test_validate_fail()
cmpy.infotheory.tests.test_distributions.test_validate_generalized_distribution()
cmpy.infotheory.tests.test_distributions.test_validate_log()
cmpy.infotheory.tests.test_distributions.test_validate_log_fail()
cmpy.infotheory.tests.test_distributions.test_validate_non_probs()

The test_memory Module

Tests for memory objects.

The test_dists_infotheory Module

Tests for the information theoretic methods of distributions module.

cmpy.infotheory.tests.test_dists_infotheory.create_biased_coins()
cmpy.infotheory.tests.test_dists_infotheory.create_biased_log_coins()
cmpy.infotheory.tests.test_dists_infotheory.create_even_words()
cmpy.infotheory.tests.test_dists_infotheory.create_gm_words()
cmpy.infotheory.tests.test_dists_infotheory.create_iid_words()
cmpy.infotheory.tests.test_dists_infotheory.create_symbolic_coins()
cmpy.infotheory.tests.test_dists_infotheory.create_symbolic_correlated_coins()
cmpy.infotheory.tests.test_dists_infotheory.create_unbiased_coins()
cmpy.infotheory.tests.test_dists_infotheory.create_unbiased_log_coins()
cmpy.infotheory.tests.test_dists_infotheory.test_coinformation()
cmpy.infotheory.tests.test_dists_infotheory.test_conditional_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_conditional_entropy_log()
cmpy.infotheory.tests.test_dists_infotheory.test_conditional_entropy_symbolic(*args, **kwargs)
cmpy.infotheory.tests.test_dists_infotheory.test_cross_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_cross_entropy_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_cross_entropy_infs()
cmpy.infotheory.tests.test_dists_infotheory.test_cross_entropy_log()
cmpy.infotheory.tests.test_dists_infotheory.test_cross_entropy_symbolic(*args, **kwargs)
cmpy.infotheory.tests.test_dists_infotheory.test_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_interaction_information()
cmpy.infotheory.tests.test_dists_infotheory.test_log_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_mutual_information_nonzero()
cmpy.infotheory.tests.test_dists_infotheory.test_mutual_information_symmetry()
cmpy.infotheory.tests.test_dists_infotheory.test_mutual_information_zero()
cmpy.infotheory.tests.test_dists_infotheory.test_perplexity()
cmpy.infotheory.tests.test_dists_infotheory.test_perplexity_log()
cmpy.infotheory.tests.test_dists_infotheory.test_perplexity_symbolic(*args, **kwargs)
cmpy.infotheory.tests.test_dists_infotheory.test_relative_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_relative_entropy_infs()
cmpy.infotheory.tests.test_dists_infotheory.test_relative_entropy_log()
cmpy.infotheory.tests.test_dists_infotheory.test_relative_entropy_symbolic(*args, **kwargs)
cmpy.infotheory.tests.test_dists_infotheory.test_relative_entropy_zero()
cmpy.infotheory.tests.test_dists_infotheory.test_renyi_entropy()
cmpy.infotheory.tests.test_dists_infotheory.test_renyi_entropy_log()
cmpy.infotheory.tests.test_dists_infotheory.test_renyi_entropy_symbolic()
cmpy.infotheory.tests.test_dists_infotheory.test_symbolic_entropy(*args, **kwargs)
cmpy.infotheory.tests.test_dists_infotheory.test_total_correlation()

The test_information Module

Tests for the information theory module.

cmpy.infotheory.tests.test_information.test_entropy()
cmpy.infotheory.tests.test_information.test_entropy_log()
cmpy.infotheory.tests.test_information.test_entropy_log_with_neginfs()
cmpy.infotheory.tests.test_information.test_entropy_symbolic(*args, **kwargs)
cmpy.infotheory.tests.test_information.test_entropy_with_zeros()
cmpy.infotheory.tests.test_information.test_relative_entropy()
cmpy.infotheory.tests.test_information.test_relative_entropy_log()