You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: evaluate_regression_results.m
    path of file: ./repos/OpenFace/model_training/AU_training/experiments/training_code
    
    the code of the file until where you have to start completion: function [ accuracies, F1s, corrs, ccc, rms, classes ] = evaluate_regression_results( labels, ground_truth )
%EVALUATE_CLASSIFICATION_RESULTS Summary of this function goes here
%   Detailed explanation goes here

    classes = sort(unique(ground_truth));
    accuracies = zeros(numel(classes),1);

    
function [ accuracies, F1s, corrs, ccc, rms, classes ] = evaluate_regression_results( labels, ground_truth )
%EVALUATE_CLASSIFICATION_RESULTS Summary of this function goes here
%   Detailed explanation goes here

    classes = sort(unique(ground_truth));
    accuracies = zeros(numel(classes),1);
    F1s = zeros(numel(classes),1);
    
    corrs = corr(labels, ground_truth);
    
    rms = sqrt(mean((labels-ground_truth).^2));
        
    std_g = std(ground_truth);
    std_p = std(labels);
    
    ccc = 2 * corrs * std_g * std_p / (std_g^2 + std_p^2 + (mean(labels) - mean(ground_truth))^2);
    
    % the label is taken to belong to a class it is closest to
    label_dists = zeros(numel(labels), numel(classes));
    
    for i=1:numel(classes)
        label_dists(:,i) = abs(labels - classes(i));
    end