Guide to Linear Regression

Featured Image -- 29


Linear regression is one of the first things you should try if you’re modeling a linear relationship (actually, non-linear relationships too!). It’s fairly simple, and probably the first thing to learn when tackling machine learning.

At first, linear regression shows up just as a simple equation for a line. In machine learning, the weights are usually represented by a vector θ (in statistics they’re often represented by A and B!).

Screen Shot 2015-07-17 at 11.12.35 AM

But then we have to account for more than just one input variable. A more general equation for linear regression goes as follows – we multiply each input feature Xi by it’s corresponding weight in the the weight vector θ. This is also equivalent to theta transpose times input vector X.


There are two main ways to train a linear regression model. You can use the normal equation (in which you set the derivative of the negative log likelihood NLL to 0), or gradient…

View original post 665 more words



Whatever issue you’ve got with the Look & Feel in Ubuntu 12.04 PP, running Netbeans, you can set the LAF native look & Feel instead of the GTK one (which has by the way several issues under Linux).


Go to your netbeans directory (ex: /home/user/netbeans7.2/etc) and open the file : netbeans.conf

then add the following line to netbeans options:
-J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=lcd --laf Metal

Start Netbeans and it should look like this:

You can achieve the same result running netbeans with sudo command:

sudo sh /home/youruserhomename/netbeans-7.2.1/bin/netbeans

But this is not recommended.

Or by running netbeans with LAF parameter:


if you really want to keep the GTK look and feel for netbeans, then you have to modify the default general interface font in Ubuntu :

To something else than Ubuntu regular font which is bolder than the other usual fonts. Choose Sans or Droid Sans.


View original post 63 more words

Instaling Sun Java Jre and Jdk Ubuntu 11.10 Oneiric


Just copied from:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update sudo apt-get install sun-java6-jdk sun-java6-plugin 


You may want to also add the following

sudo update-alternatives --config java 

You should get the following

 Selection Path Priority Status
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
Press enter to keep the current choice[*], or type selection number: 2

Select (2) and press enter

Now running:

java -version 


java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

Chrome new Settings page


These days I realized that my Google Chrome  (Version 19.0.1055.1 dev) Settings page had a new interface (Maybe this change happened some versions ago)

This is how it looks like

Chrome Settings Page

Chrome Settings Page screenshot.

I just loved the new navigation menu. This kind of menu (with a items that only have a border on the left) are being used everywhere (Gmail, Google Reader, …).

Inspired by this menu and it’s source code I co-created a version of it. As this ‘Settings’ page is built in Google Chrome and would not be used in other browsers it does a ‘heavy’ mozkit css usage. The version I wrote don’t.

You can check it here:


Remainder: Configuring GIT


Posts tagged with ‘remainder’ will be the kind of post that have fast notes on solving/configuring/… something.

This one is about GIT configuration:

Configuring your name and e-mail

git config --global "Your name"
git config --global

Configuring colorized output

git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto

That’s all

ImportError: No module named


Got this error while playing around with Google AppEngine on Linux (Fedora16).

After googleing a little I got this

(…) After some brief searching, it seems that if you have other google python libs in your python path you’re in trouble. Im my particular case I had the protobuf-python26 port installed (I’m using OS X). I deinstalled that port and everything worked as expected (…)


I just had the same problem. After uninstalling protobuf using yum I got working.

If you need to use protobuf with AppEngine just check this link. (From the same source above)