Python implements book recommendation system project based on deep learning algorithm

Explanation: This is a machine learning practical project (with data + code + documentation + video explanation ). If you need data + code + documentation + video explanation, you can go directly to the end of the article to get it.

 

1. Project Background

Online recommender systems are the thing for many e-commerce sites. The recommendation system widely recommends products to customers who are most suitable for their tastes and characteristics. According to the user-book interaction records in the real world, using deep learning related technologies, an accurate and stable book recommendation system is established to predict the books that users may read .

This project applies a deep learning embedding model to implement a book recommendation system.

2. Data acquisition

The modeling data for this time comes from the Internet (compiled by the author of this project), and the statistics of the data items are as follows:

The data details are as follows (partial display):

Some data display:

 

3. Data preprocessing

3.1 View data with Pandas tools

Use the head() method of the Pandas tool to view the first five rows of data:

 

As you can see from the figure above, there are 3 fields in total.

key code:

3.2 Missing value statistics

Use the info() method of the Pandas tool to count the absence of each feature:

 

As can be seen from the above figure, there are no missing values ​​in the data, and the total data volume is 981,756.

key code:

3.3 View the shape of the dataset

Use the shape attribute of the Pandas tool to view the shape of the dataset:

The key code is as follows: 

 

Count the number of users and the number of books:

 The key code is as follows:

 

4. Exploratory Data Analysis

4.1. Group visualization

Group statistics by scoring, as shown in the following figure:

 

5. Feature engineering

5.1 Dataset splitting

The data set is divided into training set and test set, 80% training set and 20% test set, the key code is as follows:

 

6. Build a book recommendation model

It mainly uses deep learning embedding model algorithm for target recommendation.

6.1 Building the initial embedding model

 

Model summary information:

 6.2 Training set loss graph

6.3 Model Evaluation

 

As can be seen from the figure above, the loss of this model is 0.9201.

6.4 Model Prediction

 

 6.5 Model Optimization

Model summary information:

 

7. Model Evaluation and Prediction

7.1 Training set loss graph

7.2 Evaluation indicators and results

 

As can be seen from the above figure, the optimized model loss is 0.7458, which is lower than the initialization model.

7.3 Model Prediction

 

As can be seen from the above figure, books can be recommended for users based on the predicted ratings. For example, users can be sorted by group, and the ratings are sorted from high to low, and books with high ratings can be recommended to users.

8. Conclusion and Outlook

In summary, this project uses deep learning algorithms to build a book recommendation system, and finally proves that our proposed model works well and can be used for modeling predictions in daily life to improve production value.

The materials and project resources required for the actual combat of this machine learning project are as follows:

Project Description:
Link: https://pan.baidu.com/s/1dW3S1a6KGdUHK90W-lmA4w 
Extraction code: bcbp

Guess you like

Origin blog.csdn.net/weixin_42163563/article/details/127271779