jnisvmlight
Class LabeledFeatureVector


java.lang.Object

  extended by jnisvmlight.FeatureVector

      extended by jnisvmlight.LabeledFeatureVector

All Implemented Interfaces:
java.io.Serializable

public class LabeledFeatureVector
extends FeatureVector
implements java.io.Serializable

A labeled feature vector.

See Also:
Serialized Form

Field Summary
protected  double m_label
           
 
Fields inherited from class jnisvmlight.FeatureVector
m_dims, m_vals
 
Constructor Summary
protected LabeledFeatureVector()
           
  LabeledFeatureVector(double label, int size)
           
  LabeledFeatureVector(double label, int[] dims, double[] vals)
           
 
Method Summary
 double getLabel()
           
 void setFeatures(double label, int[] dims, double[] vals)
           
 void setLabel(double label)
           
 java.lang.String toString()
           
 
Methods inherited from class jnisvmlight.FeatureVector
getCosine, getDimAt, getL1Norm, getL2Norm, getValueAt, normalizeL1, normalizeL1, normalizeL2, setFeatures, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_label


protected double m_label
Constructor Detail

LabeledFeatureVector


protected LabeledFeatureVector()

LabeledFeatureVector


public LabeledFeatureVector(double label,

                            int size)

LabeledFeatureVector


public LabeledFeatureVector(double label,

                            int[] dims,

                            double[] vals)
Method Detail

getLabel


public double getLabel()

setFeatures


public void setFeatures(double label,

                        int[] dims,

                        double[] vals)

setLabel


public void setLabel(double label)

toString


public java.lang.String toString()
Overrides:
toString in class FeatureVector