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

Update 11/4/2019: The github repo was renamed from PyFactorizationMachines to pyfms. Update 4/20/2017: The library is now available on PyPI, the Python Package Index. It can be installed with pip. $ pip install pyfms A Factorization Machine (FM) is a predictive model that … 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