Template
doc: change challenge operation
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# 挑战一:kNN 算法
|
||||
|
||||
## 实验说明
|
||||
## 挑战说明
|
||||
|
||||
- 自行在 [function.py](./function.py) 中编写实现 KNN 分类算法。
|
||||
- 函数输入: 待分类的样本 inX, 训练数据集 dataSet, 训练集对应的标签 labels。
|
||||
@@ -8,36 +8,32 @@
|
||||
|
||||
## 注意事项
|
||||
|
||||
实验开始前必须在 [function.py](./function.py#L26-L27) 中填写自己的学号和姓名!
|
||||
挑战开始前必须在 [function.py](./function.py#L26-L27) 中填写自己的学号和姓名!
|
||||
|
||||
- 可以自行导入其他库,需要在 [requirements.txt](./requirements.txt) 添加依赖,若无依赖,则相当于未进行实验。
|
||||
- 可以自行导入其他库,需要在 [requirements.txt](./requirements.txt) 添加依赖,若未在 [requirements.txt](./requirements.txt) 中添加使用到的依赖,则无法自动评测,成绩为零。
|
||||
- 在 [function.py](./function.py) 中实现 KNN 分类算法。
|
||||
- 自动评测脚本仅会加载 [classify0](./function.py#L41) 函数,请勿修改函数名。
|
||||
- 训练集在本目录下的 [datingTrainSet2.tsv](./datingTrainSet2.tsv) 中。
|
||||
- 评测数据集在本目录下的 [datingTestSet2.tsv](./datingTestSet2.tsv) 中。
|
||||
|
||||
提交后会进行自动评测,评测系统环境如下:
|
||||
提交后会进行自动评测,评测所用的环境如下:
|
||||
|
||||
- Python 3.10.12
|
||||
- Ubuntu 22.04.4 LTS
|
||||
- Python 3.10.12
|
||||
|
||||
## 实验操作
|
||||
## 挑战操作
|
||||
|
||||
[注册平台帐号](https://git.intcplab.cn/user/sign_up)
|
||||
|
||||

|
||||
|
||||
进入[此页面](https://git.intcplab.cn/LufsX/Exp-kNN),点击右上角的「派生」按钮,将仓库「派生」到自己的账号下。
|
||||
进入[此页面](https://git.intcplab.cn/LufsX/Challenge-kNN),点击页面的「使用模版」按钮,
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
填写仓库名称(建议和对应仓库一致,例如本仓库名 `Challenge-kNN`),勾选模版选项中的「Git 数据(默认分支)」后,点击「创建仓库」按钮。
|
||||
|
||||
然后进入设置开启 Actions 功能,该功能用于自动评测实验代码。
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
可以选择拉取到本地写代码,也可以直接在线编辑。
|
||||
|
||||
|
||||
+4
-4
@@ -2,21 +2,21 @@
|
||||
import numpy as np
|
||||
|
||||
"""
|
||||
实验说明:
|
||||
挑战说明:
|
||||
- 自行编写实现 KNN 分类算法。
|
||||
- 输入: 待分类的样本 inX, 训练数据集 dataSet, 训练集对应的标签 labels。
|
||||
- 输出: 预测的分类标签。
|
||||
|
||||
注意事项:
|
||||
- 可以自行导入其他库,需要在 requirements.txt 添加依赖,若无依赖,则相当于未进行实验。
|
||||
- 可以自行导入其他库,需要在 requirements.txt 添加依赖,若未在 requirements.txt 中添加使用到的依赖,则无法自动评测,成绩为零。
|
||||
- 在 function.py 中实现 KNN 分类算法。
|
||||
- 自动评测脚本仅会加载 classify0 函数,请勿修改函数名。
|
||||
- 训练集在本目录下的 datingTrainSet2.tsv 中。
|
||||
- 评测数据集在本目录下的 datingTestSet2.tsv 中。
|
||||
|
||||
实验环境:
|
||||
- Python 3.10.12
|
||||
挑战环境:
|
||||
- Ubuntu 22.04.04 LTS
|
||||
- Python 3.10.12
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 73 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
Reference in New Issue
Block a user