Package: zensols.datdesc
Describe and optimize dataThis API and command line program describes data in tables with metadata and
generate LaTeX tables in a.styfile from CSV files.  The paths to the CSV
files to create tables from and their metadata is given as a YAML configuration
file.  Paraemters are both files or both directories.  When using directories,
only files that match*-table.ymlare considered.  In addition, the described
data can be hyperparameter metadata, which can be optimized with thehyperparameter module.Features:Associate metadata with each column in a Pandas DataFrame.DataFrame metadata is used to format LaTeX data and exported to Excel as
column header notes.Data and metadata is viewable in a nice format with paging in a web browser
using theRender program.Usable as an API during data collection for research projects.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3installzensols.datdescBinaries are also available onpypi.UsageFirst create the table's configuration file.  For example, to create a Latex.styfile from the CSV filetest-resources/section-id.csvusing the first
column as the index (makes that column go away) using a variable size and
placement, use:intercodertab:path:test-resources/section-id.csvcaption:>-Krippendorff’s ...size:VARplacement:VARsingle_column:trueuses:zentableread_kwargs:index_col:0write_kwargs:disable_numparse:truereplace_nan:''blank_columns:[0]bold_cells:[[0,0],[1,0],[2,0],[3,0]]Some of these fields include:placement: the placement (i.e.h!), whichVARmeans to create the
command with a variable to use as the first parametersize: the font size (i.e.small), whichVARmeans to create the
command with a variable to use as the second parameterindex_col: clears column 0 andbold_cells: make certain cells bolddisable_numparsetells thetabulatemodule not reformat numbersSee theTableclass for a full listing of options.HyperparametersHyperparameter metadata: access and documentation.  This package was designed
for the following purposes:Provide a basic scaffolding to update model hyperparameters such ashyperopt.Generate LaTeX tables of the hyperparamers and their descriptions for
academic papers.Access to the hyperparameters via the API is done by calling thesetormodellevels with adotted path notationstring.  For example,svm.Cfirst navigates to modelsvm, then to the hyperparameter namedC.A command line access to create LaTeX tables from the hyperparameter
definitions is available with thehyperaction.  An example of a
hyperparameter set (a grouping of models that in turn have hyperparameters)
follows:svm:doc:'supportvectormachine'params:kernel:type:choicechoices:[radial,linear]doc:'mapstheobservationsintosomefeaturespace'C:type:floatdoc:'regularizationparameter'max_iter:type:intdoc:'numberofiterations'value:20interval:[1,30]In the example, thesvmmodel has hyperparameterskernel,Candmax_iter.  Thekerneltype is set as a choice, which is a string that has
the constraints of matching a string in the list.  TheChyperparameter is a
floating point number, and themax_iteris an integer that must be between 1
and 30.In this next example, thek_meansmodel uses the stringk-meansin human
readable documentation, which can be Python generated code in adataclass.k_means:desc:k-meansdoc:'k-meansclustering'params:n_clusters:type:intdoc:'numberofclusters'copy_x:type:boolvalue:Truedoc:'Whenpre-computingdistancesitismorenumericallyaccuratetocenterthedatafirst'strata:type:listdoc:'Anarrayofstratifiedhyperparameters(madeupfortestcases).'value:[1,2]kwargs:type:dictdoc:'Modelkeywordarguments(madeupfortestcases).'value:learning_rate:0.01epochs:3ChangelogAn extensive changelog is availablehere.CommunityPlease star this repository and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2023 Paul Landes