Sunday, January 2, 2022

about this blog

Well I want to make some notes about this blog. At first I have 2 groups of posts on Russian and English languages. Who interesting in various question about interview on software developer positions can grep by interview tag (it's not only my own experience but also experience of my friends and interesting things from the internet). Posts about life behind IT available with life tag. Posts about GPS and navigation avalible with gps tag. I'm working with GPS system from my MSc thesis. and have some experience with DSP algorithms in this field, in this topics I'll try to undercover some interesting things from easy to understand point of the view. Posts about ARM and Linux without any comments. Any other significant things will be added as soon as they appear.

The opinion published on this blog are my own, not necessarily those of my employer.

Friday, July 21, 2017

install rpy2 on Mac+R v 3.4.1 + virtenv

It's just pain :/ So small cheat sheet.

1) add to ~/.bash_profile
export R_HOME=/usr/local/Cellar/r/3.4.1/lib/R

2) Copy over (oh yes, facepalm) headers
cp -R /usr/local/Cellar/r/3.4.1/lib/R/include/R* /usr/local/include/

don't forget to delete them after 

Thursday, January 19, 2017

k-means and pca against mnist

Recently I've implemented SVD low-rank approximation for image compression, but then I thought that actually this low-rank approximation shows direction with highest variance... and that means we could estimate how many classes we should pick to train K-Means...

Saturday, January 14, 2017

Octave online

Guys, have you seen Octave online? quite impressive thing, you can store!!! your scripts, it can plot and does symbolic evaluations! Basic Machine Learning, Linear Algebra, Convex optimization, etc courses can be done right without any investment in an expensive software (hello Matlab basic bundle for 5k). w00h00

http://octave-online.net/

Wednesday, January 11, 2017

SVD low rank approximation for pictures (SVD image compression on Python3)

Well, tons of posts were written about it. It wont be "yet another one". But I implemented it anyway, just for fun. I wont explain theoretical part, but will suggest some links about it.

So good docs are:
http://timbaumann.info/svd-image-compression-demo/

Some good docs (thx Berkeley). This book is abandoned now, but it's good to read and store link for future reference.
http://inst.eecs.berkeley.edu/~ee127a/book/login/l_svd_low_rank.html
http://inst.eecs.berkeley.edu/~ee127a/book/login/l_svd_apps_image.html

Just nice presentation about PCA and SVD
http://math.arizona.edu/~brio/VIGRE/ThursdayTalk.pdf

and the source svd-img-compression.py

magic happens in np.dot() we pickup just take approx_rank singular values and discard others, so get some compression.

Result is below, on left side depicted original greyscale picture with rank equals 440 on a right side depicted low rank approximation with rank equals 50


Monday, November 7, 2016

Tensorflow in Gentoo virtualenv

Just tried to install tensorflow in Gentoo virtual env with python 3.4 and failed

Tuesday, September 20, 2016

k-means and MNIST dataset

Just thought few days ago how should look avarage 0 or 1 or 9 or any number. So downloaded MNIST dataset and implemented k-means algorithm (I could calculate average vector in every cluster, but that wont be interesting).