Right now there’s a big hype about Machine learning and Big Data all around in the tech world. This is not surprising as they have played a significant role in Automation, Business advancements and predictions. But along with them Deep Learning is also now becoming a popular term in recent times. One interesting fact about deep learning is that it was abandoned in late 1980s, but later in 2007 Geoffrey Hinton brought an algorithm which all over again has invoked research in it.
I have completed almost 2 months of internship in DecisionStats. It has been a great learning experience. This internship helped me in improving a wide range of skills like programming, analytics, statistics etc. Every morning I was given an Assignment by Ajay Ohri, my guide during the internship, which I was supposed to finish by evening. A typical assignment involves understanding a concept and writing code.
Some links of the work I did during Internship:- Continue reading “Internship Experience of working in DecisionStats”
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)”
Today I’ve started my internship at Decisionstats. I was briefed by Ajay Ohri, founder, that this internship is going to be all about learning and I’ll be writing about things which are useful for others as well. During this two months internship I’ll be assisting him in solving problems here “https://github.com/decisionstats/pythonfordatascience” and developing open source tutorials for them. He explained that the purpose of doing this is that everyone can learn from it and will also help in elevating my data science brand value.
Decision trees are a common technique used in data mining to predict a target value based on several input data. Prediction of output value involves testing of input sample on certain rules. Each terminal node of the tree represents the output to which sample it belongs. To figure out the output, we start at the root node of the tree, and ask a sequence of questions about the features. The interior nodes are labeled with questions, and the edges or branches between them labeled by the answers and based on the attributes you eventually end in a particular leaf.
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.
No_of_samples are samples which will remain in your data set for each label after you execute the following code:-
classes = unique(labels); for i=1:numel(classes) cur_class_ind = find(labels==classes(i)); ind_to_remove = cur_class_ind(randperm(numel(cur_class_ind))); ind_to_remove = ind_to_remove(1:(numel(cur_class_ind) - no_of_samples)); labels(ind_to_remove,:) = ; data(ind_to_remove,:) = ; end
Here ‘data’ is your input dataset with m x n dimension(m=number of samples which we are trying to crop and n =number of features) and ‘labels’ is your vector containing output classes for every corresponding input sample.
If you are a researcher and works in Machine Learning then your work certainly would involve data processing on Matlab. Feature engineering involves extracting features from large number of files(usually csv) and these files need to be parsed so they can be loaded iteratively and processed.
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.
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.