Similarity Matrix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Similarity Matrix

abergel
Hi!

I know some of you are working on DSM-kind of matrix. Oscar has been working on a similarity matrix for Roassal. I just want to share a self-explanble screenshot with you guys.


On this example, the methods of the subclasses of Set are compared between themselves.
Black dot is a couple (m1, m2) that are very similar


Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Similarity Matrix

Stéphane Ducasse
Really nice.
In fact it would be ****great**** if we can plug the comparison between the x and y cells (which can be different).
Because like that we get a simple matrix based comparator similar to the one of early paper of prejinshight work.


> <Screen Shot 2013-11-29 at 6.12.39 PM.png>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Similarity Matrix

abergel
Really nice.
In fact it would be ****great**** if we can plug the comparison between the x and y cells (which can be different).
Because like that we get a simple matrix based comparator similar to the one of early paper of prejinshight work.

This is the case actually.

Consider this rather simple and small example:
SimilarityMatrix new
on: #('hello world' 'welcome to our world' 'hello means bonjour' 'bye bye')
by: [ :m1 : m2 |
(m1 substrings intersection: m2 substrings) size
/ ((1 max: (m1 substrings union: m2 substrings) size) + 1) "NB penalty for small methods"
];
gridView

The output is 


It visually says that ‘hello world’ is close to ‘welcome to out world’ and to ‘hello means bonjour’, because ‘hello’ and ‘world’ are in common.

Alexandre


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] Re: Similarity Matrix

Stéphane Ducasse
then this is really cool

:)

On Dec 2, 2013, at 1:39 PM, Alexandre Bergel <[hidden email]> wrote:

>> Really nice.
>> In fact it would be ****great**** if we can plug the comparison between the x and y cells (which can be different).
>> Because like that we get a simple matrix based comparator similar to the one of early paper of prejinshight work.
>
> This is the case actually.
>
> Consider this rather simple and small example:
> SimilarityMatrix new
> on: #('hello world' 'welcome to our world' 'hello means bonjour' 'bye bye')
> by: [ :m1 : m2 |
> (m1 substrings intersection: m2 substrings) size
> / ((1 max: (m1 substrings union: m2 substrings) size) + 1) "NB penalty for small methods"
> ];
> gridView
>
> The output is
>
> <Screen Shot 2013-12-02 at 9.36.58 AM.png>
>
> It visually says that ‘hello world’ is close to ‘welcome to out world’ and to ‘hello means bonjour’, because ‘hello’ and ‘world’ are in common.
>
> Alexandre
>


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev