In: Computer Science
a) Give real life examples of Bias & Variance
b) For any given dataset, different sets of weights in SoftMax may give zero hinge loss during training. Which sets of weights would you prefer & why? Which changes would you make in SoftMax classification algorithm to enforce those preferences?
c) Do you think SoftMax is better than SVM in terms of performance? Briefly explain
d) Write a scenario where using SVM might be a better option than SoftMax. Hint: think with respect to dataset
e) List down three applications of Apriori algorithm.
A.
. Lets understand bias and variance with an example :
For example, a person Mr. Z goes for an interview but the interviewer asked him very advance questions which he couldn't clear. So he came back home with sad face. His wife said : No worries, you will clear tomorrow. Considering this situation in which wife never tells him to take various factors like stidying more etc, gives a bias reply that he will clear.
This is known as BiAS. Example : If we predict a stock price, without consideing any major factor, we give a Bias decision and might lead to bias error.
VARIANCE :
In the above example, there might be two sitiations :
1. Mr. Z doesn't know hight level questions.
2. Interviewer doesn't know low level questions.
If we consider the situation in detail, we may arise various factors that would help better in prediction. This is known as Variance.
Example : If we give stock price, consideing various factors like previous data, spread of data etc, then we are using Variance.
B) Whwnever softmax classification interprets the scores as unnormalized, this zero hinge loss occurs. SO, In this situation, softmax has to be normalized so that hinge loss doesnot give zero irrespective of weights. In this case, weights would be penalized more leading to smaller weights.
C) Do you think SoftMax is better than SVM in terms of performance?
According to me, if we talk about practical use case, SVM has a more local objective, now this can be a bug for some and a feature for some.
D) Scenario where SVM was better :
Example : Let's consider a score [10,-1,3]. Here the first class is correct. SVM will see the first class already has a higehr score, so, it will give the loss as Zero. SVM doesnot worry about individual scores. So, scenarios [10,-99,-99] are similar to [10,9,9] for SVM.
Consider, Softmax : It is never happy with the scores it produces.It will always give higher probablity to correct class and lwoer probability to the incorrect ones. Not required in this situation.
Example, a classifies would be happy spending mroe time on a difficult problem rather than calculating probabilities again and again.
So, here SVM is better.
E) three applications of Apriori algorithm.:
Apriori is used to determne the most frequent item in the transaction:
1. database having transactions and names of the items, we can identify
2. Super market tracks the database of the transaction with the help of Apriori
3. Online e- commerce tracks the frequentlt bought items using this,
Hope it help!
Please upvote if you like it.
You can comment in case of any issue.
Thanks!