Valentin Mihov's Blog

Random pieces of wisdom about technology

AWS Machine Learning Overview

In the last blog post I showed you how to slice and dice a data set describing individual people and trying to predict if they make more than $50,000 annually. We used ipython and a bunch of libraries to do the analysis, build a prediction model and evaluate its performance. This requires having knowledge about how to use all these python libraries and what exactly to do with the data (although you can use the ipython notebook from that blog post as a general framework to analyze any data set). It also requires installing all this software on your system, which can be non-trivial.

Read More

Adult Income Data Set Analysis with IPython

In this blog post I will show you how to slice-n-dice the data set from Adult Data Set MLR which contains income data for about 32000 people. We will look at the data and build a machine learning model (a logistic regression), which tries to predict if a person will make more than $50K a year, given data like education, gender and martial status.

Read More

Rails + EmberJS + Active Model Serializers + Her

Recently I got into a situation at work, where there was a Rails app, which was exposing some data through an API which uses active_record_serializers and EmberJS as front-end of the data. The problem was there needed to be a new Rails app, which also consumes data from the same Rails API endpoints and visualize the data. Unfortunatelly ActiveResource and Her are not supporting the ember-data kind of data format, which requires to have separate serializers for EmberJS and for regular Rails API calls. So the ember_data_active_model_parser was born, which is a middleware for Her, which makes it understand the ember-data JSON format.

Read More

Home automation: research and choosing hardware

I decided to make a self made home automation system in my apartment. The reason is that I figured out that turning on and off my heating when I am not around reduces my electricity bill by 50%. My current schedule is to turn off the heating when I leave the house and turn it on 1 hour before I come back home. I do the same thing with the heating in my bedroom. The heating there is turned on about an hour before I go to sleep and I turn it off during the day. However there are exceptions from these rules especailly around holidays, so an automation system should also be very configurable.

Read More

Running Ruby 1.9.1 + Rails + MySQL and unicode characters

If you have tried to develop some rails application on Rails + Ruby 1.9.1 and MySQL database and you are storing non-English characters in your database probably you had a lot of pain with errors about incompatible charsets. This is a known problem and there is even a bug in Rails’ lighthouse for it. There is even a hack which is going around the issue. The solution is not perfect, but it works in most of the cases.

Read More

My experience with developing a Rails 2.3.5 project with Ruby 1.9.1 Part 2

My journey into the ruby 1.9 land continues with some nice observations, tricks and tips.

Read More

Switching my blog to jekyll and compass

Probably you remember that some time ago I decided to switch my blog from blogger to a custom made blogging engine written my me. It was a simple sinatra app, which was parsing a bunch of markdown files, which were the posts and rendering the blog.

Read More

My experience with developing a Rails 2.3.5 project with Ruby 1.9.1 Part 1

I decided to use ruby 1.9.1 for my next project. One of the reasons I decided so is because ruby 1.9 is definitely faster than 1.8 and also it has a superior encoding support for the strings. Not to mention that living on the edge is a thrill :-)

Read More

Integrating custom SQL queries with ActiveRecord

I know that some people could start a flame war about what I will discussing right now, so let me first introduce you into the context of the problem.

Read More

A task for admission of gifted children in Japan

This is a task that was given to a group of children for admission in kindergarten for gifted children in Nagoya, Japan. 74% of the children solved it. A hint: they were able to count up to 10.

Read More