ASPL User's Guide v 1.00
© 2024 by SetSphere.COM


9-1

   Similarity Operations

Similarity is a cosine based calculation of the angle between vectors in a plane. Setting aside its implementation, ASPL provides the similarity or its abbreviation sim as a command to calculate the similarity between your datasets. In this example, we will load the sample workspace RANDONEBIT and calculate the similarity between the randomly generated groups in the workspace:

aspl -wsname RANDONEBIT -groupingclass BITGROUP

aspl>  sim v1 v2 v3
    display the similarity between v1 v2 and v3

aspl>  simi123 = sim v1 v2 v3
    assign the similarity calculatiion to COS variable simi123

aspl>  c
    display the COS symbol table

aspl>  ?c simi123
    interrogate the similarity variable simi123

aspl>  ??c simi123
    really interrogate simi123

aspl>  c sorted
    display COS symbol table in sorted mode

aspl>  v sorted
    display the symbol table in sorted mode

aspl>  @c simi123
    display the archived COS variables for simi123

aspl>  @@c simi123
    display the dependencies for COS variables simi123

aspl>  quit
    leave ASPL without saving the workspace RANDONEBIT



A similarity variable is interrogated by preceding it with the operator ?c

To really interrogate a similarity COS variable by sourcing the variables it depends on, precede the COS variable with the operator ??c and
this will cause sourcing the dependendies variables and may also result in updates in the sourced variables.

To view the archived similarities of a COS variable, precede the variable name with the operator @c

To view the variables that a COS variable depend on, precede the COS variable name with the operator @@c

ASPL set variables are stored in datasets symbol table (or simply called variables-symbol-table), while ASPL similarity variables are stored in COS-symbol-table. To display the variables-symbol-table use the command v or v sorted and to view the COS-symbol-table use the command c or c sorted



Remember that ASPL stores the similarity variables in its COS symbol table that you can display its contents anytime by typing any of the following commands at the ASPL prompt: c C cos COS


● Tickable Predicates for similarity

The similarity is tickable with predicates that are shown in the following table:

       a yellow note
 -T- Tab. 9.1.1   [Tickable Predicates for similarity][Tickable Predicates for similarity]
similarity`_  similarity on the aggregated element containment names 
similarity`ffl  similarity on the aggregated element containment names 
similarity`f  similarity on the aggregated element names 
similarity`c  similarity on the aggregated checksums of the named elements 
similarity`z  similarity on the aggregated zsums of the named elements 
similarity`fflz  similarity on the aggregated element containment names AND their zsums 
similarity`dosi  similarity on the aggregated document similarities of the named elements 
similarity`h  similarity on the aggregated entropies of the named elements 
similarity`c  similarity on the aggregated checksums of the named elements 
similarity`fc  similarity on the aggregated named elements AND their checksums 
similarity`fflc  similarity on the aggregated element containment names AND their checksums 
similarity`fflmtm  similarity on the aggregated element containment names AND their make time 
similarity`mtm  similarity on the aggregated make times of the named elements 
similarity`fmtm  similarity on the aggregated named elements AND their make times 
similarity`d  similarity on the aggregated containment subgroups 
similarity`dmtm  similarity on the aggregated containment subgroups AND the make times of the subgroups 
(C)2024 ASPL Inc.