Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildMatrix #7

Open
Ducasse opened this issue Dec 1, 2020 · 1 comment
Open

buildMatrix #7

Ducasse opened this issue Dec 1, 2020 · 1 comment
Assignees

Comments

@Ducasse
Copy link
Contributor

Ducasse commented Dec 1, 2020

buildMatrix: aCollection
	"Answer a <Collection> of points that are in the same vs different groups.
	Different groups are 1, same groups are 0"

	^ aCollection collect: [ :index | 
		(index - aCollection) abs 
			collect: [ :each | each min: 1 ] ]

I do not get this code what means index - aCollection ? this code totally confuses me.
So we should add a comment about this implementation

@hernanmd hernanmd self-assigned this Dec 3, 2020
@hernanmd
Copy link
Member

hernanmd commented Dec 3, 2020

This is a method to build matrix where each cell has 0 if the two input vectors classified a pair in the same cluster, and 1 if there is no match. IIRC the same can be achieved building a contingency matrix - and probably it would be more easier to read, but as this Rand Index seems to be more theoretical than practical (this is explained in the Chapter) I moved to Adjusted Rand Index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants