Skip to content

Commit

Permalink
Merge pull request #12 from siesgstarena/recommendation-system
Browse files Browse the repository at this point in the history
Recommendation system
  • Loading branch information
SalmanAd01 authored Feb 11, 2023
2 parents a55b724 + a1e198f commit 9abbf35
Show file tree
Hide file tree
Showing 11 changed files with 310,547 additions and 0 deletions.
21 changes: 21 additions & 0 deletions recommendation_system/problem_recommendation/README.md
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>


Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions recommendation_system/problem_recommendation/data/raw/README.md
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 recommendation_system/problem_recommendation/data/raw/problems.json

Large diffs are not rendered by default.

Loading

0 comments on commit 9abbf35

Please sign in to comment.