13.07.2015 Views

LIAM 2 User Guide

LIAM 2 User Guide

LIAM 2 User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>LIAM</strong> 2 <strong>User</strong> <strong>Guide</strong>, Release 0.7.0align_link.py the core algorithm (an implementation of Chenard’s) for align_abs(link=)exprmisc.py all expressions which are not defined in another file.groupby.py handles groupby()links.py contains all link-related code:• the Link class stores the definition of links• the LinkValue class handles ManyToOne links• link functions to handle OneToMany links: countlink, sumlink, avglink, minlink and maxlinkmatching.py handles the matching() functionregressions.py handles all the regression functions: logit_score, logit_regr, cont_regr, clip_regr, log_regrtfunc.py handles all time-related functions: value_for_period, lag, duration, tavg and tsumContextfile: context.pyA context is a data structure used to keep track of “contextual” information: what is the “current” entity, what is the“current” period, what is the “current” dataset. The context is passed around to the evaluation functions/methods.A context must present a simple dictionary interface (key: value). There are a few keys with special meanings:period should be the period currently being evaluated__len__ if present, should be an int representing the number of rows in the context__entity__ current entity__globals__ if present, should be a dictionary of global tables (‘periodic’, ...)The kind of context which is most used is the EntityContext which provides a context interface to an Entity.10.2.2 Other filesMain codeconfig.py Stores some global configuration variablesconsole.py Handles the interactive consolecpartition.pyx Cython source to speed up our partitioning function (group_indices_nd) which is used in groupbyand alignment.cpartition.c generated from cpartition.pyx using Cythoncpartition.pyd cpartition.c compiledcutils.pyx Cython source to speed up some commonly used utility functions.cutils.c generated from cutils.pyx using Cythoncutils.pyd cutils.c compileddata.py handles loading, indexing, checking, merging, copying or modifying (adding or removing fields) tables(or subsets of them). It tries to provide a uniform interface from different data sources but it is a work inprogress.exprparser.py parsing code for expressionsimporter.py code to import csv files in our own hdf5 “subformat” by reading an “import file” (in yaml).khash.h Generic hash table from Klib, used in cpartition.pyx see https://github.com/attractivechaos/klib52 Chapter 10. Appendix

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!