-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f54d2e
commit 1ec6f62
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// const results = | ||
|
||
const totals = results.reduce((result,entry) => { | ||
if(entry.kind == "Grundstudium" && entry.status == "bestanden" && entry.mark != null){ | ||
result.GrStNote += entry.mark * entry.ects | ||
result.GrStECTS += entry.ects | ||
} | ||
|
||
if(entry.kind == "Hauptstudium" && entry.status == "bestanden" && entry.mark != null){ | ||
result.HpStNote += entry.mark * entry.ects | ||
result.HpStECTS += entry.ects | ||
} | ||
return result | ||
|
||
}, {GrStNote: 0.0, GrStECTS: 0, HpStNote: 0.0, HpStECTS: 0}) | ||
|
||
const averages = { | ||
GrAvg: totals.GrStNote / totals.GrStECTS, | ||
HpAvg: totals.HpStNote / totals.HpStECTS, | ||
BcAvg: (totals.GrStNote + totals.HpStNote) / (totals.GrStECTS + totals.HpStECTS) | ||
} | ||
|
||
const GrWeight = 0.15 | ||
const HpWeight = 0.70 | ||
const BcWeight = 0.15 | ||
|
||
const prediction = { | ||
GrPred: averages.GrAvg * GrWeight + averages.HpAvg * HpWeight + averages.BcAvg * BcWeight, | ||
} | ||
console.log(totals) | ||
console.log(averages) | ||
console.log(prediction); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "make-hdm-great-again", | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/dopeshot/make-hdm-great-again.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/dopeshot/make-hdm-great-again/issues" | ||
}, | ||
"homepage": "https://github.com/dopeshot/make-hdm-great-again#readme" | ||
} |