-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from siesgstarena/recommendation-system
Recommendation system
- Loading branch information
Showing
11 changed files
with
310,547 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,21 @@ | ||
## Performance based problem recommendation | ||
<br> | ||
|
||
## About | ||
1) The recommendation is independent of the type of problem, it's completely dependent on the language in which the user has solved the previous problem. | ||
2) The recommendation system (success score) is based on formula:- 1/(1+TS-PS); | ||
where TS=successful submissions/total submissions, | ||
PS=successful submissions for a particular language/total submissions for particular language | ||
3) For training the model ,KNN algorithm is used. | ||
4) Based on the calculated success score for a particular problem, the user will be recommended a problem having a similar success score. So the user will be recommended with problems having a similar success score to that of the previous problem solved based on language used, irrespective of type of problem. | ||
5) The actual flask application is private which is using this methods to recommended problems. | ||
<br> | ||
|
||
## Setup | ||
|
||
``` | ||
pip install -r requirements.txt | ||
``` | ||
<br> | ||
|
||
|
210 changes: 210 additions & 0 deletions
210
recommendation_system/problem_recommendation/data/processed/success_score.csv
Large diffs are not rendered by default.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
recommendation_system/problem_recommendation/data/raw/README.md
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,52 @@ | ||
## Data Structure for files | ||
|
||
### Submissions | ||
|
||
```json | ||
[ | ||
{ | ||
"_id":{"$oid":"5b608157e228ec0020a1fcf5"}, | ||
"userId":{"$oid":"5b5d756037392f89933e7514"}, | ||
"problemId":{"$oid":"5b5c8cd7276e2200208fed62"}, | ||
"contestId":{"$oid":"5b5c89ef30db8a0020962414"}, | ||
"language":"C++14", | ||
"fileContent":"fileContentURL", | ||
"time":"0s", | ||
"memory":"3452KB", | ||
"output":"outputURL", | ||
"status":"Accepted", | ||
"points":0, | ||
"createdAt":{"$date":"2018-07-31T15:33:43.362Z"}, | ||
"updatedAt":{"$date":"2018-11-11T11:51:18.721Z"}, | ||
"__v":0, | ||
"duringContest":true | ||
} | ||
] | ||
|
||
``` | ||
|
||
### Problems | ||
|
||
```json | ||
[ | ||
{ | ||
"_id":{"$oid":"5b5c8cd7276e2200208fed62"}, | ||
"code":"UNI01", | ||
"points":0, | ||
"name":"Problem Name", | ||
"description":"Problem Description", | ||
"explainInput":"Input Explain", | ||
"explainOutput":"Output Explain", | ||
"example":"Input Data Output Data", | ||
"explanation":"", | ||
"tags":["adhoc"], | ||
"outputFile":"outputFileURL", | ||
"inputFile":"inputFileURL", | ||
"contestCode":"UNIVERSE", | ||
"createdAt":{"$date":"2018-07-28T15:33:43.03Z"}, | ||
"updatedAt":{"$date":"2018-11-11T14:18:53.641Z"}, | ||
"__v":0, | ||
"constraints":"ConstraintData" | ||
} | ||
] | ||
``` |
5,949 changes: 5,949 additions & 0 deletions
5,949
recommendation_system/problem_recommendation/data/raw/problems.json
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.