Package qubx :: Module modeling_utils
[hide private]
[frames] | no frames]

Module modeling_utils

source code

QubX.Modeling.Utils panel; hosts a registry of generic model/data-based optimizers, and sub-panels which can use them.

Optimizer methods should be called from the gobject (gui) thread. To call from a qubx.task.Robot thread, use robot.gui_call_recv with wait=False.

Copyright 2003-2014 Research Foundation State University of New York This file is part of QUB Express.

QUB Express is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QUB Express is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License, named LICENSE.txt, in the QUB Express program directory. If not, see <http://www.gnu.org/licenses/>.

Classes [hide private]
  Optimizer
Presents a consistent interface on one model/data-based optimization routine, e.g.
  ModelingUtilsFace
Hosts a registry of generic model/data-based optimizers, and sub-panels which can use them.
  ClassifyFace
  ClassifyTask
  StarFace
  ChainFace
  StyledBuildTask
  ModelSearchFace
  ModelSearchTask
  PerturbFace
  PerturbTask
Functions [hide private]
 
task_exception_to_console(task, typ, val, tb) source code
 
build_styled_model(optimizer, add_state, optimize=True, delta_ll=1.0, data_prep=None, task=None, should_quit=<__builtin__.function object>)
Builds up a model by, for all extant classes, repeatedly adding a state until LL improves by less than delta_ll.
source code
 
AngleOfStates(m, s1, s2) source code
 
AddStarState(hub_index) source code
 
AddChainState(cls) source code
 
Connections(model) source code
 
LeftmostState(model) source code
 
ChainStateOrder(model) source code
 
SubChain(model, cls) source code
 
nauty_model_class(model) source code
 
nauty_keep_model(nstate, code, max_conn, max_exit) source code
 
nauty_setup_model(model, state_order, code, balance_loops, initial_k0, random_rates, random_from, random_to, decorate) source code
 
nauty_connections(nstate, code) source code
 
random_scaled(center, lo_mult, hi_mult) source code
 
gen_perturbations(model, all_at_once, perturb_rates, perturb_channelCount, perturb_amp, perturb_std, perturb_cond, perturb_condstd, perturb_pct, trials) source code
Variables [hide private]
  __package__ = 'qubx'
  e = 2.71828182846
  pi = 3.14159265359
  rdbk = 'Expired.'
  rdbreak = 'supporting'
  rdname = 'qubfast.txt'
Function Details [hide private]

build_styled_model(optimizer, add_state, optimize=True, delta_ll=1.0, data_prep=None, task=None, should_quit=<__builtin__.function object>)

source code 

Builds up a model by, for all extant classes, repeatedly adding a state until LL improves by less than delta_ll. Can be called from non-gobject Task threads if you provide the qubx.task.Task.

Parameters:
  • optimizer - Optimizer
  • add_state - func(class_index) called on gobject thread, operates on QubX.Models.file
  • optimize - False to evaluate model LL as-is
  • data_prep - optional prepared data to override onscreen
  • task - qubx.task.Task if called from Task/robot thread