Posts

Showing posts with the label SGD Classifier

Training a Binary Classifier

Image
  Training a Binary Classifier ·        Let’s simplify the problem for now and ü   only try to identify one digit —for example, the number 5 . ·        This “ 5-detector ” will be an example of a binary classifier , ü   capable of distinguishing between just two classes, ·        5 ·        not-5.   ü   Let’s create the target vectors for this classification task : y_train_5 = ( y_train == 5 ) # True for all 5s, False for all other digits y_test_5 = ( y_test == 5 ) ·        Now let’s pick a classifier and train it . ·        A good place to s tart is with a ü   Stochastic Gradient Descent (SGD) classifier , ·        using Scikit-Learn’s SGDClassifier class. ·        This classifier has the advantage of being capable of handling very large datasets efficiently. ·        This is in part because SGD deals with training instances independently , one at a time. ü   Let’s create an SGDClassifier and train it on the whole training set: fr

Machine Learning - Classification MCQs

 Machine Learning - Classification - MCQs 1.      By default, SGD classifier follows this strategy for multi-class classification: Top of Form A)    OvO strategy B)     OvA strategy C)     Both D)    None Ans: B 2.      SGD Classifiers and Linear Classifiers are strictly A)    Binary Classifier B)     Multiclass classifier C)     Both D)    None      Ans: A 3.      The greater the value for ROC AUC, better the model: Top of Form A)    True B)     False Bottom of Form Ans: A 4.      The maximum value of the ROC AUC is Top of Form A)     0.8 B)      0.9  C)      1 D)     0.7 Bottom of Form Ans: C 5.      Recall can be increased by increasing the decision threshold. True or False Top of Form ? A)     False B)      True Ans: A 6.      Precision can be increased by increasing the decision threshold. True or False? A)    True B)     False Ans: A   7.      Which of these is a good measure to decide which threshold to use?