Changeset 6812
- Timestamp:
- 09/20/11 21:04:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs
r6240 r6812 88 88 Problem = new ClassificationProblem(); 89 89 90 List<StringValue> svrTypes = (from type in new List<string> { "NU_SVC", " EPSILON_SVC" }90 List<StringValue> svrTypes = (from type in new List<string> { "NU_SVC", "C_SVC" } 91 91 select new StringValue(type).AsReadOnly()) 92 92 .ToList(); … … 134 134 parameter.Probability = false; 135 135 136 foreach (double c in problemData.ClassValues) { 137 double wSum = 0.0; 138 foreach (double otherClass in problemData.ClassValues) { 139 if (!c.IsAlmost(otherClass)) { 140 wSum += problemData.GetClassificationPenalty(c, otherClass); 141 } 142 } 143 parameter.Weights.Add((int)c, wSum); 144 } 145 136 146 137 147 SVM.Problem problem = SupportVectorMachineUtil.CreateSvmProblem(dataset, targetVariable, allowedInputVariables, rows);
Note: See TracChangeset
for help on using the changeset viewer.