DLWP Assignment 2
DLWP Assignment 2
11. Write a Python code to find the mean square error for the given value from scratch:
y true = [4.5,1.5,11.4,13.3,11.0,10.9]
y pred = [3.4,2.1,12.1,10.2,12.0,14.2]
12. Write a Python code to find the mean absolute error for the given value from scratch:
y true = [4.5,1.5,11.4,13.3,11.0,10.9]
y pred = [3.4,2.1,12.1,10.2,12.0,14.2]
13. Write a Python code to find binary cross entropy loss for the given value:
y true = [1, 0, 1, 1]
y pred = [0.9, 0.2, 0.8, 0.7]
14. Write a Python code to find multiclass cross-entropy loss for the given data values:
y true = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] # One-hot encoded
y pred = [[0.7, 0.2, 0.1], [0.1, 0.8, 0.1], [0.2, 0.1, 0.7]]