Home > @SVMRegressor > learn.m

learn

PURPOSE ^

learning function for LSRegressor

SYNOPSIS ^

function [rg] = learn(rg, dataset, targets, weights)

DESCRIPTION ^

   learning function for LSRegressor

   Inputs:
       reg : regressor instance
       dataset: examples for training the regressor.
       targets: target regressor output
       weights: data points weights

   Outputs:
       reg: trained regressor

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [rg] = learn(rg, dataset, targets, weights)
0002 %   learning function for LSRegressor
0003 %
0004 %   Inputs:
0005 %       reg : regressor instance
0006 %       dataset: examples for training the regressor.
0007 %       targets: target regressor output
0008 %       weights: data points weights
0009 %
0010 %   Outputs:
0011 %       reg: trained regressor
0012 
0013 
0014 rg.svmModel = svmtrain(weights, targets, dataset,'-s 3 -t 0 -q 1');
0015 
0016 rg.weights = (rg.svmModel.sv_coef' * full(rg.svmModel.SVs));
0017 rg.weights = [rg.weights  -rg.svmModel.rho];
0018

Generated on Sun 29-Sep-2013 01:25:24 by m2html © 2005