23 Jan

Types of ML problems

Classification

A classifier uses a set of instances for which the correct category membership is known.

Questions: spam or ham, positive or negative.

Training Data: ex. tweets which are correctly classified as positive or negative.

Regression 

Forecasting of continuous value.

Questions: what will be the price of this stock on a given date, what will be a sales of this product in a future week

Training Data: historical datapoints.

Clustering

Helps to identify the groups in raw dataset (groups of users in social network).

We’re telling how many groups there should be and algorithm makes grouping objects by different attributes into this number of groups.

Recommendations (Collaborative Filtering)

Determine what user may like based on past behavior.

 

17 Apr

Power of grep

How to highlight results in ls output:

ls|grep -E --color "sh$|$"

This will highlight all files with *.sh extension in current directory.

Where -E means that we’re matching entries with regex,
|$ means that we don’t want to skip entries that do not match our regex (passing pipe further and closing it with dollar sign).

12 Sep

Vim game

To learn Vim with fun I started to search for some interactive guide with some practical step-by-step tasks.

I found a game that helps to remember the main Vim shortcuts:

git clone git://github.com/kikuchiyo/vim_game.git

Although I needed to spend some time to find out how to compile Ruby app with all dependencies.
Here is the recipe that worked for me:

First of all you need have installed MySQL server and Ruby itself:

sudo apt-get install mysql-server
sudo apt-get install ruby

Then install bundler (dependency tool for Ruby):

sudo apt-get install ruby-bundler

You’ll also need Qt 4 (couldn’t completely compile app with Qt 5 but I guess it should be installed as well):

sudo apt-get install qt4-default

Install dependencies:

sudo apt-get install libqt5webkit5-dev
sudo apt-get install qtquick1-5-dev qtlocation5-dev qtsensors5-dev qtdeclarative5-dev
sudo apt-get install libsqlite3-dev libmysql-ruby libmysqlclient-dev

Then try to set up the application itself:

bundle install
bundle exec rake db:drop db:create db:schema:load db:migrate
bundle exec rails s

Enjoy!