top of page

Answer the following for 5-fold cross validation on a training data set of 45 tuples:(i) How many rounds of learning will be performed?(ii) State the size of the training and testing set for eac...

The question given to us is:

Answer the following for 5-fold cross validation on a training data set of 45 tuples:

(i) How many rounds of learning will be performed?

(ii) State the size of the training and testing set for each round of learning.

(iii) How would the accuracy of the classifier be calculated in 5-fold cross validation?


Let us solve this step-by-step.


(i) In 5-fold cross validation, the entire dataset is divided into 5 equally sized folds. Each fold is used once as a test set while the remaining 4 folds form the training set. Therefore, there will be 5 rounds of learning.


(ii)

Given a dataset of 45 tuples:

  • Each fold will consist of 45/5​=9 tuples.

  • In each round, the training set will consist of the data from 4 folds, and the testing set will consist of the data from the remaining fold.

So, for each round:

  • The training set will have 4×9=36 tuples.

  • The testing set will have 9 tuples.


(iii)

The accuracy of the classifier in 5-fold cross validation is calculated as follows:

  1. Perform 5 Rounds of Learning:

  • In each round, train the classifier on the training set (36 tuples) and test it on the testing set (9 tuples).

  • Calculate the accuracy for each of the 5 rounds. The accuracy for a round is the proportion of correctly classified instances out of the total instances in the test set.

  1. Calculate the Average Accuracy:

  • After obtaining the accuracy for each of the 5 rounds, compute the overall accuracy by taking the average of these 5 accuracy values.

Formally, if Ai is the accuracy in the i-th round, then the overall accuracy A is given by:


46 views1 comment

1 comentário


Convidado:
05 de jun.

Please post all the answers of the Machine Learning - B.Sc. (Hons.) Computer Science - Delhi University 2023 Question Paper

Curtir
bottom of page