function [ pred ] = pnBRFApply(model, X)
%PNBRFAPPLY	Calculate predictions on data using provided model
%	[ pred ] = pnBRFApply(model, X) calculates predictions on the
%	data using model, which is assumed to be of a certain form compatible
%	with this function.
%
%	Inputs:
%		X       - NxD double matrix of data. May contain NaNs for missing
%		values. This should be extracted by the associated
%		pnBRFFeatures function.
%   
%	Outputs:
%		pred    - Predictions for the given data set - vector sized Nx1
%		
%	Example:
%       % Develop and evaluate a model on the training data
%		bpath = './set-a/';
%		data = pnLoadTextFilesCell(bpath);
%		[targets,target_header] = pnLoadTargetFile('Outcomes-a.txt');
%		data_target=targets(:,6);
%       data_used = pnExtractFeaturesNic(data);
%       
%       [X,header] = pnBRFFeatures(data);
%       model = pnBRFDevelop(X,data_target);
%		pred = pnBRFApply(model, X);
%
%	See also PNDEVELOPMODELS PNBRFDEVELOP PNBRFFEATURES

%	References:
%		Physionet Challenge 2012

%	Copyright 2012 Nic Johnson

%	$LastChangedBy: alistair $
%	$LastChangedDate: 2012-08-25 00:44:01 -0400 (Sat, 25 Aug 2012) $
%	$Revision: 153 $
%	Originally written on GLNXA64 by Alistair Johnson, 15-May-2012 11:25:16
%	Contact: alistairewj@gmail.com

%=== Calculate model predictions
pred = NicForest_apply_quick(model , X );

end