当前位置:网站首页>阿里天池学习赛 新闻文本分类
阿里天池学习赛 新闻文本分类
2022-08-11 05:13:00 【甜辣uu】
当时我的成绩 阿里天池
原始数据 训练的词向量 模型 代码都在下面这两个链接里 一个完整版 一个不完整版
链接:https://pan.baidu.com/s/1I8l-5f0-IlrSPa3aP6nY2A
提取码:1111
复制这段内容后打开百度网盘手机App,操作更方便哦
链接:https://pan.baidu.com/s/1XNaM7fc96aSBi-sML-_vEw
提取码:1111
复制这段内容后打开百度网盘手机App,操作更方便哦
from gensim.models import KeyedVectors
from gensim.scripts.glove2word2vec import glove2word2vec
import pandas as pd
import numpy as np
import torch
from torch import nn
import torch.utils.data as data
import torch.nn.functional as F
from torch import tensor
from sklearn.metrics import f1_score
from datetime import datetime
import time
#csv数据量的数目测试 一共有20000条
with open("train_set839.csv", 'r') as f: #计算长度
hang_count=len(f.readlines())
# print(hang_count)
#先把csv中一个句子拿出来 然后把每个单词去词训练库里面找对应的向量规定对于每个句子矩阵都构建一个2000,300的矩阵。
def hang_vectoes_label(index): # 要读取csv文本第几行的文章数据 会返回一个 列表里面是文章的词向量矩阵和标签值
row=df.va
边栏推荐
- Switch and Router Technology - 36-Port Mirroring
- Prometheus :(一)基本概念
- 2022 Quality Officer-Civil Construction Direction-General Basic (Quality Officer) Exam Mock 100 Questions and Online Mock Exam
- Some common mysql entry exercises
- MySQL索引
- 普林斯顿微积分读本05第四章--求解多项式的极限问题
- 批量修改数据库等视频文件名称
- Golden Warehouse Database KingbaseGIS User Manual (6.8. Geometry Object Input Function)
- Switch and Router Technology - 22/23 - OSPF Dynamic Routing Protocol/Link State Synchronization Process
- guava RateLimiter uniform current limit
猜你喜欢
C language antithesis: who is the murderer!
Switches and routers technology - 24 - configure OSPF single area
0708作业---商品信息
Redis-数据类型(基本指令、String、List、Set、Hash、ZSet、BitMaps、HyperLogLog、GeoSpatial)/发布和订阅
Switch and Router Technology - 25 - OSPF Multi-Area Configuration
2022年Android面试中最常问的问题是什么?
Thymeleaf
分库分表之sharding-proxy
C语言题解:谁是凶手!
Switch and Router Technology - 36-Port Mirroring
随机推荐
元宇宙社交应用,靠什么吸引用户「为爱发电」?
ESP8266 教程3 — 通过TCP组建局域网并通信
Trilium使用总结
Difference between @Resource and @Autowired
[QNX Hypervisor 2.2 User Manual] 10.16 vdev virtio-blk
IDEA模板总结
C语言题解:谁是凶手!
Mysql入门练习
代理模式(简要介绍)
StarUML使用心得
ARM Architecture 4: Embedded Hardware Platform Interface Development
log4j2漏洞复现以及解决方案
You must understand - the nine built-in objects and four domain objects of JSP
面试题整理
Switches and routers technology - 24 - configure OSPF single area
FPGA engineer interview questions collection 111~120
Switch and Router Technology - 32 - Named ACL
你务必得明白——JSP的九大内置对象与四大域对象
Redis-数据类型(基本指令、String、List、Set、Hash、ZSet、BitMaps、HyperLogLog、GeoSpatial)/发布和订阅
Use Adobe genuine software for prostitution to reduce the slow employment and non-employment of fresh graduates