Question: Please kindly give MATLAB code for the following 5. Create two variables to store the means for each of our score distributions: imposterScoreMean = 22;

Please kindly give MATLAB code for the following

5. Create two variables to store the means for each of our score distributions:

imposterScoreMean = 22; genuineScoreMean = 30;

6. Create two variables that will store the standard deviations: imposterScoreStdDev = 2;

genuineScoreStdDev = 2;

7. Create two variables that represent the number of genuine and imposter scores:

numberOfGenuineScores = 10000; numberOfImposterScores = 1000000;

8. Create a variable to be used later for plotting and histogram binning: xRange = [0:.01:1];

9. Create 10,000 random genuine (match) scores with a mean of 22 and a standard

deviation of 2

(???? = 22 ???? = 2) genuineScores = random('Normal',genuineScoreMean, genuineScoreStdDev,1,

numberOfGenuineScores);

10. Create 1,000,000 random imposter (non-match) scores with a mean of 30 and a standard

deviation of 2 (???? = 30, ???? = 2).

imposterScores = random('Normal',imposterScoreMean, imposterScoreStdDev,1, numberOfImposterScores);

11. Find the minimum and maximum of all scores: minAllScores = min(min(genuineScores),

min(imposterScores)); maxAllScores = max(max(genuineScores), max(imposterScores));

12. Min-Max normalization: genuineScores = (genuineScoresminAllScores)/((maxAllScores)-

minAllScores); imposterScores = (imposterScoresminAllScores)/(maxAllScores-

minAllScores);

13. Create the histograms for the genuine and imposter scores: histogramGenuine =

histc(genuineScores, xRange); histogramImposter = histc(imposterScores, xRange);

14. Normalize each of the histograms independently of each other:

histogramGenuine = histogramGenuine/numberOfGenuineScores;

histogramImposter = histogramImposter/numberOfImposterScores;

15. Generate a plot for each of the genuine and imposter scores on the same figure:

figure('Name', 'Genuine and Imposter Normalized Histograms', 'NumberTitle', 'off'); title('Histogram of

Genuine and Imposter Scores'); plot(xRange,histogramGenuine,'b'); hold on;

xlabel('Normalized Match Scores (Imposter and Genuine)', 'FontWeight',

'Bold'); plot(xRange,histogramImposter,'r'); ylabel('Probability p(s)',

'FontWeight', 'Bold'); legend('Genuine Scores', 'Imposter Scores'); hold off;

16. Create a vector that will store the False Reject Rate as the threshold increases from 0 to 1: falseRejectRate = cumsum(histogramGenuine);

17. Create a vector that will store the False Accept Rate as the threshold increases from 0 to 1: falseAcceptRate = 1 - cumsum(histogramImposter);

18. Create a vector that will store the Genuine Accept Rate as the threshold increases from

0 to 1:

genuineAcceptRate = 1 - cumsum(histogramGenuine);

19. Convert the last 3 variables to a percentage value instead of a decimal value:

falseRejectRate = falseRejectRate * 100; falseAcceptRate = falseAcceptRate * 100; genuineAcceptRate =

genuineAcceptRate * 100;

20. Plot the FAR vs. FRR in linear scale: figure('Name', 'ROC Curve: FRR vs. FAR (linear scale)',

'NumberTitle', 'off'); plot(falseAcceptRate, falseRejectRate); xlabel('False Accept Rate'); ylabel('False Reject

Rate'); title('Roc curve (linear scale)');

21. Plot the FAR vs. GAR in logarithm scale on the x-axis: figure('Name', 'ROC Curve: GAR vs. FAR

(logarithmic scale)', 'NumberTitle', 'off'); semilogx(falseAcceptRate, genuineAcceptRate); xlabel('False

Accept Rate (%)','FontWeight','bold'); ylabel('Genuine Accept Rate (%)', 'FontWeight', 'bold'); xlim([0 100]);

title('ROC curve (log scale)');

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!