modelsandbox_Mixin module

This is a module for testing new features of the model class, but in a smaler file.

Created on Sat Sep 29 06:03:35 2018

@author: hanseni

class modelsandbox_Mixin.Newmodel_Mixin[source]

Bases: object

property showstartnr
sim2d(databank, start='', end='', silent=0, samedata=0, alfa=1.0, stats=False, first_test=1, antal=1, conv=[], absconv=0.01, relconv=1e-16, dumpvar=[], init=False, ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, ljit=False, timeon=False, fairopt={'fairantal': 1}, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

static grouper(iterable, n, fillvalue='')[source]

Collect data into fixed-length chunks or blocks

outsolve2dcunk(databank, debug=1, chunk=None, ljit=False, type='gauss', cache=False)[source]

takes a list of terms and translates to a evaluater function called los

The model axcess the data through:Dataframe.value[rowindex+lag,coloumnindex] which is very efficient

sim1d(databank, start='', end='', silent=0, samedata=0, alfa=1.0, stats=False, first_test=1, antal=1, conv=[], absconv=0.01, relconv=1e-05, dumpvar=[], ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, ljit=False, fairopt={'fairantal': 1}, timeon=0, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

outsolve1dcunk(debug=0, chunk=None, ljit=False, cache='False')[source]

takes a list of terms and translates to a evaluater function called los

The model axcess the data through:Dataframe.value[rowindex+lag,coloumnindex] which is very efficient

errfunk1d(a, linenr, overhead=4, overeq=0)[source]

Handle errors in sim1d

errfunk(values, linenr, overhead=4, overeq=0)[source]

developement function

to handle run time errors in model calculations

newton1per(databank, start='', end='', silent=1, samedata=0, alfa=1.0, stats=False, first_test=1, antal=20, conv=[], absconv=0.01, relconv=1e-05, nonlin=False, timeit=False, reset=1, dumpvar=[], ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, ljit=False, fairopt={'fairantal': 1}, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

newtonstack(databank, start='', end='', silent=1, samedata=0, alfa=1.0, stats=False, first_test=1, antal=20, conv=[], absconv=0.01, relconv=1e-05, dumpvar=[], ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, nchunk=None, ljit=False, nljit=0, fairopt={'fairantal': 1}, debug=False, timeit=False, nonlin=False, nonlinfirst=0, newtonalfa=1.0, newtonnodamp=0, forcenum=True, reset=False, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

newton1per_un_normalized(databank, start='', end='', silent=1, samedata=0, alfa=1.0, stats=False, first_test=1, antal=20, conv=[], absconv=0.01, relconv=1e-05, nonlin=False, timeit=False, reset=1, dumpvar=[], ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, ljit=False, fairopt={'fairantal': 1}, newtonalfa=1.0, newtonnodamp=0, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

newtonstack_un_normalized(databank, start='', end='', silent=1, samedata=0, alfa=1.0, stats=False, first_test=1, antal=20, conv=[], absconv=0.01, relconv=1e-05, dumpvar=[], ldumpvar=False, dumpwith=15, dumpdecimal=5, chunk=None, nchunk=None, ljit=False, nljit=0, fairopt={'fairantal': 1}, debug=False, timeit=False, nonlin=False, newtonalfa=1.0, newtonnodamp=0, forcenum=True, reset=False, **kwargs)[source]

Evaluates this model on a databank from start to end (means end in Danish).

First it finds the values in the Dataframe, then creates the evaluater function through the outeval function (modelclass.model.fouteval()) then it evaluates the function and returns the values to a the Dataframe in the databank.

The text for the evaluater function is placed in the model property make_los_text where it can be inspected in case of problems.

res2d(databank, start='', end='', debug=False, timeit=False, silent=False, chunk=None, ljit=0, alfa=1, stats=0, samedata=False, **kwargs)[source]

calculates the result of a model, no iteration or interaction The text for the evaluater function is placed in the model property make_res_text where it can be inspected in case of problems.

control(databank, targets, instruments, silent=True, ljit=0, maxiter=30, **kwargs)[source]
totexplain(pat='*', vtype='all', stacked=True, kind='bar', per='', top=0.9, title='', use='level', threshold=0.0)[source]
get_att_gui(var='FY', spat='*', desdic={}, use='level')[source]

Creates a jupyter ipywidget to display model level attributions