if( comparisonMeasure.getKind() != ComparisonMeasure.Kind.DISTANCE )
throw new UnsupportedOperationException( "unsupported comparison kind, got: " + comparisonMeasure.getKind() );
ClusteringSpec clusteringSpec = new ClusteringSpec( modelSchema );
Measure measure = comparisonMeasure.getMeasure();
if( measure instanceof Euclidean )
clusteringSpec.setComparisonMeasure( new EuclideanMeasure() );
else if( measure instanceof SquaredEuclidean )
clusteringSpec.setComparisonMeasure( new SquaredEuclideanMeasure() );
else