Author Archives: Aakashpydi

Choosing a Classifier from SKLearn

Gaussian Naive Bayes
A simple algorithm based on bayes rule. The “naive” aspect of this classifier is that it assumes independence between every pair of features (hardly ever true in practice). 
For the adjacent formula, y is a given class variable and the x variables represent the features. P(y) is the probability of observing class y in the training set. P(x_vector | y) is the probability of observing the specific x_vector given the class y. Note that the product over all conditionals P(x_i|y) is only possible because of our naive assumption. The final equation indicates how the classifier finds the class to predict.
Advantages-> (1) work pretty well in practice despite naive assumption, (2) can estimate the necessary parameters with relatively small amount of training data, (3) “can be extremely fast compared to more sophisticated methods” (source)
Disadvantages-> (1) more sophisticated models that are better suited for data which are trained well, can outperform NB models, (2) “known to be a bad estimator, so the probability outputs are not taken too seriously” (source) (3) can be particularly ineffective compared to more sophisticated models when there are significant dependent relations between pairs of features.
Example Real World Application->(1) document classification, (2) spam filtering
Continue reading

Using Pandas for Evaluating Classifiers

I’m working on evaluating the performance of a few classifiers on a certain data set using python. Recording the basics of the python code I used here for future reference.

Pandas Data Frames are two dimensional labeled data structures which columns. Its the perfect data structure to represent a data set- with each column representing a different feature.

Continue reading

Dealing with Despair: Existentialism and Education

For a greater part of my later years in high school and my initial years of college I suffered from a bout of existential despair. There were protracted periods of time when questioning my world view and my way of life resulted in an overwhelming sense of futility and insignificance. I was so overwhelmed as an angst ridden teen that I made desperate attempts at suspending introspection. Addictive gaming. Binge watching shows and movies. A couple of months of aggressive smoking. A couple of months of aggressive drinking. Obsessing over a girl. The usual suspects of teenage waywardness.

YouthKiAwaaz Link: If You’re Dealing With An Existential Crisis This Post is Definitely For You

Continue reading