Skip to content
Extraits de code Groupes Projets
Valider 4a63da22 rédigé par Prince Addae's avatar Prince Addae
Parcourir les fichiers

view

parent bf5b6057
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -20,35 +20,36 @@ pip install tabulate
```
##Project Structure
## Project Structure
The project is organized into the following key components:
###Configuration and Constants
### Configuration and Constants
1. **configs.py**
- This code defines an EvalConfig class that stores configurations for evaluating multiple recommendation models. It specifies a list of models, each with its name, class, and parameters. Metrics are defined to evaluate model performance under different scenarios: split evaluation, Leave-One-Out, and on the entire dataset. Other parameters include test set size and number of recommendations to consider.
2. **constants.py**
- This code defines a Constant class that stores paths to datasets and column names for content and evidence data. Paths to content, evidence, and evaluation directories are defined based on the data directory path. File names and column names for article and rating data are specified, along with the rating scale.
###Data Loaders
### Data Loaders
3. **loaders.py**
Loads rating and item data from specified CSV files in the Constant class of the constants module.
- Loads rating and item data from specified CSV files in the Constant class of the constants module.
The `load_ratings` function loads rating data.
- The `load_ratings` function loads rating data.
The `load_items` function loads item data.
- The `load_items` function loads item data.
The `export_evaluation_report` function merges rating and item data, then exports the evaluation report to a CSV file.
- The `export_evaluation_report` function merges rating and item data, then exports the evaluation report to a CSV file.
The data is loaded into pandas DataFrames, with an option available to load rating data in the format expected by the Surprise library if needed.
- The data is loaded into pandas DataFrames, with an option available to load rating data in the format expected by the Surprise library if needed.
###Recommender Models
### Recommender Models
4. **models.py**
Defines several basic recommendation algorithms for the Surprise library.
- Defines several basic recommendation algorithms for the Surprise library.
The get_top_n function takes a list of predictions and returns the top recommendations for each user.
Recommendation algorithms are defined as classes inheriting from Surprise's AlgoBase class, each implementing an estimate method to predict user ratings for items.=======
- The `get_top n` function takes a list of predictions and returns the top recommendations for each user.
- Recommendation algorithms are defined as classes inheriting from Surprise's `AlgoBase` class, each implementing an `estimate` method to predict user ratings for items.
=======
Ces codes se trouveront dans le même dossier que chacun des jupyter notebook (.ipynb).
### configs.py
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter