|
1 | 1 | # GitLit Algorithms
|
2 | 2 |
|
3 | 3 |
|
4 |
| -## Rating Algorithms |
| 4 | +## Rating Algorithms |
5 | 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 | 6 |
|
7 | 7 | -----------------------------------------------------------------------------------------
|
8 | 8 |
|
9 |
| -### User Rating |
| 9 | +## User Rating |
10 | 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 | 11 |
|
12 | 12 | Each score is a boundless score calculated by summation of weighted sums of each of the following metric.
|
@@ -128,4 +128,120 @@ SKill score for a topic is finally calculated as :
|
128 | 128 |
|
129 | 129 | -----------------------------------------------------------------------------------------
|
130 | 130 |
|
| 131 | +## Repository Rating |
| 132 | + |
| 133 | +### General Traits |
| 134 | + |
| 135 | +1. General activity and relevance of repo |
| 136 | + |
| 137 | +*Motive : To get a basic idea* |
| 138 | + |
| 139 | +| Weight | Trait | |
| 140 | +|-------- | ------------------ | |
| 141 | +| 3 | Number of watchers | |
| 142 | +| 2 | Numer of stars | |
| 143 | +| 5 | Number of PRs | |
| 144 | +| 1.5 | Number of forks | |
| 145 | +| 4 | Number of issues | |
| 146 | + |
| 147 | +#### Base Score |
| 148 | + |
| 149 | +<a href="https://www.codecogs.com/eqnedit.php?latex=\mathbf{Base&space;Score}&space;=&space;(0.3&space;*&space;Watchers)&space;+&space;(0.2&space;*&space;Stars)&space;+&space;(0.15&space;*&space;Forks)&space;+&space;(0.5&space;*&space;PRs)&space;+&space;(0.4&space;*&space;Issues)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\mathbf{Base&space;Score}&space;=&space;(0.3&space;*&space;Watchers)&space;+&space;(0.2&space;*&space;Stars)&space;+&space;(0.15&space;*&space;Forks)&space;+&space;(0.5&space;*&space;PRs)&space;+&space;(0.4&space;*&space;Issues)" title="\mathbf{Base Score} = (0.3 * Watchers) + (0.2 * Stars) + (0.15 * Forks) + (0.5 * PRs) + (0.4 * Issues)" /></a> |
| 150 | +----------------------------------------------------------------------------------------- |
| 151 | + |
| 152 | +### Actvity |
| 153 | + |
| 154 | +1. Average Issue Resolution Time |
| 155 | + |
| 156 | +*Motive : To weigh the response time* |
| 157 | + |
| 158 | +| Weight | Formula | |
| 159 | +|-------- | ------------------ | |
| 160 | +| 8 | <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{TimeTakenToCloseIssues}{TotalNuberOfIssues}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{TimeTakenToCloseIssues}{TotalNuberOfIssues}" title="\frac{TimeTakenToCloseIssues}{TotalNuberOfIssues}" /></a> | |
| 161 | + |
| 162 | +Average Issue Resolution Score is calculated from the above formula based on the following conditions : |
| 163 | + |
| 164 | +| Average Issue Resolution Time ( in days ) | Score | |
| 165 | +| ------------------------------------------- | ------- | |
| 166 | +| less than or equal to 20 | 20 | |
| 167 | +| less than or equal to 50 | 10 | |
| 168 | +| greater than 50 | 5 | |
| 169 | + |
| 170 | +2. Weekly Contributor Count |
| 171 | + |
| 172 | +*Motive : To acount for contributor activity* |
| 173 | + |
| 174 | +(*Note : A contributor,here, means anyone who has created an Issue or a PR*) |
| 175 | + |
| 176 | + |
| 177 | +| Weight | Formula | |
| 178 | +|-------- | ------------------ | |
| 179 | +| 5 | <a href="https://www.codecogs.com/eqnedit.php?latex=No.OfWeeklyContributor" target="_blank"><img src="https://latex.codecogs.com/gif.latex?No.OfWeeklyContributor" title="No.OfWeeklyContributor" /></a> | |
| 180 | + |
| 181 | +3. Weekly Contributor Change |
| 182 | + |
| 183 | +*Motive : To acount for contributor activity* |
| 184 | + |
| 185 | +| Weight | Formula | |
| 186 | +|-------- | ------------------ | |
| 187 | +| 8 | <a href="https://www.codecogs.com/eqnedit.php?latex=TotalContributorCount&space;-&space;WeeklyContributorCount" target="_blank"><img src="https://latex.codecogs.com/gif.latex?TotalContributorCount&space;-&space;WeeklyContributorCount" title="TotalContributorCount - WeeklyContributorCount" /></a> | |
| 188 | + |
| 189 | + |
| 190 | +#### Activity Score |
| 191 | + |
| 192 | +<a href="https://www.codecogs.com/eqnedit.php?latex=ActivityScore&space;=&space;(8*AvgIssueResolutionScore)&space;+&space;(5*WeeklyContributorCount)&space;+&space;(8*WeeklyContributorChange)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?ActivityScore&space;=&space;(8*AvgIssueResolutionScore)&space;+&space;(5*WeeklyContributorCount)&space;+&space;(8*WeeklyContributorChange)" title="ActivityScore = (8*AvgIssueResolutionScore) + (5*WeeklyContributorCount) + (8*WeeklyContributorChange)" /></a> |
| 193 | + |
| 194 | + |
| 195 | +----------------------------------------------------------------------------------------- |
| 196 | + |
| 197 | +### Inclusivity |
| 198 | + |
| 199 | +1. PR Acceptance Ratio |
| 200 | + |
| 201 | +*Motive : To account for new code submitted w.r.t old code* |
| 202 | + |
| 203 | +| Weight | Formula | |
| 204 | +|-------- | ------------------ | |
| 205 | +| 8 | <a href="https://www.codecogs.com/eqnedit.php?latex=\frac{MergedPRs}{TotalNumberOfPRs}" target="_blank"><img src="https://latex.codecogs.com/gif.latex?\frac{MergedPRs}{TotalNumberOfPRs}" title="\frac{MergedPRs}{TotalNumberOfPRs}" /></a> | |
| 206 | + |
| 207 | +2. New Contributor Count |
| 208 | + |
| 209 | +*Motive : To account for first time contributors to repo in the week* |
| 210 | + |
| 211 | +| Weight | Formula | |
| 212 | +|-------- | ------------------ | |
| 213 | +| 4 | <a href="https://www.codecogs.com/eqnedit.php?latex=No.OfFirstTimeContributorToRepo" target="_blank"><img src="https://latex.codecogs.com/gif.latex?No.OfFirstTimeContributorToRepo" title="No.OfFirstTimeContributorToRepo" /></a> | |
| 214 | + |
| 215 | +#### Inclusivity Score |
| 216 | + |
| 217 | +<a href="https://www.codecogs.com/eqnedit.php?latex=InclusivityScore&space;=&space;(0.8&space;*&space;PRacceptanceRatio&space;)&space;+&space;(&space;0.4*No.OfNewContributors&space;)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?InclusivityScore&space;=&space;(0.8&space;*&space;PRacceptanceRatio&space;)&space;+&space;(&space;0.4*No.OfNewContributors&space;)" title="InclusivityScore = (0.8 * PRacceptanceRatio ) + ( 0.4*No.OfNewContributors )" /></a> |
| 218 | + |
| 219 | +----------------------------------------------------------------------------------------- |
| 220 | + |
| 221 | + |
| 222 | +### Merit |
| 223 | + |
| 224 | +1. Complexity of Repo |
| 225 | + |
| 226 | +It is estimated by calcuating the Skill Points of the top 10 contributors of the repo in the topics the Repo and the Contributors both share. |
| 227 | + |
| 228 | +<a href="https://www.codecogs.com/eqnedit.php?latex=RepoComplexity&space;=&space;(SkillPointsOfTopTenContributors)" target="_blank"><img src="https://latex.codecogs.com/gif.latex?RepoComplexity&space;=&space;(SkillPointsOfTopTenContributors)" title="RepoComplexity = (SkillPointsOfTopTenContributors)" /></a> |
| 229 | + |
| 230 | +#### Merit Score |
| 231 | + |
| 232 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Merit&space;Score&space;=&space;Repo&space;Complexity" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Merit&space;Score&space;=&space;Repo&space;Complexity" title="Merit Score = Repo Complexity" /></a> |
| 233 | + |
| 234 | +----------------------------------------------------------------------------------------- |
| 235 | + |
| 236 | + |
| 237 | +### Total Repo Score |
| 238 | + |
| 239 | +<a href="https://www.codecogs.com/eqnedit.php?latex=Total&space;Repo&space;Score&space;=&space;BaseScore&space;+&space;ActivityScore&space;+InclusivityScore&space;+&space;MeritScore" target="_blank"><img src="https://latex.codecogs.com/gif.latex?Total&space;Repo&space;Score&space;=&space;BaseScore&space;+&space;ActivityScore&space;+InclusivityScore&space;+&space;MeritScore" title="Total Repo Score = BaseScore + ActivityScore +InclusivityScore + MeritScore" /></a> |
| 240 | + |
| 241 | + |
| 242 | + |
| 243 | + ----------------------------------------------------------------------------------------- |
| 244 | + |
| 245 | + |
| 246 | + |
131 | 247 |
|
0 commit comments