|
|
@@ -852,7 +852,12 @@ func getUserIndexFromAnalysisAll(dateRecord UserBusinessAnalysisAll, ParaWeight |
|
|
|
result += float64(dateRecord.StarRepoCount) * getParaWeightValue("StarRepoCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.LoginCount) * getParaWeightValue("LoginCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.WatchedCount) * getParaWeightValue("WatchedCount", ParaWeight, 0.3) |
|
|
|
result += float64(dateRecord.CommitCodeSize) * getParaWeightValue("CommitCodeSize", ParaWeight, 0.1) |
|
|
|
codeLine := float64(dateRecord.CommitCodeSize) |
|
|
|
limitCodeLine := getParaWeightValue("LimitCommitCodeSize", ParaWeight, 1000) |
|
|
|
if codeLine >= limitCodeLine { |
|
|
|
codeLine = limitCodeLine |
|
|
|
} |
|
|
|
result += codeLine * getParaWeightValue("CommitCodeSize", ParaWeight, 0.01) |
|
|
|
result += float64(dateRecord.SolveIssueCount) * getParaWeightValue("SolveIssueCount", ParaWeight, 0.2) |
|
|
|
result += float64(dateRecord.EncyclopediasCount) * getParaWeightValue("EncyclopediasCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.CreateRepoCount) * getParaWeightValue("CreateRepoCount", ParaWeight, 0.05) |
|
|
@@ -881,12 +886,12 @@ func getUserIndex(dateRecord UserBusinessAnalysis, ParaWeight map[string]float64 |
|
|
|
result += float64(dateRecord.StarRepoCount) * getParaWeightValue("StarRepoCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.LoginCount) * getParaWeightValue("LoginCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.WatchedCount) * getParaWeightValue("WatchedCount", ParaWeight, 0.3) |
|
|
|
codeLine := float64(dateRecord.CommitCodeSize) / 1000 |
|
|
|
limitCodeLine := getParaWeightValue("LimitCommitCodeSize", ParaWeight, 100) |
|
|
|
codeLine := float64(dateRecord.CommitCodeSize) |
|
|
|
limitCodeLine := getParaWeightValue("LimitCommitCodeSize", ParaWeight, 1000) |
|
|
|
if codeLine >= limitCodeLine { |
|
|
|
codeLine = limitCodeLine |
|
|
|
} |
|
|
|
result += codeLine * getParaWeightValue("CommitCodeSize", ParaWeight, 0.1) |
|
|
|
result += codeLine * getParaWeightValue("CommitCodeSize", ParaWeight, 0.01) |
|
|
|
result += float64(dateRecord.SolveIssueCount) * getParaWeightValue("SolveIssueCount", ParaWeight, 0.2) |
|
|
|
result += float64(dateRecord.EncyclopediasCount) * getParaWeightValue("EncyclopediasCount", ParaWeight, 0.1) |
|
|
|
result += float64(dateRecord.CreateRepoCount) * getParaWeightValue("CreateRepoCount", ParaWeight, 0.05) |
|
|
|