A machine learning, optimization, and data science utilities package.
This is a huge ongoing project that I use for all of my work. Pretty much every new algorithm I implement will start here. I do my best to keep it organized and readable. Once things are thoroughly polished (and presumed generally useful), I turn them into their own python modules.
Latest stable and tested release available by:
pip install https://github.com/tchlux/util/archive/1.0.18.zip
Current cutting edge, (possibly unstable) code available by:
pip install git+https://github.com/tchlux/util.git
Include in a requirements.txt
file as:
util@https://github.com/tchlux/util/archive/1.0.18.zip
The following list links to each module within the util
package. This serves as the web-accessible documentation for the code. If this documentation seems wrong, the most up-to-date documentation is in the comment block preceding a function or class.
All approximation algorithm research. Neural networks, nearest neighbor, Linear Shepard, Multivariate adaptive regression splines, box splines, voronoi mesh, support vector machine, delaunay mesh, multivariate polynomials, etc.. All algorithms are treated as regression algorithms, classification tasks are translated to regression algorithms using a regular simplex embedding on input and a linear solve on output.
A pure python implementation of a Pandas-like Dataframe. See the test.py
files for usage details. Slower than pandas for large data (>10MB), faster and more flexible than pandas for small data (<10MB).
Provides an extensive interface to HTML
plotting through plotly
. Simplifies the usage of offline python plotly
plotting. Produce plots without ever interacting directly with the dictionary objects that plotly expects. This module currently supports 2D and 3D scatter plots with numerical axes, histograms, subplots (with varying numbers of plots in each row), animations, box-plots, and plot annotations.
Miscellaneous mathematics-related functions. The most notable codes are a Fraction
rational number implementation in pure python with unlimited precision, and codes that identify and construct Fekete points.
Numerous optimization utilities for both gradient-free (AdaptiveNormal
, DiRect
, random
) and gradient-based (SGD
, ADAM
, L_BFGS
) minimization of arbitrary functions.
All sorts of useful statistics, mostly nonparametric. Compute effect, fit CDF's, compute metric principle components, rank probability, or quantify sample statistics.
Functions for generating useful random sequences (ranges, distributions, pairs, Latin designs).
Provides a parallelized implementation of the builtin Python map
function for easy drop-in parallelization.
Function run
is a (python+OS)-safe interface to command-line execution that cleanly handles errors. Class AtomicOpen
provides an atomic file operation class that uses system locking mechanisms to enforce atomic operations on files. Also provides a robust hash
function, easy-to-use save
/ load
functions, and a Timer
object.
Miscellaneous useful function decorators (the @<decorator>
on lines before def
in code). Alias a function with same_as
, cache
function calls, capture
standard outputs, and run functions in the background
.
Extensive data splitting for validation, Apriori tree, image transformation, and latex table generation. The stuff that doesn't fit anywhere else ... yet.