|
1 | 1 | # GitLit Algorithms
|
2 | 2 |
|
3 | 3 |
|
4 |
| -## Rating Algorithm |
| 4 | +## Rating Algorithms |
| 5 | +Each metric defined below has its own specific API query. The process is simple : we fetch the data from GitHub APIs which is already streamlined for a specific metric, cut down the data further (if needed) and then assign appropriate weights to these numbers to form a score of a User or a Repo. |
| 6 | + |
| 7 | +----------------------------------------------------------------------------------------- |
5 | 8 |
|
6 | 9 | ### User Rating
|
| 10 | +A total of 5 metrics have been designed to rate the user and the algorithms are designed according to the process mentioned above. |
| 11 | + |
| 12 | +Each score is a boundless score calculated by summation of weighted sums of each of the following metric. |
| 13 | + |
| 14 | +----------------------------------------------------------------------------------------- |
| 15 | + |
| 16 | +### General traits |
| 17 | +1. Contribution Count |
| 18 | + |
| 19 | +*Motive : To get a base idea of a given user* |
| 20 | + |
| 21 | +| Weight | Formula | |
| 22 | +| -------|---------------------------------- | |
| 23 | +| 3 | Number of Commits | |
| 24 | +| 3 | Number of PRs | |
| 25 | +| 2 | Number of Issues | |
| 26 | +| 2 | Number of User Repos | |
| 27 | +| 3 | Number of Repos contributed to | |
| 28 | + |
| 29 | +#### Base Score |
| 30 | + |
| 31 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Base&space;Score&space;=&space;(0.3&space;*&space;Number&space;of&space;Commits)&space;+&space;(0.3&space;*&space;Number&space;of&space;PRs)&space;+&space;(0.2&space;*&space;Number&space;of&space;Issues)&space;+&space;(0.2&space;*&space;Number&space;of&space;User&space;Repos)&space;+&space;(0.3&space;*&space;Number&space;of&space;Repos&space;Contributed&space;To&space;)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Base&space;Score&space;=&space;(0.3&space;*&space;Number&space;of&space;Commits)&space;+&space;(0.3&space;*&space;Number&space;of&space;PRs)&space;+&space;(0.2&space;*&space;Number&space;of&space;Issues)&space;+&space;(0.2&space;*&space;Number&space;of&space;User&space;Repos)&space;+&space;(0.3&space;*&space;Number&space;of&space;Repos&space;Contributed&space;To&space;)" title="Base Score = (0.3 * Number of Commits) + (0.3 * Number of PRs) + (0.2 * Number of Issues) + (0.2 * Number of User Repos) + (0.3 * Number of Repos Contributed To )" /></a> |
| 32 | + |
| 33 | +----------------------------------------------------------------------------------------- |
| 34 | + |
| 35 | +### Creation |
| 36 | + |
| 37 | +1. Stars - Repo Ratio |
| 38 | + |
| 39 | +*Motive : To get the value of projects created* |
| 40 | + |
| 41 | +| Weight | Formula | |
| 42 | +| -------|---------------------------------- | |
| 43 | +| 1 | <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{No.&space;of&space;Stars}{No.&space;of&space;Repos}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{No.&space;of&space;Stars}{No.&space;of&space;Repos}" title="\frac{No. of Stars}{No. of Repos}" /></a> | |
| 44 | + |
| 45 | + |
| 46 | +#### Creation Score |
| 47 | + |
| 48 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Creation&space;Score&space;=&space;10*\frac{No.of&space;Stars}{No.&space;of&space;Repos}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Creation&space;Score&space;=&space;10*\frac{No.of&space;Stars}{No.&space;of&space;Repos}" title="Creation Score = 10*\frac{No.of Stars}{No. of Repos}" /></a> | |
| 49 | + |
| 50 | +----------------------------------------------------------------------------------------- |
| 51 | + |
| 52 | +### Contribution |
| 53 | +1. PR Acceptance Ratio: |
| 54 | + |
| 55 | +*Motive : Value of Contribution* |
| 56 | + |
| 57 | +| Weight | Formula | |
| 58 | +| -------|---------------------------------- | |
| 59 | +| 3 | <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{(No.&space;of&space;Merged&space;PRs)^{2}}{Total&space;Number&space;of&space;PRs}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{(No.&space;of&space;Merged&space;PRs)^{2}}{Total&space;Number&space;of&space;PRs}" title="\frac{(No. of Merged PRs)^{2}}{Total Number of PRs}" /></a> | |
| 60 | + |
| 61 | + |
| 62 | +2. Issue Acceptance Ratio: |
| 63 | + |
| 64 | +*Motive : Value of Contribution* |
| 65 | + |
| 66 | +| Weight | Formula | |
| 67 | +| -------|---------------------------------- | |
| 68 | +| 2 | <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{(No.&space;of&space;Merged&space;PRs)^{2}}{Total&space;Number&space;of&space;PRs}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{(No.&space;of&space;Closed&space;Issues)^{2}}{Total&space;Number&space;of&space;Issues}" title="\frac{(No. of Closed Issues)^{2}}{Total Number of Issues}" /></a> | |
| 69 | + |
| 70 | + |
| 71 | +#### Contribution Score |
| 72 | +<a href="https://www.codecogs.com/eqnedit.php?latex=ContributionScore&space;=(0.3*PRratio)&space;+&space;(0.2*IssueRatio)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?ContributionScore&space;=(0.3*PRratio)&space;+&space;(0.2*IssueRatio)" title="ContributionScore =(0.3*PRratio) + (0.2*IssueRatio)" /></a> |
| 73 | + |
| 74 | +----------------------------------------------------------------------------------------- |
| 75 | + |
| 76 | +### Community |
| 77 | +1. Number of followers/following/organisations involved in. |
| 78 | +*Motive : to get impact in community* |
| 79 | + |
| 80 | +| Weight | Formula | |
| 81 | +| -------|---------------------------------- | |
| 82 | +| 10 | Number of Organisations | |
| 83 | +| 2 | Number of Followers | |
| 84 | +| 1 | Number of Following | |
| 85 | + |
| 86 | +#### Community Score |
| 87 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Community&space;Score&space;=&space;(1*OrganisationCount)&space;+&space;(0.2*FollowersCount)&space;+&space;(0.2*FollowingCount)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Community&space;Score&space;=&space;(1*OrganisationCount)&space;+&space;(0.2*FollowersCount)&space;+&space;(0.2*FollowingCount)" title="Community Score = (1*OrganisationCount) + (0.2*FollowersCount) + (0.2*FollowingCount)" /></a> |
| 88 | + |
| 89 | +----------------------------------------------------------------------------------------- |
| 90 | + |
| 91 | +### Activity |
| 92 | +1. Annual merged PRs |
| 93 | +*Motive : to get to know how active the user is* |
| 94 | + |
| 95 | +| Weight | Formula | |
| 96 | +| -------|---------------------------------- | |
| 97 | +| 3 | Number of PRs merged in an year | |
| 98 | + |
| 99 | +2. Annual raised Issues |
| 100 | +*Motive : to get to know how active the user is* |
| 101 | + |
| 102 | +| Weight | Formula | |
| 103 | +| -------|---------------------------------- | |
| 104 | +| 2 | Number of PRs merged in an year | |
| 105 | + |
| 106 | + |
| 107 | +#### Activity Score |
| 108 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Activity&space;Score&space;=&space;(3*No.ofPRmergedinLastYear)&space;+&space;(2*No.ofIssuesRaisedinLastYear)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Activity&space;Score&space;=&space;(3*No.ofPRmergedinLastYear)&space;+&space;(2*No.ofIssuesRaisedinLastYear)" title="Activity Score = (3*No.ofPRmergedinLastYear) + (2*No.ofIssuesRaisedinLastYear)" /></a> |
| 109 | +----------------------------------------------------------------------------------------- |
| 110 | + |
| 111 | +### User Score |
| 112 | +<a href="https://www.codecogs.com/eqnedit.php?latex=User&space;Score&space;=&space;(0.5&space;*&space;BasePoints)&space;+&space;(2&space;*&space;CreationPoints)&space;+&space;(1*ActivityPoints)&space;+&space;(2&space;*&space;ContributionPoints)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?User&space;Score&space;=&space;(0.5&space;*&space;BasePoints)&space;+&space;(2&space;*&space;CreationPoints)&space;+&space;(1*ActivityPoints)&space;+&space;(2&space;*&space;ContributionPoints)" title="User Score = (0.5 * BasePoints) + (2 * CreationPoints) + (1*ActivityPoints) + (2 * ContributionPoints)" /></a> |
| 113 | +----------------------------------------------------------------------------------------- |
| 114 | + |
| 115 | + |
| 116 | +### Skill Score |
7 | 117 |
|
| 118 | +First, skill score is calculated for each topic the User is interested in : |
8 | 119 |
|
9 |
| -#### Metrics Used |
| 120 | +| Weight | Contribution | |
| 121 | +|-------- | -----------------| |
| 122 | +| 1 | Number of PRs | |
| 123 | +| 1 | Number of Issues| |
10 | 124 |
|
11 |
| -##### Base Score |
| 125 | +SKill score for a topic is finally calculated as : |
12 | 126 |
|
13 |
| -##### Base Score |
| 127 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Skill&space;Score&space;=&space;(Number&space;of&space;PR&space;in&space;the&space;Topic)&space;+&space;(Number&space;of&space;Issue&space;in&space;the&space;Topic)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Skill&space;Score&space;=&space;(Number&space;of&space;PR&space;in&space;the&space;Topic)&space;+&space;(Number&space;of&space;Issue&space;in&space;the&space;Topic)" title="Skill Score = (Number of PR in the Topic) + (Number of Issue in the Topic)" /></a> |
14 | 128 |
|
15 |
| -### Repository Rating |
| 129 | +----------------------------------------------------------------------------------------- |
16 | 130 |
|
17 |
| -#### Metrics Used |
18 | 131 |
|
19 |
| -## Matching Algorithm |
|
0 commit comments