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: TrainPatchExperts.m
    path of file: ./repos/OpenFace/model_training/CCNF/patch_experts/svr_training
    
    the code of the file until where you have to start completion: function [correlations, rms_errors, patch_experts, visi_index, centres, normalisation_options] ...
    = TrainPatchExperts(trainingLoc, view, scale, sigma, patch_type, ratio_neg, num_samples, varargin)
	
    % Training patch experts for all of the landmarks for a particular view
    % and scale
    
    % Get the training parameters
    normalisation_options = Parse_settings( sigma, patch_type, ratio_neg, num_samples, varargin{:});
    

    
function [correlations, rms_errors, patch_experts, visi_index, centres, normalisation_options] ...
    = TrainPatchExperts(trainingLoc, view, scale, sigma, patch_type, ratio_neg, num_samples, varargin)
	
    % Training patch experts for all of the landmarks for a particular view
    % and scale
    
    % Get the training parameters
    normalisation_options = Parse_settings( sigma, patch_type, ratio_neg, num_samples, varargin{:});
    
    % Load the training data
    if(sum(strcmp(varargin,'data_loc')))       
        ind = find(strcmp(varargin,'data_loc')) + 1;
        data_loc = varargin{ind};
        data_loc = sprintf(['%s/' data_loc '%s_%s.mat'], trainingLoc, num2str(scale), num2str(view));
    else        
        data_loc = sprintf('%s/wild_%s_%s.mat', trainingLoc, num2str(scale), num2str(view));
    end