## Machine Learning: Multivariate Linear Regression

catetan lagi..

$latex n=&s=1$ number of features

$latex x^{(i)}=&s=1$ input (features) of $latex i^{th}&s=1$ training example

$latex x_j^{(i)}n=&s=1$ value of feature j in $latex i^{th}&s=1$ training example

• Hypothesis function:

$latex h_\theta(x)=\theta_0+\theta_1x_1+\theta_2x_2+…+\theta_nx_n&s=1$

repeat until convergence $latex \{&s=1$
$latex \theta_j:=\theta_j-\alpha\frac{1}{m}\sum\limits_{i=1}^m (h_\theta(x^{(i)}) – y^{(i)})x_j^{(i)}&s=1$
$latex \}&s=1$

(simultaneously update $latex \theta_j&s=1$ for j=0,1,…,n)

## Machine Learning: Linear Regression

catetan..

• Hypothesis function:

$latex h_\theta(x)=\theta_0+\theta_1 x&s=1$

• Cost function:

$latex J(\theta_0,\theta_1)=\frac{1}{2m}\sum\limits_{i=1}^m (h_\theta(x^{(i)}) – y^{(i)})^2&s=1$

## [ WeekendProjects ] SGD2IDR

sejak beberapa pekan lalu, pas wiken iseng-iseng bikin android app yang simpel tapi berguna, minimal berguna selama jadi TKI di Singapore ini..  [emoji grinning face with smiling eyes]

biasanya orang-orang Indo di Singapore, kalau hendak transfer duit ke Indonesia, mereka menggunakan jasa Bank BNI yang berlokasi di Lucky Plaza..

lalu, ada juga yang melakukan transaksi via milis Indo-Sing dengan sesama orang Indo, nah di milis tersebut umumnya rate yang digunakan adalah rate tengah ((jual+beli)/2) dari Bank BCA.. Read More …

## [ WeekendProjects ] How to Root NEXUS 5 with Android 4.4.2 KitKat

But, wait… I write here for my own reference, so if you want to try and follow this reference, DO IT AT YOUR OWN RISK..  [emoji expressionless face]

1. Download and extract Android SDK. Make sure you could find fastboot tool in {AndroidSDKfolder}/sdk/platform-tools
2. Download CWM Recovery for NEXUS 5, and put it in the folder where you found fastboot above.
3. Enable USB Debugging Mode, find in Setting > Developer Option
6. Turn off your Nexus 5.
7. Now, set your Nexus 5 to Fastboot/Bootloader mode by holding Volume Down + Power buttons together until you got a red text “Fastboot Mode”.
8. Install the CWM Recovery : use the Terminal or CommandPrompt in your PC/Laptop, goes to the folder where you found the fastboot tool and then type following commands.
9. fastboot flash recovery recovery-clockwork-6.0.4.5-hammerhead.img

10. When, it’s done, select Recovery menu in your Nexus 5 (use Volume Up/Down for scrolling and Power button to select).
11. In Recovery menu, select “Install zip”, and then browse to the SDcard folder where you have put the SuperSU zip file. Select the file and confirm the installation to begin.
12. When it’s done, select “++++++Go Back+++++”, and reboot you Nexus 5 by selecting “reboot system now”.
13. It may take time for the first reboot, but once your phone is up, do reboot again.

## [ WeekendProjects ] Python and GPU

Wiken kali ini pengen nyobain gimana menggunakan python untuk gpu programming.. ga sampe terlalu detil, cuma instalasi dan running sample codenya doank.. yang penting link-link pentingnya sudah diamankan.. [emoji grinning face with smiling eyes]

1. PyCUDA = python + cuda

Instalasi: PyCuda/Installation
Dokumentasi: documen.tician.de/pycuda/

2. PyOpenCL = python + opencl

Instalasi: PyOpenCL/Installation
Dokumentasi: documen.tician.de/pyopencl/

Untuk sementara itu dulu.. kalau ada kesempatan dan mood, kita lanjut lagi..  [emoji grinning face with smiling eyes]

## [ WeekendProjects ] Upgrading Xperia X10 to Jelly Bean

My wife has an old Sony Xperia X10 phone, it’s an android phone. When she bought it in 2010, the Android version was Eclair (2.1), and it’s never been upgraded before. Now, she let me play around to upgrade the phone. [emoji grinning face]

In its website, Sony only provides official update up to GingerBread (2.3) version. Yeaa, it’s too old really, and actually I want a 4.x version. After searching android ROMs through google, I decided to port the JellyBean (4.1) version. However, since it’s not an official update from Sony, it needs a little bit hacking to make it work in X10. It sounds difficult, indeed.. but actually, it’s a fun weekend project for me. [emoji face with look of triumph]

If you go search through google, there are lot of tutorials on how to upgrade android phones to JellyBean. But the problem is, in Xperia X10, the bootloader cannot be unlocked, while most tutorials out there are for unlocked bootloader phones. Fortunately, FeraLab have successfully managed JellyBean ROM that supports both locked and unlocked bootloaders. Here are the steps to port it to Xperia X10:

## shiva3d causes memory leaks on iphone

if you are working with shiva3d game engine on iphone, you may notice two memory leaks once you convert the runtime package (.stk file) to xcode project using shiva authoring tools.

the memory leaks are
1. related to AudioToolbox framework
2. related to NSString

for the first one, i have no idea how to resolve it, since it was related to one of ios frameworks, and even google didn’t know :D.

and for the second, it seems the authoring tools forgot to release a dynamic NSString variable. see the image below. red rectangle is the suspect variable that you could find in initWithCoder method of S3DEngine_EAGLView class (blue rectangles). to resolve this, simply release the variable as shown in green rectangle.

click for bigger image

## A simple CUDA-MFC program

Well, it’s just a simple CUDA program written in MFC framework. You know, all CUDA examples in NVIDIA SDK were written by using GLUT library, so they only use glut-window. Here, I’m trying to combine CUDA+OpenGL+GLSL in an MFC program, and this is the result. Read More …

## cunami on windows

Kemarin nyobain ng-convert CUDA application dari Linux ke Windows.. Setelah ngubek2 pesan error yang muncul, akhirnya berhasil jg.. Biar ga lupa dicatet aja ah.. 😀 Aplikasi yang mau gw convert namanya “cunami”, singkatan dari CUDA for Simulation of Tsunami.. hasil dari thesis gw kmaren.. hehe.. aslinya sih dikerjain di linux.. cuma pengen nyobain di windows aja..

yang perlu gw lakukan biar bisa dicompile di visual studio :

1. ubah header include sys/time.h ke time.h, di windows ga perlu pake “sys”
2. rendercheck_gl.cpp and rendercheck_gl.h are needed, jadi copas-kan ke cunami folder..
3. project property di visual studio pada bagian C/C++ > Additional include directory: $(CUDA_INC_PATH);$(NVSDKCOMPUTE_ROOT)Ccommoninc
4. project property di visual studio pada bagian C/C++ > Debug Information format: Program Database for Edit & Continue (/ZI) atau pada bagian Linker > Enable Incremental Linking: Yes (/INCREMENTAL)
5. project property di visual studio pada bagian Linker > Additional dependecies : cudart.lib cutil32D.lib glew32.lib
6. copas-kan cutil32.dll, glew32.dll and glut32.dll ke C:WindowsSystem32 agar file *.exe hasil compiling bisa running.

That’s all, and.. taraa…