Skip to content

Commit

Permalink
Add ordered version of the correlation matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
richhuwtaylor committed Jul 12, 2023
1 parent f581ccc commit 0797d14
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The SQL scripts and Python notebooks of this project follow the natural order of
- [metric-scores](./part2/metric-scores/) contains a notebook for producing normalised ("scored") versions of each event metric.
- [metric-cohorts](./part2/metric-cohorts/) contains notebooks for performing cohort analysis on inidividual and grouped versions of our metrics.
- [metric-correlations](./part2/metric-correlations/) contains a notebook for calculating and visualising the matrix of Pearson correlation coefficients between metrics.
- [grouping-behavioural-metrics](./part2/grouping-behavioural-metrics/) contains notebooks for:
- [group-behavioural-metrics](./part2/group-behavioural-metrics/) contains notebooks for:
- grouping metrics together using hierarchical clustering and generating a loading matrix for averaging together the scores of those groups
- applying the loading matrix to create grouped scores.
- applying the loading matrix to create grouped scores.

The subscription data, analytics data and the churn metrics produced from them are stored locally in a PostgreSQL database.
10 changes: 10 additions & 0 deletions output/socialnet_dataset_ordered_correlation_matrix.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
,adview_per_month,like_per_month,newfriend_per_month,post_per_month,message_per_month,reply_per_month,account_tenure,dislike_per_month,unfriend_per_month
adview_per_month,1.0,0.662707136998776,0.5155801715882699,0.6545620207055507,0.12101325624190232,0.0751021196542281,-0.0019437373423645912,0.4391853892122247,-0.0020187641981022257
like_per_month,0.662707136998776,1.0,0.5334950583131047,0.6618593973252881,0.11629249364332349,0.07341856060222672,-0.0692606560838715,0.44605982240068626,-0.00466616962699346
newfriend_per_month,0.5155801715882699,0.5334950583131047,1.0,0.5273385267251172,0.0749606965249761,0.030551388160938685,-0.042239864878939534,0.3481970205369475,0.0024566410749911403
post_per_month,0.6545620207055507,0.6618593973252881,0.5273385267251172,1.0,0.10082253019220927,0.05372091382091004,-0.06472070173256626,0.42607363400488113,0.008733868145453513
message_per_month,0.12101325624190232,0.11629249364332349,0.0749606965249761,0.10082253019220927,1.0,0.8777487651705026,-0.11309657561756434,0.14959849278407378,-0.0033898154520688355
reply_per_month,0.0751021196542281,0.07341856060222672,0.030551388160938685,0.05372091382091004,0.8777487651705026,1.0,-0.10606362432259536,0.11967648657440069,-0.013014171111163774
account_tenure,-0.0019437373423645912,-0.0692606560838715,-0.042239864878939534,-0.06472070173256626,-0.11309657561756434,-0.10606362432259536,1.0,0.04836431875366124,0.10481937148026692
dislike_per_month,0.4391853892122247,0.44605982240068626,0.3481970205369475,0.42607363400488113,0.14959849278407378,0.11967648657440069,0.04836431875366124,1.0,0.005424266219103167
unfriend_per_month,-0.0020187641981022257,-0.00466616962699346,0.0024566410749911403,0.008733868145453513,-0.0033898154520688355,-0.013014171111163774,0.10481937148026692,0.005424266219103167,1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 0797d14

Please sign in to comment.