Last active
August 2, 2023 21:25
-
-
Save gravityfargo/cdc64b54575b15a7cd05b53e8ee00914 to your computer and use it in GitHub Desktop.
ECE498 Matlab Graph - Figure 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Normalize the data to percentage of maximum value | |
nathan_training_error = nathan_training_error / max(nathan_training_error) * 100; | |
nathan_testing_error = nathan_testing_error / max(nathan_testing_error) * 100; | |
nathan_validation_error = nathan_validation_error / max(nathan_validation_error) * 100; | |
asmaa_training_error = asmaa_training_error / max(asmaa_training_error) * 100; | |
asmaa_testing_error = asmaa_testing_error / max(asmaa_testing_error) * 100; | |
asmaa_validation_error = asmaa_validation_error / max(asmaa_validation_error) * 100; | |
joseph_training_error = joseph_training_error / max(joseph_training_error) * 100; | |
joseph_testing_error = joseph_testing_error / max(joseph_testing_error) * 100; | |
joseph_validation_error = joseph_validation_error / max(joseph_validation_error) * 100; | |
% Rest of the code is same | |
% Plot the data | |
% Training Error | |
figure | |
subplot(3,1,1) | |
scatter(ratios, nathan_training_error, 'r', 'filled') | |
hold on | |
scatter(ratios, asmaa_training_error, 'g', 'filled') | |
scatter(ratios, joseph_training_error, 'b', 'filled') | |
% Add trendlines | |
plot(ratios, nathan_training_error, 'r') | |
plot(ratios, asmaa_training_error, 'g') | |
plot(ratios, joseph_training_error, 'b') | |
% Customize the plot | |
title('Training Error (Normalized)') | |
legend('Nathan', 'Asmaa', 'Joseph') | |
ylabel('Error (%)') | |
grid on | |
% Testing Error | |
subplot(3,1,2) | |
scatter(ratios, nathan_testing_error, 'r', 'filled') | |
hold on | |
scatter(ratios, asmaa_testing_error, 'g', 'filled') | |
scatter(ratios, joseph_testing_error, 'b', 'filled') | |
% Add trendlines | |
plot(ratios, nathan_testing_error, 'r') | |
plot(ratios, asmaa_testing_error, 'g') | |
plot(ratios, joseph_testing_error, 'b') | |
% Customize the plot | |
title('Testing Error (Normalized)') | |
legend('Nathan', 'Asmaa', 'Joseph') | |
ylabel('Error (%)') | |
grid on | |
% Validation Error | |
subplot(3,1,3) | |
scatter(ratios, nathan_validation_error, 'r', 'filled') | |
hold on | |
scatter(ratios, asmaa_validation_error, 'g', 'filled') | |
scatter(ratios, joseph_validation_error, 'b', 'filled') | |
% Add trendlines | |
plot(ratios, nathan_validation_error, 'r') | |
plot(ratios, asmaa_validation_error, 'g') | |
plot(ratios, joseph_validation_error, 'b') | |
% Customize the plot | |
title('Validation Error (Normalized)') | |
legend('Nathan', 'Asmaa', 'Joseph') | |
xlabel('Ratio') | |
ylabel('Error (%)') | |
grid on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment