bronx.datagrip.varbc¶
Utility class to read VarBC files.
The VarbcFile should be used to read VarBC files (see its documentation
below).
Classes¶
- class bronx.datagrip.varbc.VarbcEntry[source]¶
Bases:
objectOne entry of a VarBC file.
The comparison operator
==is available between objects of this class.No arguments have to be provided at creation time.
- ix¶
The entry identifier.
- key¶
The entry key.
- ndata¶
Number of data.
- npred¶
Number of predictors.
- params¶
Coefficients NumPy array.
- predcs¶
Predictors NumPy array.
- type¶
The observation type.
- class bronx.datagrip.varbc.VarbcFile(asciidatas)[source]¶
Bases:
MappingClass to handle a full VarBC file.
It provides then two simple methods to access to elements
ObsVarbcEntry, one with ix (getix()), the other with varbc ‘key’ (getkey()).It also behaves like a Mapping since the
__getitem__(),__iter__(),keys(),values()anditems()methods are defined. With all of these methods, the values are returned in the same order than originaly read in thh VarBC file.- Parameters:
asciidatas – Any iterable over lines from a VarBC file.
- getkey(key)[source]¶
Returns a VarBC entry given its key
- Return type:
- Example:
myobj.getkey('4 3 7')
- property metadata¶
The metadata associated to the varbc file.
- Return type: