|
1338 | 1338 | "display(pairwise_changed_git_files_with_dependencies.corr(method='pearson'))\n",
|
1339 | 1339 | "\n",
|
1340 | 1340 | "display(\"Pairwise changed git files compared to dependency weights - Spearman Correlation\")\n",
|
1341 |
| - "display(pairwise_changed_git_files_with_dependencies.corr(method='spearman'))\n", |
1342 |
| - "\n", |
1343 |
| - "from scipy.stats import pearsonr, spearmanr\n", |
| 1341 | + "display(pairwise_changed_git_files_with_dependencies.corr(method='spearman'))" |
| 1342 | + ] |
| 1343 | + }, |
| 1344 | + { |
| 1345 | + "cell_type": "code", |
| 1346 | + "execution_count": null, |
| 1347 | + "id": "5a4ae651", |
| 1348 | + "metadata": {}, |
| 1349 | + "outputs": [], |
| 1350 | + "source": [ |
| 1351 | + "if pairwise_changed_git_files_with_dependencies.shape[0] < 5:\n", |
| 1352 | + " print(\"Less than 5 samples are not enough to calculate p-values\")\n", |
| 1353 | + "else:\n", |
| 1354 | + " from scipy.stats import pearsonr, spearmanr\n", |
1344 | 1355 | "\n",
|
1345 |
| - "display(\"Pearson Correlation with p-value for commitCount and dependencyWeight\")\n", |
1346 |
| - "display(pearsonr(pairwise_changed_git_files_with_dependencies['commitCount'], pairwise_changed_git_files_with_dependencies['dependencyWeight']))\n", |
| 1356 | + " display(\"Pearson Correlation with p-value for commitCount and dependencyWeight\")\n", |
| 1357 | + " display(pearsonr(pairwise_changed_git_files_with_dependencies['commitCount'], pairwise_changed_git_files_with_dependencies['dependencyWeight']))\n", |
1347 | 1358 | "\n",
|
1348 |
| - "display(\"Spearman Correlation with p-value for commitCount and dependencyWeight\")\n", |
1349 |
| - "display(spearmanr(pairwise_changed_git_files_with_dependencies['commitCount'], pairwise_changed_git_files_with_dependencies['dependencyWeight']))" |
| 1359 | + " display(\"Spearman Correlation with p-value for commitCount and dependencyWeight\")\n", |
| 1360 | + " display(spearmanr(pairwise_changed_git_files_with_dependencies['commitCount'], pairwise_changed_git_files_with_dependencies['dependencyWeight']))" |
1350 | 1361 | ]
|
1351 | 1362 | },
|
1352 | 1363 | {
|
|
0 commit comments