paramz.tests package

Submodules

paramz.tests.array_core_tests module

class ArrayCoreTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_init()[source]
test_slice()[source]

paramz.tests.cacher_tests module

Created on 4 Sep 2015

@author: maxz

class Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_cached_ObsAr()[source]
test_cached_atomic_int()[source]
test_cached_atomic_str()[source]
test_caching_non_cachables()[source]
test_chached_ObsAr_atomic()[source]
test_copy()[source]
test_force_kwargs()[source]
test_name()[source]
test_pickling()[source]
test_reset()[source]
test_reset_on_operation_error()[source]
test_sum_ObsAr()[source]
class TestDecorator(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_cacher_cache()[source]
test_offswitch()[source]
test_opcalls()[source]
test_reset()[source]
test_signature()[source]

paramz.tests.examples_tests module

class Test2D(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

testLassoRegression()[source]
testRidgeRegression()[source]

paramz.tests.index_operations_tests module

class Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_clear()[source]
test_index_conversions()[source]
test_index_view()[source]
test_indexview_remove()[source]
test_misc()[source]
test_print()[source]
test_remove()[source]
test_shift_left()[source]
test_shift_right()[source]
test_view_of_view()[source]

paramz.tests.init_tests module

class InitTests(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_initialize()[source]
test_load_initialized()[source]
test_constraints_in_init()[source]
test_parameter_modify_in_init()[source]

paramz.tests.lists_and_dicts_tests module

Copyright (c) 2015, Max Zwiessele All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of paramz nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

class Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

tearDown()[source]

Hook method for deconstructing the test fixture after testing it.

testArrayList()[source]
testPrintObserverListObj()[source]
testPrintObserverListObsAr()[source]
testPrintObserverListParameterized()[source]
testPrintPriority()[source]

paramz.tests.model_tests module

class ModelTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_caching_offswitch()[source]
test_checkgrad()[source]
test_constraints_set_direct()[source]
test_constraints_testmodel()[source]
test_empty_parameterized()[source]
test_fix_constrain()[source]
test_fix_unfix()[source]
test_fix_unfix_constraints()[source]
test_fixing_optimize()[source]
test_get_by_name()[source]
test_hierarchy_error()[source]
test_likelihood_replicate()[source]
test_likelihood_set()[source]
test_optimize_ada()[source]
test_optimize_adam()[source]
test_optimize_cgd()[source]
test_optimize_error()[source]
test_optimize_fix()[source]
test_optimize_org_bfgs()[source]
test_optimize_preferred()[source]
test_optimize_restarts()[source]
test_optimize_restarts_parallel()[source]
test_optimize_rprop()[source]
test_optimize_scg()[source]
test_optimize_simplex()[source]
test_optimize_tnc()[source]
test_printing()[source]
test_pydot()[source]
test_raveled_index()[source]
test_regular_expression_misc()[source]
test_set_empty()[source]
test_set_error()[source]
test_set_get()[source]
test_set_gradients()[source]
test_updates()[source]

paramz.tests.observable_tests module

class ParamTestParent(name=None, parameters=[])[source]

Bases: paramz.parameterized.Parameterized

parameters_changed()[source]

This method gets called when parameters have changed. Another way of listening to param changes is to add self as a listener to the param, such that updates get passed through. See :py:function:paramz.param.Observable.add_observer

parent_changed_count = -1
class ParameterizedTest(name=None, parameters=[])[source]

Bases: paramz.parameterized.Parameterized

parameters_changed()[source]

This method gets called when parameters have changed. Another way of listening to param changes is to add self as a listener to the param, such that updates get passed through. See :py:function:paramz.param.Observable.add_observer

params_changed_count = -1
class Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

testObsAr()[source]
test_observable()[source]
test_priority()[source]
test_priority_notify()[source]
test_set_params()[source]
class TestMisc(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_casting()[source]

paramz.tests.parameterized_tests module

Created on Feb 13, 2014

@author: maxzwiessele

class M(name, **kwargs)[source]

Bases: paramz.model.Model

log_likelihood()[source]
objective_function()[source]

The objective function for the given algorithm.

This function is the true objective, which wants to be minimized. Note that all parameters are already set and in place, so you just need to return the objective function here.

For probabilistic models this is the negative log_likelihood (including the MAP prior), so we return it here. If your model is not probabilistic, just return your objective to minimize here!

parameters_changed()[source]

This method gets called when parameters have changed. Another way of listening to param changes is to add self as a listener to the param, such that updates get passed through. See :py:function:paramz.param.Observable.add_observer

class P(name, **kwargs)[source]

Bases: paramz.parameterized.Parameterized

heres_johnny(ignore=1)[source]
class ParameterizedTest(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_add_parameter()[source]
test_add_parameter_already_in_hirarchy()[source]
test_add_parameter_in_hierarchy()[source]
test_checkgrad_hierarchy_error()[source]
test_constraints()[source]
test_constraints_views()[source]
test_default_constraints()[source]
test_fixed_optimizer_copy()[source]
test_fixes()[source]
test_fixing_randomize()[source]
test_fixing_randomize_parameter_handling()[source]
test_index_operations()[source]
test_names()[source]
test_names_already_exist()[source]
test_num_params()[source]
test_original()[source]
test_param_names()[source]
test_printing()[source]
test_randomize()[source]
test_recursion_limit()[source]
test_remove_parameter()[source]
test_remove_parameter_param_array_grad_array()[source]
test_set_param_array()[source]
test_traverse_parents()[source]
test_unfixed_param_array()[source]

paramz.tests.pickle_tests module

Created on 13 Mar 2014

@author: maxz

class ListDictTestCase(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

assertArrayListEquals(l1, l2)[source]
assertListDictEquals(d1, d2, msg=None)[source]
class Test(methodName='runTest')[source]

Bases: paramz.tests.pickle_tests.ListDictTestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

test_observable_array()[source]
test_param()[source]
test_parameter_index_operations()[source]
test_parameterized()[source]

paramz.tests.verbose_optimize_tests module

class Test(methodName='runTest')[source]

Bases: unittest.case.TestCase

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_finish()[source]
test_timestrings()[source]

Module contents