All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.etsy.conjecture.data.RealValueLabeledInstance Maven / Gradle / Ivy

There is a newer version: 0.2.3
Show newest version
package com.etsy.conjecture.data;

import java.util.Map;

public class RealValueLabeledInstance extends
        AbstractInstance implements
        LabeledInstance {

    private final RealValuedLabel label;

    public RealValuedLabel getLabel() {
        return label;
    }

    public RealValueLabeledInstance() {
        this(0.0);
    }

    public RealValueLabeledInstance(RealValuedLabel label) {
        this(label, 1.0);
    }

    public RealValueLabeledInstance(RealValuedLabel label, double weight) {
        super(weight);
        this.label = label;
    }

    public RealValueLabeledInstance(double label) {
        this(new RealValuedLabel(label), 1.0);
    }

    public RealValueLabeledInstance(double label, double weight) {
        this(new RealValuedLabel(label), weight);
    }

    public RealValueLabeledInstance(double label, Map instance) {
        this(new RealValuedLabel(label), instance, 1.0);
    }

    public RealValueLabeledInstance(double label, Map instance,
            double weight) {
        this(new RealValuedLabel(label), instance, weight);
    }

    public RealValueLabeledInstance(double label, StringKeyedVector vec) {
        this(new RealValuedLabel(label), vec.getMap(), 1.0);
    }

    public RealValueLabeledInstance(double label, StringKeyedVector vec,
            double weight) {
        this(new RealValuedLabel(label), vec.getMap(), weight);
    }

    public RealValueLabeledInstance(RealValuedLabel label,
            Map instance) {
        this(label, instance, 1.0);
    }

    public RealValueLabeledInstance(RealValuedLabel label,
            Map instance, double weight) {
        super(instance, weight);
        this.label = label;
    }

    public RealValueLabeledInstance(RealValuedLabel label, StringKeyedVector vec) {
        this(label, vec, 1.0);
    }

    public RealValueLabeledInstance(RealValuedLabel label,
            StringKeyedVector vec, double weight) {
        super(vec.getMap(), weight);
        this.label = label;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy