Nand Kishor Contributor

Nand Kishor is the Product Manager of House of Bots. After finishing his studies in computer science, he ideated & re-launched Real Estate Business Intelligence Tool, where he created one of the leading Business Intelligence Tool for property price analysis in 2012. He also writes, research and sharing knowledge about Artificial Intelligence (AI), Machine Learning (ML), Data Science, Big Data, Python Language etc... ...

Full Bio 
Follow on

Nand Kishor is the Product Manager of House of Bots. After finishing his studies in computer science, he ideated & re-launched Real Estate Business Intelligence Tool, where he created one of the leading Business Intelligence Tool for property price analysis in 2012. He also writes, research and sharing knowledge about Artificial Intelligence (AI), Machine Learning (ML), Data Science, Big Data, Python Language etc...

3 Best Programming Languages For Internet of Things Development In 2018
339 days ago

Data science is the big draw in business schools
512 days ago

7 Effective Methods for Fitting a Liner
522 days ago

3 Thoughts on Why Deep Learning Works So Well
522 days ago

3 million at risk from the rise of robots
522 days ago

Top 10 Hot Artificial Intelligence (AI) Technologies
310263 views

Here's why so many data scientists are leaving their jobs
80715 views

2018 Data Science Interview Questions for Top Tech Companies
76476 views

Want to be a millionaire before you turn 25? Study artificial intelligence or machine learning
75957 views

Google announces scholarship program to train 1.3 lakh Indian developers in emerging technologies
61311 views

My Take on Microsoft AI Interview Questions with Interactive Code - Part 1

By Nand Kishor |Email | Apr 6, 2018 | 15600 Views

So I found this amazing blogger Vimarsh Karbhari and he have some amazing stuffs on his blog! So please check him out, also he is the creator of Acing AI. And today, I'll try to answer his Microsoft AI Interview question from this blog. And please note that my solution would be not optimized, and I am always open to learning and growing.

Also, I am not going to answer question in numeric order.

Merge k (in this case k=2) arrays and sort them.

For this I would use Bubble sort, I know that this is not the most efficient sorting algorithm, but it is easy to describe and implement.

What are the different cost function / regularization metrics L1 and L2?

I would say, L1 is absolute difference between predicted value and ground truth value. For L2 I would say it is the Mean Square error difference. I implemented and compared variety of combinations of L1 and L2 cost function with regularization in this post. Also, L1 regularizer is Sum of absolute values in the weight, and L2 is sum of square value of all the weights.

How do you find percentile? Write the code for it.

For this lets just do a simple question from Math is Fun. Given the above table lets get the time when the 30% people have visited the mall.

I would get the 30% percentile first and get the average time value, obviously this is not the most accurate answer as seen below. But we can get the general feel.

What is a difference between good and bad Data Visualization?

Okay for this we can have many different answer, my answer would be something like when we do not properly handle outliers and visualize them.

Lets say we have an array of numbers and we can see there is a huge number (7777) among smaller numbers. When we visualize this array all together it looks something like below.

Right Image  - Original Image
Middle Image - Normalized value 
Left Image - Standardized value

As seen above, even if we normalize or standardize the values, the created plot is very skewed. I covered normalization, standardization and batch normalization in this post.

How to compute an inverse matrix faster by playing around with some computational tricks?

I actually have no idea what the exact answer is, but upon research I found the method called Gauss-Jordan method, however it is very complex. (to see the implementation in python please click here.) And I was manage to find a simpler solution as seen below and implemented this method.



Define variance
In my words, I would describe variance as the sum of square difference of each data point, respect the mean of whole data. In other words, are there a lot of variety in the data. And actually, Math is Fun have an amazing diagram describing this.

Interactive Code

For Google Colab, you would need a google account to view the codes, also you can't run read only scripts in Google Colab so make a copy on your play ground. Finally, I will never ask for permission to access your files on Google Drive, just FYI. Happy Coding!

To access the code on Google Colab, please click here.

Source: TDS