A Jupyter Notebook contains both computer code (e.g. python, mysql) and rich text elements (paragraph, equations, figures, links, etc…) which are both human-readable documents containing the analysis description and the results (figures, tables, etc..) as well as executable documents which can be run to perform data analysis. It’s really helpful if you want to communicate your code or results to others and provides a great developing environment.
To get started install Anaconda on your machine–
Continue reading “Performing Data analytics with Jupyter(formerly ipython)”
Big Data possibly now has become the most used term in the tech world for this decade. Everybody is talking about it and everybody have their own understanding towards it which has made its definition quite ambiguous. Let us deconstruct this term with a situation. Suppose you are creating a database for movie ratings where rows indicate user IDs, columns indicate movies and the values of the cells indicates rating(0-5) given by user to the corresponding movie. Now this data is likely to be sparse as you can’t have a situation where all users have rated all movies. In real world situation you can conceive the sparsity of this database and the cost it takes to store this huge database/matrix.
Continue reading “Matrix Multiplication with MapReduce”
Theano is a popular Python’s meta programming framework used for Deep Learning on top of either CPU or GPU. Purpose of this blog is to suggest some tips which you can incorporate if you are getting trouble while performing Deep Learning on your problem.
- Constant Validation Error– If you have just started with Theano and are applying logistic regression model to your problem (MNIST’s Digit recognition is not considered as problem here), then you are likely to get constant validation error while training. If that happens you need to fix your learning rate by determining the optimal one. Start with 0.1 and keep reducing it by a factor of 10 after every epoch until you see a fall in validation error and then use that learning rate for training. Tip- Whenever you initiate training always start with a smaller dataset, say 500-1000 samples, and try to overfit your model. Give same Dataset to training, validation and test. You should get a 100% test error. Your network should have more number of nodes compared to your input so that it can fit. If this is not happening certainly there’s some bug in your implementation.
- Gaussian Initialization– By default Theano developers have set Initialization of weights to random uniform distribution. Change it to Gaussian(normal) Distribution, you are then likely to get improved results.
Continue reading “Tips and Tricks for training Neural Network in Theano”
This implementation is to be done in this code – link
Install scikit-learn library and then import-
from sklearn.metrics import confusion_matrix
Define this theano function to obtain predicted labels from your logistic regression model.
Continue reading “Implementing a confusion matrix to your logreg code in Theano”
If you have a working experience on theano, you probably wouldn’t have forgot that such a pain in the ass task it was. So I felt it really worth to blog about it for people aspiring to get in Deep Learning. Installation instructions given on the official website are capable enough to break down the morale of any newbie who wants to get started. Follow the instructions
mentioned below to setup theano on Ubuntu.
Continue reading “Installing Theano and integrating it with GPU on Ubuntu.”