Hey, sorry bout that, Forgot I made this post (and then subsequently my password). The way I’m implementing my cost matrix is not by building it into the loss function but instead by using the method defined in Bishops book “Pattern Recognition And Machine Learning”
Bishop gives us this formula to implement a cost matrix:

This implementation effectively balances a softmax output of a neural network with the cost associated with misclassification.
e.g. lets say I have some probability distribution (0.35, 0.65) that is the softmaxed output from my network, so in this case we’re predicting 35% faulty and 65% not faulty. However, using Bishops sum I would get the Expected cost values of ((0.35 * 0 + 0.35 * 1), (10 * 0.65 + 0.65 * 0)) = (0.35, 6.5).
From these two expected cost values, 0.35 and 6.5, we choose the one that gives us the lowest expected cost, in this cause we predict faulty.
My explanation is likely rather poor, I believe Bishop talks about this in chapter 1.52 if you want to check that out.