/** * Instantiates a new instance. * * @param numAttributes the num attributes */ public InstanceImpl(int numAttributes) { this.instanceData = new DenseInstanceData(new double[numAttributes]); //JD this.weight = 1; }
/** * Instantiates a new instance. * * @param weight the weight * @param res the res */ public InstanceImpl(double weight, double[] res) { this.weight = weight; this.instanceData = new DenseInstanceData(res); }
public SingleLabelInstance(double weight, double[] res) { this.weight = weight; this.instanceData = new DenseInstanceData(res); //this.attributeValues = res; this.classData = new SingleClassInstanceData(); // this.classValue = Double.NaN; }
@Override public InstanceData copy() { return new DenseInstanceData(this.attributeValues.clone()); }
public SingleLabelInstance(int numAttributes) { this.instanceData = new DenseInstanceData(new double[numAttributes]); // m_AttValues = new double[numAttributes]; /* * for (int i = 0; i < m_AttValues.length; i++) { m_AttValues[i] = * Utils.missingValue(); } */ this.weight = 1; this.classData = new SingleClassInstanceData(); this.instanceInformation = new InstancesHeader(); }