A program to recognize and reward our most engaged community members
Calculate the correlation between the given attribute and the predictions. Make sure that the* the predictions are set in a one-vs-all fashion for multiclass problems. It uses the confidence* for the class to correlated with.** For nominal attributes we just into 1 (same value as the one predicted) vs. 0 (different value).** Please note that this method artificially sets the standard deviation to a small value in case* of all labels being the same (which can happen if the model is really confident in certain* areas). First, we artificially change one random label in case they are all the same.* Then we also capture the case that the standard deviations are still 0 by replacing it* by a small value then.** These small changes will avoid that all correlations for all attributes would be NaN* otherwise. Because of those changes, this method should not be used for calculating* regular correlations.