About Prateek Joshi

I want the machines to see the world ... see the world the way I see it!

Understanding Python “Property”

1 mainI was tinkering with Python the other day when I encountered the “property” keyword. I had seen it many times before and I sort of knew what it does, but I never really had a chance to dig deep into it. As it turns out, “property” in Python is very useful when you are designing large systems. People who come from the world of object oriented programming will appreciate it right away. It’s a nifty little concept which makes the life of a programmer much simpler. So what is it all about? Before we jump directly into what it is, let’s get some perspective as to why we would need it in the first place.   Continue reading

What’s The Importance Of Hyperparameters In Machine Learning?

1 mainMachine learning is becoming increasingly relevant in all walks of science and technology. In fact, it’s an integral part of many fields like computer vision, natural language processing, robotics, e-commerce, spam filtering, and so on. The list is potential applications is pretty huge! People working on machine learning tend to build models based on training data, in the hope that those models will perform well on unseen data. As we all know, every model has some parameters associated with it. We want our machine learning models to estimate these parameters from the training data. But as it turns out, there are a few parameters that cannot be estimated using this procedure. These parameters tend have a significant impact on the performance of your model. Now why is that? Where do these parameters come from? How do we deal with this?   Continue reading

Is There A Problem With ‘git pull’?

1 mainThis post is specifically about a particular command in git. If you are new to git or don’t know what git is, then this post may not make much sense to you. Now that the statutory warning is out of the way, let’s carry on. This is actually a continuation of my previous blog post. The command we are going to talk about is ‘git pull’. This command that brings the changes in the remote repository to where you keep your own code. This is done by bringing the local copy of the remote repository up to date first, and then merging the changes into your own code repository and possibly your working copy. A lot of people use it very frequently without thinking about the possible side effects. When I first started out with git, I didn’t really concern myself with these side effects either. But programming purists would say that ‘git pull’ is risky and should be used with caution. Why is that?   Continue reading

git fetch vs git pull

1 mainGit is one of the most popular version control systems available out there. If you are a programmer, you must have used it one time or the other. This post deals with a couple of specific commands. So if you are new to git, this post may not make much sense to you. Git offers a variety of powerful commands to control the source code and collaborate with your peers on software projects.Every time I have to tinker with git, I tend to learn something new. In this post, we will discuss the difference between ‘git fetch’ and ‘git pull’.   Continue reading

Image Classification Using Fisher Vectors

1 mainThis is a continuation of my previous blog post on image classification and the bag of words (BoW) model. If you already know how BoW works, then you will feel right at home. If you need a refresher, you can read the blog post here. In our previous post, we discussed how BoW works, and how we construct the codebook. An interesting thing to note is that we don’t consider how things are ordered as such. A given image is treated as a combination of codewords regardless of where they are located with respect to each other. If we want to improve the performance of BoW, we can definitely increase the size of the vocabulary. If we have more codewords, we can describe a given image better. But what if we don’t want to do that? Is there a more efficient method that can be used?   Continue reading

Image Classification Using Bag-Of-Words Model

1 mainImage classification is one of the classical problems in computer vision. Basically, the goal is to determine whether or not the given image contains a particular thing like an object or a person. Humans tend to classify images effortlessly, but machines seem to have a hard time doing this. Computer Vision has achieved some success in the case of specific problems, like detecting faces in an image. But it has still not satisfactorily solved the problem for the general case where we have random objects in different positions and orientations. Bag-of-words (BoW) model is one of the most popular approaches in this field, and many modern approaches are based on top of this. So what exactly is it?   Continue reading

What Is Tail Recursion?

mainProgrammers deal with recursion all the time. It’s actually quite a nice concept, but not a lot of people use it because of the mystery associated with it. To be honest, there’s no mystery as such! Sometimes, a problem is too complex to solve because it is too big. If we can break the problem down into smaller versions of itself, we may be able to find a way to solve one of these smaller versions and then be able to build up to a solution to the entire problem. This is the entire idea behind recursion. Recursive algorithms break down a problem into smaller pieces which you already know the answer to. We can solve these smaller problems by applying the same algorithm to each piece, and then combine the results. I have discussed all this in complete detail here. Now that we have talked about recursion, what exactly is the title of this blog post referring to? What exactly is tail recursion and why do we need it?   Continue reading