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: InfFS_S.m
    path of file: ./repos/Infinite-Feature-Selection
    
    the code of the file until where you have to start completion: function [RANKED, WEIGHT, SUBSET] = InfFS_S(X, Y , alpha)
% [RANKED, WEIGHT, SUBSET ] = InfFS_S( X, Y, alpha ) computes ranks and weights
% of features for input data matrix X and labels Y using Inf-FS algorithm.
%
% Version 1.0, June 2020.
%
% INPUT:
%
% X is a T by n matrix, where T is the number of samples and n the number
% of features.
% Y is column vector with class labels (e.g., -1, 1)
% alpha: mixing coefficient in range [0,1]
%
% OUTPUT:
%
% RANKED are indices of columns in X_train ordered by attribute importance,
% meaning RANKED(1) is the index of the most important/relevant feature.
% WEIGHT are attribute weights with large positive weights assigned
% to important attributes.
% SUBSET is the selected subset of features
%  ------------------------------------------------------------------------
% Please consider to cite:

%[1] Roffo, G., Melzi, S., Castellani, U., Vinciarelli, A., and Cristani, M., 2020. Infinite Feature Selection: A Graph-based Feature Filtering Approach. In the IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).

%[1] Roffo, G., Melzi, S., Castellani, U. and Vinciarelli, A., 2017. Infinite Latent Feature Selection: A Probabilistic Latent Graph-Based Ranking Approach. arXiv preprint arXiv:1707.07538.

%[2] Roffo, G., Melzi, S. and Cristani, M., 2015. Infinite feature selection. In Proceedings of the IEEE International Conference on Computer Vision (pp. 4202-4210).

%  ------------------------------------------------------------------------

fprintf('\n+ Feature selection method: Inf-FS Supervised (2020)\n');

N = size(X,2);

    
function [RANKED, WEIGHT, SUBSET] = InfFS_S(X, Y , alpha)
% [RANKED, WEIGHT, SUBSET ] = InfFS_S( X, Y, alpha ) computes ranks and weights
% of features for input data matrix X and labels Y using Inf-FS algorithm.
%
% Version 1.0, June 2020.
%
% INPUT:
%
% X is a T by n matrix, where T is the number of samples and n the number
% of features.
% Y is column vector with class labels (e.g., -1, 1)
% alpha: mixing coefficient in range [0,1]
%
% OUTPUT:
%
% RANKED are indices of columns in X_train ordered by attribute importance,
% meaning RANKED(1) is the index of the most important/relevant feature.
% WEIGHT are attribute weights with large positive weights assigned
% to important attributes.
% SUBSET is the selected subset of features
%  ------------------------------------------------------------------------
% Please consider to cite:

%[1] Roffo, G., Melzi, S., Castellani, U., Vinciarelli, A., and Cristani, M., 2020. Infinite Feature Selection: A Graph-based Feature Filtering Approach. In the IEEE Transactions on Pattern Analysis and Machine Intelligence (TPAMI).

%[1] Roffo, G., Melzi, S., Castellani, U. and Vinciarelli, A., 2017. Infinite Latent Feature Selection: A Probabilistic Latent Graph-Based Ranking Approach. arXiv preprint arXiv:1707.07538.

%[2] Roffo, G., Melzi, S. and Cristani, M., 2015. Infinite feature selection. In Proceedings of the IEEE International Conference on Computer Vision (pp. 4202-4210).

%  ------------------------------------------------------------------------

fprintf('\n+ Feature selection method: Inf-FS Supervised (2020)\n');

N = size(X,2);

eps = 5e-06 * N;

factor = 1 - eps; % shrinking 

%% Building the Graph
[A,rho] = getGraphWeights(full(X), Y, alpha, eps );

%% Letting paths tend