/** * Constructs a new RVFDatum with the given features and label. */ public RVFDatum(Counter<F> features, L label) { this.features = features; setLabel(label); }
/** * Constructs a new RVFDatum taking the data from a Datum. <i>Implementation * note:</i> This constructor allocates its own counter over features, but is * only guaranteed correct if the label and feature names are immutable. * * @param m The Datum to copy. */ public RVFDatum(Datum<L, F> m) { this.features = new ClassicCounter<>(); for (F key : m.asFeatures()) { features.incrementCount(key, 1.0); } setLabel(m.label()); }
for (int index = 0; index < values.length; index++) { if (index == classColumn) { d.setLabel(values[index]); continue;
datum.setLabel(decision.second);
/** * Constructs a new RVFDatum with the given features and label. */ public RVFDatum(Counter<F> features, L label) { this.features = features; setLabel(label); }
/** * Constructs a new RVFDatum with the given features and label. */ public RVFDatum(Counter<F> features, L label) { this.features = features; setLabel(label); }
/** * Constructs a new RVFDatum with the given features and label. */ public RVFDatum(Counter<F> features, L label) { this.features = features; setLabel(label); }
/** * Constructs a new RVFDatum taking the data from a Datum. <i>Implementation * note:</i> This constructor allocates its own counter over features, but is * only guaranteed correct if the label and feature names are immutable. * * @param m The Datum to copy. */ public RVFDatum(Datum<L, F> m) { this.features = new ClassicCounter<>(); for (F key : m.asFeatures()) { features.incrementCount(key, 1.0); } setLabel(m.label()); }
/** * Constructs a new RVFDatum taking the data from a Datum. <i>Implementation * note:</i> This constructor allocates its own counter over features, but is * only guaranteed correct if the label and feature names are immutable. * * @param m The Datum to copy. */ public RVFDatum(Datum<L, F> m) { this.features = new ClassicCounter<F>(); for (F key : m.asFeatures()) { features.incrementCount(key, 1.0); } setLabel(m.label()); }
/** * Constructs a new RVFDatum taking the data from a Datum. * <i>Implementation note:</i> This constructor allocates its own * counter over features, but is only guaranteed correct if the label and * feature names are immutable. * * @param m The Datum to copy. */ public RVFDatum(Datum<L, F> m) { this.features = new ClassicCounter<F>(); for (F key : m.asFeatures()) { features.incrementCount(key, 1.0); } setLabel(m.label()); }
datum.setLabel(decision.second);