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

Additional Core/Peripheral Classification Methods #276

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from

Conversation

Leo-Send
Copy link
Contributor

@Leo-Send Leo-Send commented Dec 11, 2024

Prerequisites

  • I adhere to the coding conventions (described here) in my code.
  • I have updated the copyright headers of the files I have modified.
  • I have written appropriate commit messages, i.e., I have recorded the goal, the need, the needed changes, and the location of my code modifications for each commit. This includes also, e.g., referencing to relevant issues.
  • I have put signed-off tags in all commits.
  • I have updated the changelog file NEWS.md appropriately.
  • I have checked whether I need to adjust the showcase file showcase.R with respect to my changes.
  • The pull request is opened against the branch dev.

Description

Add four new metric which can be used for the classification of authors into core and peripheral:
Betweenness, which measures the number of shortest paths between developers that go through a given developer vertex;
Closeness, which measures how close a developer is to all others by taking the inverse of the sum of all of it's shortest paths;
Pagerank, which is based on Google's Pagerank algorithm, which is closely related to Eigenvector Centrality;
Eccentricity, which measures the distance to the furthest developer vertex.

Changelog

Added

Base implementation for new classification metrics.
Documentation and testing still missing.

Signed-off-by: Leo Sendelbach <[email protected]>
Tests use already existing network, this test cases are quite small.
Additional research into potential rounding errors may be required.

Signed-off-by: Leo Sendelbach <[email protected]>
Add default documentation, same as for already existing
classification methods

Signed-off-by: Leo Sendelbach <[email protected]>
add new entry under 'unversioned"

Signed-off-by: Leo Sendelbach <[email protected]>
@Leo-Send Leo-Send changed the title Pullrequest Additional Core/Peripheral Classification Methods Dec 11, 2024
Copy link
Collaborator

@bockthom bockthom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a quick look at the implementation (but not yet at the tests).
Please find my initial comments below.

util-core-peripheral.R Outdated Show resolved Hide resolved
util-core-peripheral.R Outdated Show resolved Hide resolved
util-core-peripheral.R Outdated Show resolved Hide resolved
util-core-peripheral.R Outdated Show resolved Hide resolved
NEWS.md Outdated Show resolved Hide resolved
Also minor fixes as requested in PR

Signed-off-by: Leo Sendelbach <[email protected]>
Copy link
Collaborator

@bockthom bockthom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a quick look at your additions to the README, see my detailed comments below.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
util-core-peripheral.R Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Changed ordering in readme

Signed-off-by: Leo Sendelbach <[email protected]>
tests hierarchy with network previously used for another unit test

Signed-off-by: Leo Sendelbach <[email protected]>
@Leo-Send Leo-Send marked this pull request as ready for review January 14, 2025 12:47
formulation change as requested

Signed-off-by: Leo Sendelbach <[email protected]>
Copy link
Collaborator

@bockthom bockthom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I haven't had a look at the tests yet, I have now done so. I only have a few minor comments (but I did not check the actual centrality values; especially for eccentricity, I still don't have an impression whether the values do make sense or not 🙈)

In addition to my comments below, please don't forget about the changes to the README regarding "author networks" that we have agreed on in today's meeting.

@@ -18,6 +18,7 @@
## Copyright 2019 by Christian Hechtl <[email protected]>
## Copyright 2021 by Christian Hechtl <[email protected]>
## Copyright 2023-2024 by Maximilian Löffler <[email protected]>
## Copyright 2024 by Leo Sendelbach <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the copyright header and include 2025 😉


## Act
result = get.author.class.network.hierarchy(test.network)
## Assert
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a blank line before the comment?

row.names(result[["peripheral"]]) = NULL
expect_equal(expected, result)
})

# TODO: Add a test for hierarchy classification
Copy link
Collaborator

@bockthom bockthom Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this TODO comment as soon as you have added another test for hierarchy classification. Thanks!

@@ -22,6 +22,7 @@
## Copyright 2019 by Thomas Bock <[email protected]>
## Copyright 2019 by Jakob Kronawitter <[email protected]>
## Copyright 2021 by Johannes Hostert <[email protected]>
## Copyright 2024 by Leo Sendelbach <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also update the copyright header here - some of your last changes have been added in 2025.

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

Successfully merging this pull request may close these issues.

2 participants