chore: Syntax Highlighting

This commit is contained in:
camera-2018
2023-08-15 01:03:42 +08:00
parent 9351ddc524
commit 4ce9a285d8
9 changed files with 48 additions and 43 deletions

View File

@@ -97,7 +97,7 @@ $$
print(similarity_matrix)
```
```
```python
A B C D E
A 1.000000 -0.476731 -0.123091 0.532181 0.969458
B -0.476731 1.000000 0.645497 -0.310087 -0.478091
@@ -124,7 +124,7 @@ $$
print(f'与物品{target_item}最相似的{num}个物品为:{sim_items}')
```
```
```python
与物品E最相似的2个物品为['A', 'D']
```
@@ -147,7 +147,7 @@ $$
print(f'用户{target_user}对物品{target_item}的预测评分为:{target_item_pred}')
```
```
```python
用户 Alice 对物品E的预测评分为4.6
```

View File

@@ -234,7 +234,7 @@ UserCF算法的两个步骤
print(similarity_matrix)
```
```
```python
1 2 3 4 5
1 1.000000 0.852803 0.707107 0.000000 -0.792118
2 0.852803 1.000000 0.467707 0.489956 -0.900149
@@ -253,7 +253,7 @@ UserCF算法的两个步骤
print(f'与用户{target_user}最相似的{num}个用户为:{sim_users}')
```
```
```python
与用户 Alice 最相似的2个用户为['user1', 'user2']
```
@@ -277,7 +277,7 @@ UserCF算法的两个步骤
print(f'用户{target_user}对物品{target_item}的预测评分为:{target_item_pred}')
```
```
```python
用户 Alice 对物品E的预测评分为4.871979899370592
```