mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DeBarr, Dave" <deb...@mitre.org>
Subject AbstractCluster() constructor
Date Sun, 03 Nov 2013 18:30:44 GMT
Hi,

Curiosity question: why not use point.clone() in the constructor for org.apache.mahout.clustering.AbstractCluster()?

This would allow the use of DenseVector, which is much faster (no dictionary lookups) when
clustering dense SIFT descriptors to form visual words (instead of sparse document vectors).

Thanks,
Dave

  protected AbstractCluster(Vector point, int id2) {
    setNumObservations(0);
    setTotalObservations(0);
  //setCenter(new RandomAccessSparseVector(point));
    setCenter(point.clone());
    setRadius(center.like());
    setS0(0);
    setS1(center.like());
    setS2(center.like());
    this.id = id2;
  }



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message