Category: Programming

  • Equivalent of Numpy’s Clip function in R

    Equivalent of Numpy’s Clip function in R

    Numpy’s clip function is a handy function that brings all data in a series into a range. For example, in machine learning, it is common to have activation functions that take a continuous range of values and bring them to a range like 0 to 1, or -1 to 1. In my case, I was […]

  • Files and Pipes in R Video Demo

    I’ve worked with various alternate file handlers in python before and wanted to explore the options in R. I was pleasantly surprised to find handlers prebuilt for tasks like compressing data. In addition, a pipe function is available to allow you to use less common commands on your file, like gpg for encryption. I put […]

  • Installing pymc on OS X using homebrew

    I’ve been working through the following book on Bayesian methods with an emphasis on the pymc library: However, pymc installation on OS X can be a bit of a pain. The issues comes down to fortran… I know. The version of gfortran in newer gcc implementations doesn’t work well with the pymc build, you need […]

  • Installing TensorFlow on CentOS

    Google released TensorFlow as open source for community use and improvement. From the site: “TensorFlow™ is an open source software library for numerical computation using data flow graphs.” The instructions on are aimed at Ubuntu and OS X. I had a need to install it on CentOS so I documented the steps in a […]

  • Running a Local ElasticSearch Cluster for Development

    ElasticSearch is a document database built on Lucene, a full text-search engine. It clusters and is useful in a variety of scenarios. If you want to run it locally and test some of the clustering feature, here are some things I learned from my experience. Install with your preferred package manager, or from source. In […]