/Statistical-homework-one

统计学习方法:线性向量机 + K最近邻方法分类 Statistical Learning: linearSVC + KNN classification

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

Statistical-homework-one

python license codeql

介绍

本项目原为秋季统计学习导论作业,我在完成代码和报告后选择将其开源。任务共包含两项:

  1. 利用load_breast_cancer函数载入样本并选用一种分类函数对其分类,此项目选用linearSVC进行分类
  2. 载入news对应的CSV文件,利用KNN方法对其分类

安装教程

  1. 安装requirements.txt中对应的库即可
  2. Fake news文件可从Fake news下载
  3. Real news文件可从Real news下载

使用说明

  1. 依据任务选用Task 1/2.py文件即可

参与贡献

  1. Fork 本仓库
  2. 新建Dev分支
  3. 提交代码
  4. 新建 Pull Request

Introduction

This project is homework 1 of Course 80250272-An Introduction to Statistical Learning Theory. We decided to make it open-source after we finished the homework and reports

  1. Use function load_breast_cancer to load the breast cancer set and select a methon to classify them,we chooselinearSVCas the method
  2. Load the CSV files respectively,and use KNN method to classify the news

Install

  1. Install package according to requirements.txt
  2. Fake news can be downloaded from Fake news
  3. Real news can be downloaded from Real news

Usage

  1. Use Task 1/2.py according to your task

Contribute

  1. Fork this repo
  2. Create Dev branch
  3. Edit code
  4. Create Pull Request