"Clustering and Cosine Similarity"

ema
ema New Altair Community Member
edited November 5 in Community Q&A
Hi,

Can any one give me an example on how to make any clustering model use the cosine similarity

Thank you

Answers

  • land
    land New Altair Community Member
    Hi Ema,
    this is quite simple: Just select the Cosine Simularity in one of the clustering operators supporting different distance measures. An example:
    <operator name="Root" class="Process" expanded="yes">
        <operator name="ExampleSetGenerator" class="ExampleSetGenerator">
            <parameter key="number_examples" value="1000"/>
            <parameter key="number_of_attributes" value="2"/>
            <parameter key="target_function" value="three ring clusters"/>
        </operator>
        <operator name="AgglomerativeClustering" class="AgglomerativeClustering">
            <parameter key="measure_types" value="NumericalMeasures"/>
            <parameter key="numerical_measure" value="CosineSimilarity"/>
        </operator>
        <operator name="FlattenClusterModel" class="FlattenClusterModel">
        </operator>
        <operator name="ClusterModel2ExampleSet" class="ClusterModel2ExampleSet">
        </operator>
    </operator>
    Greetings,
      Sebastian
  • ema
    ema New Altair Community Member
    Hi.
    Thank you very much for your reply ,