Tag Archives: machine learning

Compressing VGG for Style Transfer

I recently implemented pastiche—discussed in a prior post—for applying neural style transfer. I encountered a size limit when uploading the library to PyPI, as a package cannot exceed 60MB. The 32-bit floating point weights for the underlying VGG model [1] … Continue reading

Tagged , , , , | Leave a comment

kmeans1d: Globally Optimal Efficient 1D k-means Clustering

I implemented kmeans1d, a Python library for performing k-means clustering on 1D data, based on the algorithm in (Xiaolin 1991), as presented in section 2.2 of (Grønlund et al., 2017). Globally optimal k-means clustering is NP-hard for multi-dimensional data. LLoyd’s … Continue reading

Tagged , | Leave a comment

k-means Image Color Quantization

I implemented a web page that can apply color quantization to images using k-means clustering. Here’s the link: https://dstein64.github.io/k-means-quantization-js/ The JavaScript source code is available on GitHub: https://github.com/dstein64/k-means-quantization-js

Tagged , , , , | Leave a comment

Factorization Machines with Theano

A Factorization Machine (FM) is a predictive model that can be used for regression and classification (Rendle 2010). FMs efficiently incorporate pairwise interactions by using factorized parameters. PyFactorizationMachines is a Theano-based Python implementation of factorization machines. Update 4/20/2017: The library is now … Continue reading

Tagged , , , | Leave a comment

Matrix Factorization with Theano

Matrix factorization algorithms factorize a matrix D into two matrices P and Q, such that D ≈ PQ. By limiting the dimensionality of P and Q, PQ provides a low-rank approximation of D. While singular value decomposition (SVD) can also be … Continue reading

Tagged , , , | Leave a comment