Menu bar

11/09/2021

Interview Questions

1. Difference between predict and predict_proba

predict_proba() will give out the probabilities 
predict() will give the class value.

Class value can be used wherever the evaluation metric is accuracy, recall, precision ...

Whereas probabilities can be used wherever the evaluation metric is AUC, ROC_AUC, MSE, MAE, RMSE ...

2. If we have no target variable, can we apply Feature Selection before the clustering of a numerical dataset?

No. Feature selection requires a target.

You can use unsupervised methods to remove redundant inputs.

I think by unsupervised you mean no target variable. In that case you cannot do feature selection. But you can do other things, like dimensionality reduction, e.g. SVM and PCA.


3. Difference between RFE and SelectFromModel in Scikit-Learn

They effectively try to achieve the same result but the methodology used by each technique varies a little.

RFE removes least significant features over iterations. So basically it first removes a few features which are not important and then fits and removes again and fits. It repeats this iteration until it reaches a suitable number of features.

SelectFromModel is a little less robust as it just removes less important features based on a threshold given as a parameter. There is no iteration involved.


4. What is the definition of one-stage vs. two-stage object detectors?

My understanding is that two stage object detectors first find a region of interest, and then this cropped region is used for classification.

There are mainly two types of state-of-the-art object detectors. On one hand, we have two-stage detectors, such as Faster R-CNN (Region-based Convolutional Neural Networks) or Mask R-CNN, that (i) use a Region Proposal Network to generate regions of interests in the first stage and (ii) send the region proposals down the pipeline for object classification and bounding-box regression. Such models reach the highest accuracy rates, but are typically slower. 

On the other hand, we have single-stage detectors, such as YOLO (You Only Look Once) and SSD (Singe Shot MultiBox Detector), that treat object detection as a simple regression problem by taking an input image and learning the class probabilities and bounding box coordinates. Such models reach lower accuracy rates, but are much faster than two-stage object detectors.



No comments:

Post a Comment