コード例 #1
0
 public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc)
 {
     Host.CheckValue(bldr, nameof(bldr));
     Host.CheckValue(typeSrc, nameof(typeSrc));
     Host.Check(typeSrc.RawType == typeof(TFloat));
     bldr.AddPrimitive("AffineScale", typeSrc, Scale);
     bldr.AddPrimitive("AffineOffset", typeSrc, Offset);
 }
コード例 #2
0
 public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc)
 {
     Host.CheckValue(bldr, nameof(bldr));
     Host.CheckValue(typeSrc, nameof(typeSrc));
     Host.Check(typeSrc.RawType == typeof(TFloat));
     bldr.AddPrimitive("CdfMean", typeSrc, Mean);
     bldr.AddPrimitive("CdfStdDev", typeSrc, Stddev);
     bldr.AddPrimitive("CdfUseLog", BoolType.Instance, (DvBool)UseLog);
 }
コード例 #3
0
 public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc)
 {
     Host.CheckValue(bldr, nameof(bldr));
     Host.CheckValue(typeSrc, nameof(typeSrc));
     Host.Check(typeSrc.VectorSize == Mean.Length);
     Host.Check(typeSrc.ItemType.RawType == typeof(TFloat));
     bldr.AddGetter <VBuffer <TFloat> >("CdfMean", typeSrc, MeanMetadataGetter);
     bldr.AddGetter <VBuffer <TFloat> >("CdfStdDev", typeSrc, StddevMetadataGetter);
     bldr.AddPrimitive("CdfUseLog", BoolType.Instance, (DvBool)UseLog);
 }
コード例 #4
0
 public override void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc)
 {
     Host.CheckValue(bldr, nameof(bldr));
     Host.CheckValue(typeSrc, nameof(typeSrc));
     Host.Check(typeSrc.VectorSize == Scale.Length);
     Host.Check(typeSrc.ItemType.RawType == typeof(TFloat));
     bldr.AddGetter <VBuffer <TFloat> >("AffineScale", typeSrc, ScaleMetadataGetter);
     if (Offset != null)
     {
         bldr.AddGetter <VBuffer <TFloat> >("AffineOffset", typeSrc, OffsetMetadataGetter);
     }
 }
コード例 #5
0
 private static void AddGetter <T>(MetadataDispatcher.Builder bldr, string kind, MetadataInfo <T> info)
 {
     bldr.AddGetter(kind, info.Type, info.Getter);
 }
コード例 #6
0
 public void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc)
 {
     // REVIEW: How to attach information on the bins, to metadata?
 }
コード例 #7
0
 public abstract void AttachMetadata(MetadataDispatcher.Builder bldr, ColumnType typeSrc);