|
Hello,
we are searching for a statistical programmer able to translate Matlab-
into R-Code.
The code looks like this:
% Calibration by means of Platt Scaling
classdef CalibratorPlatt<Calibrator
methods
% Constructor
function C = CalibratorPlatt(varargin)
C = C@Calibrator(varargin{:});
end
% Employ a trained calibration model to transform scores (i.e.
% uncalibrated, continuous class predictions)
function phat = Calibrate(C, decision_values, model, varargin)
% Select calibration model to use
if nargin ==2, model = C.Model; end
% Compute probability estimates (assuming the LibSVM
% implementation of Platt Scaling)
fApB = decision_values*model(1)+model(2);
phat = zeros(length(decision_values),1);
idx = fApB>=0;
phat(idx) = exp(-fApB(idx))./(1+exp(-fApB(idx)));
phat(~idx) = 1./(1+exp(fApB(~idx)));
end
% Construct a calibration model from training data
function cmodel = BuildModel(C, scores, y)
[a b]= C.PlattScale(scores, y);
cmodel = [a b];
end
We pay 150 RMB and the opportunity for much more projects.
联系方式 681497或者邮箱wjjsummer@163.com
|
|