Abon

Ghora's Personal Blog

Menu Close

Mengarang Lirik Lagu Syahdu dengan Markov Chain

Scroll ke bagian bawah laman artikel untuk melewati teori membosankan, dan langsung menuju lirik yang syahdu

Markov chain merupakan suatu sistem matematis yang di dalamnya terdapat kumpulan state (berupa nilai atau situasi)di mana perpindahan state ke state berikutnya berdasarkan probabilitas tertentu. Gambar di bawah ini merupakan salah satu contoh ilustrasi state cuaca yang dapat dijelaskan oleh markov chain:

graph1 Read more

Faster (and Brutal) Way to Determine if Microsoft Band 2 is Worn by The User

I am involved in a research in which I and my team are using Microsoft Band 2 for some purposes. For some reason, I need to determine contact state: whether the user is wearing the band or not. I came across to a fact that there will be a delay between the moment user detach the band and the moment of the band show the contact state.

20160718_170612

In Microsoft Band 2 (MS Band 2) standard development kit (SDK), Microsoft has by default provided a function to check status of the band, whether it is worn or not. In android SDK we can create a listener to monitor band contact state as follows: Read more

What is The Earth Surface Temperature of Indonesia Region in 2050?

With machine learning techniques, we can perform some predictions for regression problem, given the labeled dataset. For example, we can predict a person's height based on his age, or predict a population density based on time series.

I tried to predict the land temperature of Indonesia region in a certain date, in a -somewhat- brutal way. The method I used was polynomial regression degree 4. I got the dataset from kaggle (which is originally taken form Berkeley earth data page). All the calculations were performed with matlab. After performing some cleaning and filtering, I got the dataset properties as follows:

  • time range: January 1st, 1900 - August 08th, 2013
  • 1364 entries

Following is the plotting result of earth surface temperature with respect to time:
plot1 Read more

Simple Bash Script to Execute Matlab *.m File (OS X)

I currently take graduate school course in industrial and information system major. I use matlab quite extensively for my research and courseworks. I run it on my Macbook Pro machine.

Matlab offers a ton of features, but really, it is a resource hog clutter. Moreover I used to use vim as the primary text editor. Thus, I tried to find a workaround to get it work on command-line as an interpreter of *.m file so it can minimize resource usage (in a way).

#!/bin/bash
/Applications/MATLAB_R2016a.app/bin/matlab -nosoftwareopengl -nodisplay -nodesktop -nosplash -nojvm -r "run '$1'; exit" | tail +17

Save it as "matlab" and set it as an executable file . You can either link or move it to /usr/share/bin or any directory recognized by your environment. Then, you can use it like the other commands on terminal:

$ matlab filename.m

And it worked as I expected:
Screen Shot 2016-03-25 at 02.22.22

I think this workaround will work also on the other operating systems, but I've never tried it before.

© 2018 Abon. All rights reserved.

Theme by Anders Norén.