% this fnc

function activePredictions = activeRandomPredict(myActuals, neighborMatrix,popIndex,labelCount,testIndices,myDistMatrix)

testSize = size(testIndices,2);                     % define instance size
activePredictions = -1 * ones(1,testSize);          % this keeps the predictions for 1nn 
                                                    % when i instances are labeled
  
% generate an active-train set, that keeps labeled instances only   
activeTrainSet = zeros(labelCount,size(neighborMatrix,2));
actualsActiveTrainSet = zeros(labelCount,1);
for i = 1:labelCount
%     activeTrainSet(i,:) = myDistMatrix(popIndex(i),:);
    actualsActiveTrainSet(i) = myActuals(popIndex(i));
end

% just return a random prediction from the active train set
for i = 1:testSize
    % for each instance, chooose closest neighbor from active-train set
    activePredictions(i) = actualsActiveTrainSet(randi(size(actualsActiveTrainSet,1),1,1));
end


end