Search in sources :

Example 1 with BahmanEtAlSampleProbabilityFn

use of org.locationtech.geowave.analytic.sample.BahmanEtAlSampleProbabilityFn in project geowave by locationtech.

the class KMeansParallelInitializeTest method setup.

@Before
public void setup() {
    initializer.getCentroidAssociationFn().setDistanceFunction(new FeatureCentroidDistanceFn());
    initializer.setCentroidFactory(new SimpleFeatureItemWrapperFactory());
    final Sampler<SimpleFeature> sampler = initializer.getSampler();
    sampler.setSampleProbabilityFn(new BahmanEtAlSampleProbabilityFn());
    sampler.setSampleSize(5);
}
Also used : BahmanEtAlSampleProbabilityFn(org.locationtech.geowave.analytic.sample.BahmanEtAlSampleProbabilityFn) SimpleFeatureItemWrapperFactory(org.locationtech.geowave.analytic.SimpleFeatureItemWrapperFactory) FeatureCentroidDistanceFn(org.locationtech.geowave.analytic.distance.FeatureCentroidDistanceFn) SimpleFeature(org.opengis.feature.simple.SimpleFeature) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 SimpleFeatureItemWrapperFactory (org.locationtech.geowave.analytic.SimpleFeatureItemWrapperFactory)1 FeatureCentroidDistanceFn (org.locationtech.geowave.analytic.distance.FeatureCentroidDistanceFn)1 BahmanEtAlSampleProbabilityFn (org.locationtech.geowave.analytic.sample.BahmanEtAlSampleProbabilityFn)1 SimpleFeature (org.opengis.feature.simple.SimpleFeature)1