Changeset 12872 for branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs
- Timestamp:
- 08/17/15 18:33:31 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/crossvalidation-2434/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/LossFunctions/RelativeErrorLoss.cs
r12871 r12872 26 26 using System.Linq; 27 27 using HeuristicLab.Common; 28 using HeuristicLab.Core;29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;30 28 31 29 namespace HeuristicLab.Algorithms.DataAnalysis { 32 30 // relative error loss is a special case of weighted absolute error loss with weights = (1/target) 33 [StorableClass] 34 [Item("Relative error loss", "")] 35 public class RelativeErrorLoss : Item, ILossFunction { 36 public RelativeErrorLoss() { } 37 31 public class RelativeErrorLoss : ILossFunction { 38 32 public double GetLoss(IEnumerable<double> target, IEnumerable<double> pred) { 39 33 var targetEnum = target.GetEnumerator(); … … 111 105 } 112 106 113 #region item implementation 114 private RelativeErrorLoss(RelativeErrorLoss original, Cloner cloner) : base(original, cloner) { } 115 116 public override IDeepCloneable Clone(Cloner cloner) { 117 return new RelativeErrorLoss(this, cloner); 107 public override string ToString() { 108 return "Relative error loss"; 118 109 } 119 #endregion120 110 } 121 111 }
Note: See TracChangeset
for help on using the changeset viewer.