本文整理汇总了C#中Encog.MathUtil.LIBSVM.svm_parameter类的典型用法代码示例。如果您正苦于以下问题:C# svm_parameter类的具体用法?C# svm_parameter怎么用?C# svm_parameter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
svm_parameter类属于Encog.MathUtil.LIBSVM命名空间,在下文中一共展示了svm_parameter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: xa68541a68dd6f460
internal xa68541a68dd6f460(svm_problem prob, svm_parameter param, sbyte[] y_)
: base(prob.l, prob.x, param)
{
this.x1e218ceaee1bb583 = new sbyte[y_.Length];
y_.CopyTo(this.x1e218ceaee1bb583, 0);
this.x1f31bf6ca58166a1 = new xb730a77005d16cc1(prob.l, (int) (param.cache_size * 1048576.0));
}
示例2: xfbfe48e5ee40f893
internal xfbfe48e5ee40f893(svm_problem prob, svm_parameter param)
: base(prob.l, prob.x, param)
{
int num;
int num2;
if (((uint) num) > uint.MaxValue)
{
goto Label_005C;
}
this.x9fc3ee03a439f6f0 = prob.l;
if ((((uint) num) - ((uint) num2)) > uint.MaxValue)
{
if ((((uint) num2) + ((uint) num)) > uint.MaxValue)
{
goto Label_0115;
}
}
else
{
goto Label_0115;
}
Label_0024:
this.x5cafa8d49ea71ea1[num2] = new float[2 * this.x9fc3ee03a439f6f0];
num2++;
Label_003D:
if (num2 < 2)
{
goto Label_0024;
}
this.xafb0a999075e2e6a = 0;
if (0 == 0)
{
return;
}
goto Label_00C0;
Label_005C:
num2 = 0;
goto Label_003D;
Label_00C0:
this.xc0c4c459c6ccbd00 = new int[2 * this.x9fc3ee03a439f6f0];
for (num = 0; num < this.x9fc3ee03a439f6f0; num++)
{
this.x32dce50116aa0f1e[num] = 1;
this.x32dce50116aa0f1e[num + this.x9fc3ee03a439f6f0] = -1;
this.xc0c4c459c6ccbd00[num] = num;
this.xc0c4c459c6ccbd00[num + this.x9fc3ee03a439f6f0] = num;
}
this.x5cafa8d49ea71ea1 = new float[2][];
goto Label_005C;
Label_0115:
this.x1f31bf6ca58166a1 = new xb730a77005d16cc1(this.x9fc3ee03a439f6f0, (int) (param.cache_size * 1048576.0));
this.x32dce50116aa0f1e = new sbyte[2 * this.x9fc3ee03a439f6f0];
goto Label_00C0;
}
示例3: xf094e3229d63c9be
internal xf094e3229d63c9be(int l, svm_node[][] x_, svm_parameter param)
{
int num;
Label_00C5:
this.xbcd9612004129925 = param.kernel_type;
Label_0075:
if ((((uint) num) | 0x80000000) != 0)
{
this.x83735b10b6a3d76d = param.degree;
do
{
this.xc7c4e9c099884228 = param.gamma;
this.x987b3666f8a37f90 = param.coef0;
if (0xff != 0)
{
this.x08db3aeabb253cb1 = (svm_node[][]) x_.Clone();
if (this.xbcd9612004129925 != 2)
{
this.x4f9e236643454e9f = null;
if (0 == 0)
{
if (0 == 0)
{
return;
}
goto Label_00C5;
}
goto Label_0075;
}
this.x4f9e236643454e9f = new double[l];
}
}
while (2 == 0);
}
for (num = 0; num < l; num++)
{
this.x4f9e236643454e9f[num] = x99240096a9e3842c(this.x08db3aeabb253cb1[num], this.x08db3aeabb253cb1[num]);
}
}
示例4: svm_check_parameter
public static String svm_check_parameter(svm_problem prob, svm_parameter param)
{
// svm_type
int svm_type = param.svm_type;
if (svm_type != svm_parameter.C_SVC && svm_type != svm_parameter.NU_SVC &&
svm_type != svm_parameter.ONE_CLASS && svm_type != svm_parameter.EPSILON_SVR &&
svm_type != svm_parameter.NU_SVR)
return "unknown svm type";
// kernel_type
int kernel_type = param.kernel_type;
if (kernel_type != svm_parameter.LINEAR && kernel_type != svm_parameter.POLY &&
kernel_type != svm_parameter.RBF && kernel_type != svm_parameter.SIGMOID)
return "unknown kernel type";
// cache_size,eps,C,nu,p,shrinking
if (param.cache_size <= 0)
return "cache_size <= 0";
if (param.eps <= 0)
return "eps <= 0";
if (svm_type == svm_parameter.C_SVC || svm_type == svm_parameter.EPSILON_SVR ||
svm_type == svm_parameter.NU_SVR)
if (param.C <= 0)
return "C <= 0";
if (svm_type == svm_parameter.NU_SVC || svm_type == svm_parameter.ONE_CLASS ||
svm_type == svm_parameter.NU_SVR)
if (param.nu < 0 || param.nu > 1)
return "nu < 0 or nu > 1";
if (svm_type == svm_parameter.EPSILON_SVR)
if (param.p < 0)
return "p < 0";
if (param.shrinking != 0 && param.shrinking != 1)
return "shrinking != 0 and shrinking != 1";
if (param.probability != 0 && param.probability != 1)
return "probability != 0 and probability != 1";
if (param.probability == 1 && svm_type == svm_parameter.ONE_CLASS)
return "one-class SVM probability output not supported yet";
// check whether nu-svc is feasible
if (svm_type == svm_parameter.NU_SVC)
{
int l = prob.l;
int max_nr_class = 16;
int nr_class = 0;
var label = new int[max_nr_class];
var count = new int[max_nr_class];
int i;
for (i = 0; i < l; i++)
{
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1042_3"'
var this_label = (int) prob.y[i];
int j;
for (j = 0; j < nr_class; j++)
if (this_label == label[j])
{
++count[j];
break;
}
if (j == nr_class)
{
if (nr_class == max_nr_class)
{
max_nr_class *= 2;
var new_data = new int[max_nr_class];
Array.Copy(label, 0, new_data, 0, label.Length);
label = new_data;
new_data = new int[max_nr_class];
Array.Copy(count, 0, new_data, 0, count.Length);
count = new_data;
}
label[nr_class] = this_label;
count[nr_class] = 1;
++nr_class;
}
}
for (i = 0; i < nr_class; i++)
{
int n1 = count[i];
for (int j = i + 1; j < nr_class; j++)
{
int n2 = count[j];
if (param.nu*(n1 + n2)/2 > Math.Min(n1, n2))
return "specified nu is infeasible";
}
}
//.........这里部分代码省略.........
示例5: svm_load_model
public static svm_model svm_load_model(StringReader fp)
{
// read parameters
var model = new svm_model();
var param = new svm_parameter();
model.param = param;
model.rho = null;
model.probA = null;
model.probB = null;
model.label = null;
model.nSV = null;
while (true)
{
String cmd = fp.ReadLine();
String arg = cmd.Substring(cmd.IndexOf(' ') + 1);
if (cmd.StartsWith("svm_type"))
{
int i;
for (i = 0; i < svm_type_table.Length; i++)
{
if (arg.IndexOf(svm_type_table[i]) != -1)
{
param.svm_type = i;
break;
}
}
if (i == svm_type_table.Length)
{
Console.Error.Write("unknown svm type.\n");
return null;
}
}
else if (cmd.StartsWith("kernel_type"))
{
int i;
for (i = 0; i < kernel_type_table.Length; i++)
{
if (arg.IndexOf(kernel_type_table[i]) != -1)
{
param.kernel_type = i;
break;
}
}
if (i == kernel_type_table.Length)
{
Console.Error.Write("unknown kernel function.\n");
return null;
}
}
else if (cmd.StartsWith("degree"))
param.degree = atof(arg);
else if (cmd.StartsWith("gamma"))
param.gamma = atof(arg);
else if (cmd.StartsWith("coef0"))
param.coef0 = atof(arg);
else if (cmd.StartsWith("nr_class"))
model.nr_class = atoi(arg);
else if (cmd.StartsWith("total_sv"))
model.l = atoi(arg);
else if (cmd.StartsWith("rho"))
{
int n = model.nr_class*(model.nr_class - 1)/2;
model.rho = new double[n];
var st = new SupportClass.Tokenizer(arg);
for (int i = 0; i < n; i++)
model.rho[i] = atof(st.NextToken());
}
else if (cmd.StartsWith("label"))
{
int n = model.nr_class;
model.label = new int[n];
var st = new SupportClass.Tokenizer(arg);
for (int i = 0; i < n; i++)
model.label[i] = atoi(st.NextToken());
}
else if (cmd.StartsWith("probA"))
{
int n = model.nr_class*(model.nr_class - 1)/2;
model.probA = new double[n];
var st = new SupportClass.Tokenizer(arg);
for (int i = 0; i < n; i++)
model.probA[i] = atof(st.NextToken());
}
else if (cmd.StartsWith("probB"))
{
int n = model.nr_class*(model.nr_class - 1)/2;
model.probB = new double[n];
var st = new SupportClass.Tokenizer(arg);
for (int i = 0; i < n; i++)
model.probB[i] = atof(st.NextToken());
}
else if (cmd.StartsWith("nr_sv"))
{
int n = model.nr_class;
model.nSV = new int[n];
var st = new SupportClass.Tokenizer(arg);
for (int i = 0; i < n; i++)
//.........这里部分代码省略.........
示例6: svm_train
//
// Interface functions
//
public static svm_model svm_train(svm_problem prob, svm_parameter param)
{
var model = new svm_model();
model.param = param;
if (param.svm_type == svm_parameter.ONE_CLASS || param.svm_type == svm_parameter.EPSILON_SVR ||
param.svm_type == svm_parameter.NU_SVR)
{
// regression or one-class-svm
model.nr_class = 2;
model.label = null;
model.nSV = null;
model.probA = null;
model.probB = null;
model.sv_coef = new double[1][];
if (param.probability == 1 &&
(param.svm_type == svm_parameter.EPSILON_SVR || param.svm_type == svm_parameter.NU_SVR))
{
model.probA = new double[1];
model.probA[0] = svm_svr_probability(prob, param);
}
decision_function f = svm_train_one(prob, param, 0, 0);
model.rho = new double[1];
model.rho[0] = f.rho;
int nSV = 0;
int i;
for (i = 0; i < prob.l; i++)
if (Math.Abs(f.alpha[i]) > 0)
++nSV;
model.l = nSV;
model.SV = new svm_node[nSV][];
model.sv_coef[0] = new double[nSV];
int j = 0;
for (i = 0; i < prob.l; i++)
if (Math.Abs(f.alpha[i]) > 0)
{
model.SV[j] = prob.x[i];
model.sv_coef[0][j] = f.alpha[i];
++j;
}
}
else
{
// classification
// find out the number of classes
int l = prob.l;
int max_nr_class = 16;
int nr_class = 0;
var label = new int[max_nr_class];
var count = new int[max_nr_class];
var index = new int[l];
int i;
for (i = 0; i < l; i++)
{
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1042_3"'
var this_label = (int) prob.y[i];
int j;
for (j = 0; j < nr_class; j++)
if (this_label == label[j])
{
++count[j];
break;
}
index[i] = j;
if (j == nr_class)
{
if (nr_class == max_nr_class)
{
max_nr_class *= 2;
var new_data = new int[max_nr_class];
Array.Copy(label, 0, new_data, 0, label.Length);
label = new_data;
new_data = new int[max_nr_class];
Array.Copy(count, 0, new_data, 0, count.Length);
count = new_data;
}
label[nr_class] = this_label;
count[nr_class] = 1;
++nr_class;
}
}
// group training data of the same class
var start = new int[nr_class];
start[0] = 0;
for (i = 1; i < nr_class; i++)
start[i] = start[i - 1] + count[i - 1];
var x = new svm_node[l][];
for (i = 0; i < l; i++)
//.........这里部分代码省略.........
示例7: svm_binary_svc_probability
// Cross-validation decision values for probability estimates
private static void svm_binary_svc_probability(svm_problem prob, svm_parameter param, double Cp, double Cn,
double[] probAB)
{
int i;
int nr_fold = 5;
var perm = new int[prob.l];
var dec_values = new double[prob.l];
// random shuffle
for (i = 0; i < prob.l; i++)
perm[i] = i;
for (i = 0; i < prob.l; i++)
{
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1042_3"'
int j = i + (int) (SupportClass.Random.NextDouble()*(prob.l - i));
do
{
int _ = perm[i];
perm[i] = perm[j];
perm[j] = _;
} while (false);
}
for (i = 0; i < nr_fold; i++)
{
int begin = i*prob.l/nr_fold;
int end = (i + 1)*prob.l/nr_fold;
int j, k;
var subprob = new svm_problem();
subprob.l = prob.l - (end - begin);
subprob.x = new svm_node[subprob.l][];
subprob.y = new double[subprob.l];
k = 0;
for (j = 0; j < begin; j++)
{
subprob.x[k] = prob.x[perm[j]];
subprob.y[k] = prob.y[perm[j]];
++k;
}
for (j = end; j < prob.l; j++)
{
subprob.x[k] = prob.x[perm[j]];
subprob.y[k] = prob.y[perm[j]];
++k;
}
int p_count = 0, n_count = 0;
for (j = 0; j < k; j++)
if (subprob.y[j] > 0)
p_count++;
else
n_count++;
if (p_count == 0 && n_count == 0)
for (j = begin; j < end; j++)
dec_values[perm[j]] = 0;
else if (p_count > 0 && n_count == 0)
for (j = begin; j < end; j++)
dec_values[perm[j]] = 1;
else if (p_count == 0 && n_count > 0)
for (j = begin; j < end; j++)
dec_values[perm[j]] = - 1;
else
{
var subparam = (svm_parameter) param.Clone();
subparam.probability = 0;
subparam.C = 1.0;
subparam.nr_weight = 2;
subparam.weight_label = new int[2];
subparam.weight = new double[2];
subparam.weight_label[0] = + 1;
subparam.weight_label[1] = - 1;
subparam.weight[0] = Cp;
subparam.weight[1] = Cn;
svm_model submodel = svm_train(subprob, subparam);
for (j = begin; j < end; j++)
{
var dec_value = new double[1];
svm_predict_values(submodel, prob.x[perm[j]], dec_value);
dec_values[perm[j]] = dec_value[0];
// ensure +1 -1 order; reason not using CV subroutine
dec_values[perm[j]] *= submodel.label[0];
}
}
}
sigmoid_train(prob.l, dec_values, prob.y, probAB);
}
示例8: solve_nu_svr
private static void solve_nu_svr(svm_problem prob, svm_parameter param, double[] alpha, Solver.SolutionInfo si)
{
int l = prob.l;
double C = param.C;
var alpha2 = new double[2*l];
var linear_term = new double[2*l];
var y = new sbyte[2*l];
int i;
double sum = C*param.nu*l/2;
for (i = 0; i < l; i++)
{
alpha2[i] = alpha2[i + l] = Math.Min(sum, C);
sum -= alpha2[i];
linear_term[i] = - prob.y[i];
y[i] = 1;
linear_term[i + l] = prob.y[i];
y[i + l] = - 1;
}
var s = new Solver_NU();
s.Solve(2*l, new SVR_Q(prob, param), linear_term, y, alpha2, C, C, param.eps, si, param.shrinking);
Console.Out.Write("epsilon = " + (- si.r) + "\n");
for (i = 0; i < l; i++)
alpha[i] = alpha2[i] - alpha2[i + l];
}
示例9: solve_one_class
private static void solve_one_class(svm_problem prob, svm_parameter param, double[] alpha,
Solver.SolutionInfo si)
{
int l = prob.l;
var zeros = new double[l];
var ones = new sbyte[l];
int i;
//UPGRADE_WARNING: Data types in Visual C# might be different. Verify the accuracy of narrowing conversions. 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword="jlca1042_3"'
var n = (int) (param.nu*prob.l); // # of alpha's at upper bound
for (i = 0; i < n; i++)
alpha[i] = 1;
alpha[n] = param.nu*prob.l - n;
for (i = n + 1; i < l; i++)
alpha[i] = 0;
for (i = 0; i < l; i++)
{
zeros[i] = 0;
ones[i] = 1;
}
var s = new Solver();
s.Solve(l, new ONE_CLASS_Q(prob, param), zeros, ones, alpha, 1.0, 1.0, param.eps, si, param.shrinking);
}
示例10: HandleModels
/// <summary>
/// Load the models.
/// </summary>
/// <param name="xmlin">Where to read the models from.</param>
/// <param name="network">Where the models are read into.</param>
private void HandleModels(ReadXML xmlin, SVMNetwork network)
{
int index = 0;
while (xmlin.ReadToTag())
{
if (xmlin.IsIt(SVMNetworkPersistor.TAG_MODEL, true))
{
svm_parameter param = new svm_parameter();
svm_model model = new svm_model();
model.param = param;
network.Models[index] = model;
HandleModel(xmlin, network.Models[index]);
index++;
}
else if (xmlin.IsIt(SVMNetworkPersistor.TAG_MODELS, false))
{
break;
}
}
}
示例11: Evaluate
/// <summary>
/// Evaluate the error for the specified model.
/// </summary>
///
/// <param name="param">The params for the SVN.</param>
/// <param name="prob">The problem to evaluate.</param>
/// <param name="target">The output values from the SVN.</param>
/// <returns>The calculated error.</returns>
private static double Evaluate(svm_parameter param, svm_problem prob,
double[] target)
{
int totalCorrect = 0;
var error = new ErrorCalculation();
if ((param.svm_type == svm_parameter.EPSILON_SVR)
|| (param.svm_type == svm_parameter.NU_SVR))
{
for (int i = 0; i < prob.l; i++)
{
double ideal = prob.y[i];
double actual = target[i];
error.UpdateError(actual, ideal);
}
return error.Calculate();
}
for (int i = 0; i < prob.l; i++)
{
if (target[i] == prob.y[i])
{
++totalCorrect;
}
}
return Format.HundredPercent*totalCorrect/prob.l;
}
示例12: x308cb2f3483de2a6
private static double x308cb2f3483de2a6(svm_parameter x0d173b5435b4d6ad, svm_problem xdee3898b83df48b4, double[] x11d58b056c032b03)
{
ErrorCalculation calculation;
int num2;
double num3;
int num5;
int num = 0;
if (0 == 0)
{
if ((((uint) num3) & 0) != 0)
{
goto Label_0134;
}
goto Label_0108;
}
goto Label_008C;
Label_0055:
if (num2 >= xdee3898b83df48b4.l)
{
return calculation.Calculate();
}
Label_008C:
num3 = xdee3898b83df48b4.y[num2];
double actual = x11d58b056c032b03[num2];
if (((uint) num3) < 0)
{
goto Label_0108;
}
calculation.UpdateError(actual, num3);
num2++;
if ((((uint) num3) - ((uint) num3)) >= 0)
{
goto Label_0055;
}
Label_00D4:
if ((((uint) num5) & 0) == 0)
{
while (num5 < xdee3898b83df48b4.l)
{
while (x11d58b056c032b03[num5] == xdee3898b83df48b4.y[num5])
{
num++;
if ((((uint) actual) + ((uint) actual)) <= uint.MaxValue)
{
break;
}
}
num5++;
}
}
goto Label_0134;
Label_0108:
calculation = new ErrorCalculation();
if (((x0d173b5435b4d6ad.svm_type != 3) && ((((uint) num5) | 3) != 0)) && (x0d173b5435b4d6ad.svm_type != 4))
{
num5 = 0;
if ((((uint) num3) + ((uint) actual)) <= uint.MaxValue)
{
goto Label_00D4;
}
goto Label_008C;
}
num2 = 0;
goto Label_0055;
Label_0134:
return ((100.0 * num) / ((double) xdee3898b83df48b4.l));
}
示例13: SVMNetwork
/// <summary>
/// Construct a SVM network.
/// </summary>
/// <param name="inputCount">The input count.</param>
/// <param name="outputCount">The output count.</param>
/// <param name="svmType">The type of SVM.</param>
/// <param name="kernelType">The SVM kernal type.</param>
public SVMNetwork(int inputCount, int outputCount, SVMType svmType,
KernelType kernelType)
{
this.inputCount = inputCount;
this.outputCount = outputCount;
this.kernelType = kernelType;
this.svmType = svmType;
models = new svm_model[outputCount];
parameters = new svm_parameter[outputCount];
for (int i = 0; i < outputCount; i++)
{
parameters[i] = new svm_parameter();
switch (svmType)
{
case SVMType.SupportVectorClassification:
parameters[i].svm_type = svm_parameter.C_SVC;
break;
case SVMType.NewSupportVectorClassification:
parameters[i].svm_type = svm_parameter.NU_SVC;
break;
case SVMType.SupportVectorOneClass:
parameters[i].svm_type = svm_parameter.ONE_CLASS;
break;
case SVMType.EpsilonSupportVectorRegression:
parameters[i].svm_type = svm_parameter.EPSILON_SVR;
break;
case SVMType.NewSupportVectorRegression:
parameters[i].svm_type = svm_parameter.NU_SVR;
break;
}
switch (kernelType)
{
case KernelType.Linear:
parameters[i].kernel_type = svm_parameter.LINEAR;
break;
case KernelType.Poly:
parameters[i].kernel_type = svm_parameter.POLY;
break;
case KernelType.RadialBasisFunction:
parameters[i].kernel_type = svm_parameter.RBF;
break;
case KernelType.Sigmoid:
parameters[i].kernel_type = svm_parameter.SIGMOID;
break;
}
parameters[i].kernel_type = svm_parameter.RBF;
parameters[i].degree = 3;
parameters[i].coef0 = 0;
parameters[i].nu = 0.5;
parameters[i].cache_size = 100;
parameters[i].C = 1;
parameters[i].eps = 1e-3;
parameters[i].p = 0.1;
parameters[i].shrinking = 1;
parameters[i].probability = 0;
parameters[i].nr_weight = 0;
parameters[i].weight_label = new int[0];
parameters[i].weight = new double[0];
parameters[i].gamma = 1.0 / inputCount;
}
}
示例14: solve_c_svc
//
// construct and solve various formulations
//
private static void solve_c_svc(svm_problem prob, svm_parameter param, double[] alpha, Solver.SolutionInfo si,
double Cp, double Cn)
{
int l = prob.l;
var minus_ones = new double[l];
var y = new sbyte[l];
int i;
for (i = 0; i < l; i++)
{
alpha[i] = 0;
minus_ones[i] = - 1;
if (prob.y[i] > 0)
y[i] = (+ 1);
else
y[i] = - 1;
}
var s = new Solver();
s.Solve(l, new SVC_Q(prob, param, y), minus_ones, y, alpha, Cp, Cn, param.eps, si, param.shrinking);
double sum_alpha = 0;
for (i = 0; i < l; i++)
sum_alpha += alpha[i];
if (Cp == Cn)
Console.Out.Write("nu = " + sum_alpha/(Cp*prob.l) + "\n");
for (i = 0; i < l; i++)
alpha[i] *= y[i];
}
示例15: solve_nu_svc
private static void solve_nu_svc(svm_problem prob, svm_parameter param, double[] alpha, Solver.SolutionInfo si)
{
int i;
int l = prob.l;
double nu = param.nu;
var y = new sbyte[l];
for (i = 0; i < l; i++)
if (prob.y[i] > 0)
y[i] = (+ 1);
else
y[i] = - 1;
double sum_pos = nu*l/2;
double sum_neg = nu*l/2;
for (i = 0; i < l; i++)
if (y[i] == + 1)
{
alpha[i] = Math.Min(1.0, sum_pos);
sum_pos -= alpha[i];
}
else
{
alpha[i] = Math.Min(1.0, sum_neg);
sum_neg -= alpha[i];
}
var zeros = new double[l];
for (i = 0; i < l; i++)
zeros[i] = 0;
var s = new Solver_NU();
s.Solve(l, new SVC_Q(prob, param, y), zeros, y, alpha, 1.0, 1.0, param.eps, si, param.shrinking);
double r = si.r;
Console.Out.Write("C = " + 1/r + "\n");
for (i = 0; i < l; i++)
alpha[i] *= y[i]/r;
si.rho /= r;
si.obj /= (r*r);
si.upper_bound_p = 1/r;
si.upper_bound_n = 1/r;
}