Changeset 3879
- Timestamp:
- 05/31/10 16:07:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.ExtLibs/HeuristicLab.LibSVM/1.6.3/LibSVM-1.6.3/Training.cs
r2645 r3879 50 50 int total_correct = 0; 51 51 double total_error = 0; 52 double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0;52 //double sumv = 0, sumy = 0, sumvv = 0, sumyy = 0, sumvy = 0; 53 53 if (parameters.SvmType == SvmType.EPSILON_SVR || parameters.SvmType == SvmType.NU_SVR) 54 54 { … … 58 58 double v = target[i]; 59 59 total_error += (v - y) * (v - y); 60 sumv += v;61 sumy += y;62 sumvv += v * v;63 sumyy += y * y;64 sumvy += v * y;60 //sumv += v; 61 //sumy += y; 62 //sumvv += v * v; 63 //sumyy += y * y; 64 //sumvy += v * y; 65 65 } 66 return(problem.Count * sumvy - sumv * sumy) / (Math.Sqrt(problem.Count * sumvv - sumv * sumv) * Math.Sqrt(problem.Count * sumyy - sumy * sumy)); 66 return total_error / problem.Count; // return MSE 67 // (problem.Count * sumvy - sumv * sumy) / (Math.Sqrt(problem.Count * sumvv - sumv * sumv) * Math.Sqrt(problem.Count * sumyy - sumy * sumy)); 67 68 } 68 69 else
Note: See TracChangeset
for help on using the changeset viewer.