Machine learning using Restricted Boltzmann machines

Restricted boltzmann machines commonly known as ‘RBM’s are excellent feature extractors, working just like autoencoders. They easily outperform PCA (principal component analysis) and LDA when it comes to dimensionality reduction techniques. The features extracted from images (eg MNIST) are fed to neural networks or  machine learning algorithms such as SVM or Logistic regression classifiers. RBMs…

Approximating a sine wave using neural network

Lets try to generalize a sine wave using neural network.  The NN will learn the data and will approximate. We will need atleast 20 hidden neurons for the NN to model properly.  For a NN to generalize to a non-linear output, it needs atleast 20 neurons in the hidden layer. I used about 20 neurons…

Fix -> WARNING: nvcc not in path with CUDA

i was installing Pycuda in my mac and when i compile i get this error. I did install CUDA from nvidia and it seems to be a path problem. *** WARNING: nvcc not in path. i fixed it by assigning paths to the CUDA library export PATH=${$PATH}:/usr/local/cuda/bin export CUDA_ROOT = /usr/local/cuda/ and then finally python…

Tutorial: Pybrain Neural network for classifying Olivetti faces

After experimenting various machine learning algorithms like KNN, Support vector machines (SVM), i decided to take a look on neural networks.  The Feed forward neural network really captured my interest. I really dont like reading too many papers and mathematics, so just decided to play around with the neural network to see how it works…

Scipy requires gfortran compiler to install for Mac OS

I was installing scipy on my old mac running python 2.7 but had a real hard time installing scipy. I successfully installed numpy without any problems. However installing scipy on both ways using mac ports, pip and compiling from scipy source throwing this error error: library dfftpack has Fortran sources but no Fortran compiler found…

Fix -> Pip not working for Python in Windows

I installed python in my 64 bit windows and had a hard time installing packages through pip, which comes preinstalled with latest versions of python. Everytime i entered pip in command prompt, i get Pip not recognized as internal or external command, operable program or batch file. Here is a simple and easy fix. Go…

Browser not prompting for PIN with smart card authentication

My bank gave me a new smart card reader to use with the online banking.  Smart card readers are slowly catching up as new way of banking in most of the european banks. The problem with was, i was told that internet banking only works in windows and not in Mac. After 7 hours of…

Tutorial: Titanic dataset machine learning for Kaggle

Kaggle has a a very exciting competition for machine learning enthusiasts. They will give you titanic csv data and your model is supposed to predict who survived or not. Predict the values on the test set they give you and upload it to see your rank among others. The prediction accuracy of about 80% is…

Scikit Machine learning of Car evaluation dataset

I have been working on machine learning for over a month using python, scikit-learn, and pandas. Over 90% of the work is on encoding the data formatting for machine learning, and rest 10% is setting up algorithms for machine learning. Lets talk about car evaluation dataset and here is how i got 98% accuracy in prediction…

Fix -> Samsung galaxy very slow charging of battery

Recently had this frustrating problem: After my android software update, my galaxy note 2 took 10+ hrs to charge 100% and i really thought the problem was the battery. I even went to a samsung store asking for a battery but they said it takes 2 days to get one. Guess what? Battery isnt the issue. It…