{"id":24265008,"url":"https://github.com/michalredm/dm-project2","last_synced_at":"2025-03-05T00:28:14.453Z","repository":{"id":242953938,"uuid":"804327740","full_name":"MichalRedm/DM-project2","owner":"MichalRedm","description":"This repository contains the code for the second project for Data Mining classes at the Poznań University of Technology, created by the team Kung Fu Pandas. ","archived":false,"fork":false,"pushed_at":"2024-06-05T21:01:02.000Z","size":1853,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-15T10:34:13.264Z","etag":null,"topics":["movie","rating-prediction"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MichalRedm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-22T11:43:32.000Z","updated_at":"2024-06-05T20:48:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"a29a35bc-6be3-4890-b307-3d2745b64215","html_url":"https://github.com/MichalRedm/DM-project2","commit_stats":null,"previous_names":["michalredm/dm-project2"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FDM-project2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FDM-project2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FDM-project2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MichalRedm%2FDM-project2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MichalRedm","download_url":"https://codeload.github.com/MichalRedm/DM-project2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241944008,"owners_count":20046660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["movie","rating-prediction"],"created_at":"2025-01-15T09:56:05.633Z","updated_at":"2025-03-05T00:28:14.435Z","avatar_url":"https://github.com/MichalRedm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DM-project2\n\n[![Python package](https://github.com/MichalRedm/DM-project2/actions/workflows/python-package.yml/badge.svg)](https://github.com/MichalRedm/DM-project2/actions/workflows/python-package.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis repository contains the code for the second project for Data Mining classes at the Poznań University of Technology. The code in this repository has been created by the team *Kung Fu Pandas*, consisting of:\n- [Piotr Balewski](https://github.com/PBalewski),\n- [Adam Dobosz](https://github.com/addobosz),\n- [Wiktor Kamzela](https://github.com/Wector1),\n- [Michał Redmer](https://github.com/MichalRedm).\n\nThe general purpose of the code in this repository is to predict ratings given by different users for movies in the [Movie Lens dataset](https://grouplens.org/datasets/movielens/).\n\n## Prequisities\n\nTo run the code from this repository, you need to have the following installed on your computer:\n- [Python](https://www.python.org/downloads/) (version 3.10 or higher).\n\nAdditionally, to run code samples in the file `samples.ipynb` [Jupyer Notebook](https://jupyter.org/install) is needed (the file can alternatively be opened in [Google Colaboratory](https://colab.research.google.com/)).\n\n## Setup\n\nTo download the respository to your local computer run the following command:\n\n```\n$ git clone https://github.com/MichalRedm/DM-project2.git\n```\n\nThen, you need to install all the Python dependencies. It is recommended to use [Python virtual environment](https://docs.python.org/3/library/venv.html) and install the necessary packages on it instead of installing them globally.\n\n```\n$ pip install -r requirements.txt\n```\n\nSince the files containing Movie Lens dataset are quite large, they are not stored on the repository. Instead, they can be pulled from the Movie Lens dataset website with the following script:\n\n```\n$ python download_data.py\n```\n\nOnce this is done, you are ready to run the code.\n\n## Rating prediction\n\nThe file `dm_project2/predict.py` is responsible for predicting a rating for a given user-movie pair and a given dataset:\n```\n$ python dm_project2/predict.py \u003cuser_id\u003e \u003cmovie_id\u003e \u003cdataset_name\u003e\n```\nName of the dataset should be either `ml-latest-small` or `ml-latest`.\n\nExample:\n```\n$ python dm_project2/predict.py 1 1 ml-latest-small\nPredicted rating for movie \"Toy Story (1995)\" and user with userId=1: 4.432912849776076 (rounded: 4.5)\n```\n\n## Testing the results\n\nTo test how well our method works, use the script `dm_project2/test.py`.\n```\npython dm_project2/test.py \u003cdataset_name\u003e \u003cnumber_of_samples\u003e\n```\nName of the dataset should be either `ml-latest-small` or `ml-latest`; however, testing on the larger dataset is not recommended, as it is very slow and requires high computational power.\n\nExample:\n```\n$ python dm_project2/test.py ml-latest-small 10000\nModel MSE:     0.8084 (standarized:  0.7450)\nBaseline MSE:  0.9664 (standarized:  0.8906)\n```\n\n## Code samples\n\nTo have some insight into how our function for data preprocessing operates, visit the file [samples.ipynb](https://github.com/MichalRedm/DM-project2/blob/main/dm_project2/samples.ipynb).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalredm%2Fdm-project2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichalredm%2Fdm-project2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichalredm%2Fdm-project2/lists"}