## 3 Materials and Methods
### Class Rebalanced Noise Logit Perturbation for DNNs  
In the context of imbalanced datasets, we seek to introduce noise that has the effect of rebalancing the logits to counter the effects that dominating majority classes have over the minority classes. Therefore, we propose the introduction of noise to the logits in the form of weight vectors that amplify logits from minority classes while suppressing the logits from majority classes. To achieve this effect, we replace the noise vector in Equation (3) with a class rebalancing weight vector \(\mathbf{q}\). The individual \(q_{i}\) elements in vector \(\mathbf{q}\) correspond to inverse class frequencies meant to rebalance class logits by assigning higher weights to logits from the minority classes and lower weights to logits from the majority classes. Unlike temperature scaling, perturbation noise from weight vector \(\mathbf{q}\) does not uniformly soften the class probabilities, potentially altering the maximum of the softmax function. The modified logit perturbation equation is as follows:  
\[\mathbf{z}_{\varepsilon}=(\mathbf{\bar{1}}+\mathbf{\varepsilon})\odot\mathbf{z},\quad\{( \varepsilon_{1},\dots,\varepsilon_{C})\in\mathbb{R}^{C}:\varepsilon_{i}=(q_{ i}-1)\ \forall i\} \tag{4}\]  
For our implementation, we begin by generating a set of logit weights, hyperparameter \(\mathbf{\tilde{q}}\), that represents an ideal case scenario for the classifier given the imbalanced dataset. This is the noise vector, which we term the _ideal logit weights_. To this end, we argue that by generating an _ideal logit weights_ vector \(\mathbf{\tilde{q}}\) that is reflective of the level of imbalance in the dataset, we can implement a class rebalanced logit output layer to help bias the DNNs inference in favor of the target classes belonging to the minority. Therefore, we propose two methods as guidelines for generating the _ideal logit weights_ vector \(\mathbf{\tilde{q}}\); (1) relative likelihood approach and (2) effective number of samples approach. 1 Relative Likelihood Approach: To generate the _ideal logit weights_ vector, we go back to the preliminary stage of dataset exploration. During this stage, we examine the target class distribution to infer the actual extent of dataset imbalance. We note that our problem setting is such that the samples of interest almost always fall in the minority classes. With this information, we can formulate a weight vector representing the classifier ideal case scenario where minority class samples are given more priority over the majority class samples. Determination of the _ideal logit weights_ vector involves carrying out subjective judgment on each of the individual classes from the target classes to reflect our personal belief of what the precise ideal logit weight for a given target class should be. The process of carrying out subjective judgment to obtain relative class weights is the human expert input that produces logit weight vectors, applied to the DNN as hyperparameters. Ideally, expert elicitation in industrial settings comes from experienced human experts (manufacturers)who understand what target classes are more important than others and their desired priority levels. To enable us to maintain the correlation of magnitudes between weights across all classes, we choose to represent the _ideal logit weights_ vector as a proper probability distribution. Therefore, to generate the weight vector as a probability distribution, we use the relative likelihood approach [56] (p. 64), a technique from the method; subjective determination of prior density. This technique rates the class probabilities relative to each other in terms of \"most likely\" and \"least likely\". For multiclass problem settings, one of the classes could be chosen as the point of reference and the others compared to it in terms of the relative likelihoods such as half as likely, twice as likely, \(n\) times as likely, where \(n\in\mathbb{R}^{+}\), etc.