Guide to Linear Regression

Featured Image -- 29
Standard

Originally posted on alexhwoods:

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.

linreg1.2

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 665 more words

Standard

Originally posted on Hanynowsky:

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).


SOLUTION 1

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:

Remark:
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:


SOLUTION 2:

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.


SOLUTION 3:

View original 63 more words

Instaling Sun Java Jre and Jdk Ubuntu 11.10 Oneiric

Standard

Just copied from: http://superuser.com/questions/353983/how-do-i-install-the-sun-java-sdk-in-ubuntu-11-10-oneric

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 

[Source]

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 

Returns:

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

Standard

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: http://jsfiddle.net/SkvjV/2/

 

Remainder: Configuring GIT

Standard

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 user.name "Your name"
git config --global user.email your@mail.com

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 appengine.tools

Standard

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 (…)

from http://philipsoutham.posterous.com/importerror-no-module-named-appenginetools

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

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