Ankit Solanki

Food. Software. Music. Co-Founder - Instinct Innovations.

Read this first

Nothing kills a bad product faster than good marketing – Well, So when is it appropriate to spend on marketing?

Every product would essentially have fans (hopefully many), critics (as small as possible) and few fence sitters. It is important to understand the potential of your product and you can do this by defining a coefficient using your fans and critics.

Percentage of fans from total users - Percentage of critics from total users would be your product potential and if your product potential is a magnitude greater than your competitors, then you are on to something, and that is when you can spend that hard earned $ of yours on marketing.

The product potential coefficient varies for different industries. For example, the product potential coefficient for insurance as an industry would generally be negative. Critics are more than fans. In such cases products having the worst scores are benchmarked.

We at Instinct Innovations have spent considerable amount of time working on our customers to...

Continue reading →


get “Set” and go!

In an attempt to optimize some code I wrote a few years back, I started checking the amount of time each of code is taking for which I used a simple Line Profiler. I always believed using the right Data Structure for the right task could essentially get you a lift on you performance big time, like no fancy stuff only simple data structure.

So imagine a task where all you need to do is check if the list has a particular value of no. A simple list would use some searching algorithm based on the length of the list (Programming languages have a series of Algorithm implemented and based on the size of list they select the most suitable algorithm for the same) and If the element exist would return true, worst case O(n) operation, for a linear brute force search where data structure used would be simple array or a linked list.

Now we all are smarter then this so what we now do is sort the...

Continue reading →


Thinking Algorithmically > Learning new Languages.

Any programming language you pick up has a small generic framework in common. The elements of the framework are
1. What are primitive elements eg. Integers
2. How can you put them together, so that you can build bigger things eg operations 4 + 5
3. What are the means of abstraction eg functions, classes etc.

If you are familiar with any one programing language then map the syntax of that programming language to this and create a cheat sheet of your own. This will help you a lot to learn quickly as far as language syntax is concerned.

But programming is more then mere syntax, it about the way to think about solving a problem.
I would recommend you to think of a dummy project say making a scientific calculator, even that could teach you a lot and when you write a function just think if that was the best way you could have written it. What you will develop doing the same is...

Continue reading →


NGram Language Model.

An N-Gram Language model is a model which predicts the last word in the sequence given the sequence of (N-1) words.

These models are pretty handy when we are trying to analyze text from noisy or ambiguous input sources eg speech recognition or even in spelling correction when the error word itself is an English word eg. 30 minuets vs 30 minutes.

So mathematically what we want to compute is a probability of a word w that will follow a sequence of words s = { w1, w2, w3, w4, …, wn }.
P(w | s ) = ( (s + w) ) / ( s) in the corpus. ie. Total number of time the word “w” occurs after sentence “s” divided by total number of time the sentence “s” occurs in the training corpus.

Now one can use the web as a corpus to train such a model but there are two constraints

  1. Language is creative in nature and new sentences get created quiet frequently.
  2. To compute such statistics where in we compute the...

Continue reading →


Search Engines

The last two decades have witnessed many significant attempts to make this knowledge “discoverable”. These attempts broadly fall into two categories:

1. Classification of webpages in hierarchical categories (directory structure), championed by the likes of Yahoo! and Open Directory Project : Doesnt serve the purpose of todays web as -Huge amount of webpages who in the world has time to manually go and annotate them. Having said that its good when used in restricted domain!
2. Full-text index search engines such as Excite, AltaVista, and Google. : A pre computed Index to algorithmically retrieve and rank web pages

A statistical similarity measure has always been used in practice to assess the closeness of each document (web page) to the user text (query); the underlying principle being that the higher the similarity score, the greater the estimated likelihood that it is relevant to the...

Continue reading →


Types of Function

The fight between Purity(Pure) and Impurity(Non-Pure)

Pure function:
These are those wonderful creature that obey your order and create NO side effects. They only do what they are intended to do.
def abs(x):
if x>0 return x else return -x

All this function does is for some input value generates an output value. Thats it! No other crap!

On the other hands the NAUGHTY child of the programming family. Non Pure functions, In addition to returning the value that they were meant to return, they generate some side effect, make some changes to the environment! Idiots!
print(1) :
print function return a value None in python but displays some content on the console(Side Effect)

Try in Python 3.* : print(print(“Side”), print(“Effect!”))

To-DO :
Add advantages of using pure functions!

Continue reading →


Supervised Learning

A Machine Learning approach has an underlying philosophy of taking a labeled data set and extracting information from it and can label new data sets in future. OK! That was quite the textbook type definition, so lets simplify it. Supervised learning is nothing but taking some examples of input and their corresponding output and using the “knowledge” you extract from the data at hand to predict the output values of new inputs in future.

Let try an example - consider the below table, here the value x1 and x2 when fed through a function f produce a value y. The task is to find the function f, which would fit the labeled data. What we mean by fitting the labeled data is that the function f is able to predict the value y with minimal error. Once we find the function f, we can use the same function to predict unknown y for x‘s.

modeltime.png

In the above table is your labeled data set where X = {x1 ,...

Continue reading →


What is Machine Learning?

Wikipedia - Machine Learning

Machine Learning is a sub-field of Artificial Intelligence.

Arghhh!! Now what is Artificial Intelligence(AI)? Wiki says “AI is intelligence exhibited by machines”.
So Machine Intelligence is AI and Intelligence comes through learning - which means Machine Learning and so now we are in a loop.
To give a more subtle definition, AI is a branch of Computer Science concerned with making computers think like humans.

Human - a skillful mammal

Humans can reason unconsciously. Lets take an example of an art expert trying to identify whether a painting is fake or real. But when asked how he predicted it, many times the answer would be “I don’t know”, “Intuition”, etc.

Psychological studies have shown that when a mammal example a dog is trained with sufficient sample it can learn things from the sample. Example, say everyday before offering food to you dog you...

Continue reading →