All Projects → Jinkeycode → keras_lstm_chinese_document_classification

Jinkeycode / keras_lstm_chinese_document_classification

Licence: other
使用 Keras 进行中文文本分类

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to keras lstm chinese document classification

npo classifier
Automated coding using machine-learning and remapping the U.S. nonprofit sector: A guide and benchmark
Stars: ✭ 18 (-64%)
Mutual labels:  classification-algorithm
Neversink Filter
This is a lootfilter for the game "Path of Exile". It hides low value items, uses a markup-scheme and sounds to highlight expensive gear and is based on economy data mining.
Stars: ✭ 2,164 (+4228%)
Mutual labels:  classification-algorithm
Awesome Graph Classification
A collection of important graph embedding, classification and representation learning papers with implementations.
Stars: ✭ 4,309 (+8518%)
Mutual labels:  classification-algorithm
MachineLearningSeries
Vídeos e códigos do Universo Discreto ensinando o fundamental de Machine Learning em Python. Para mais detalhes, acompanhar a playlist listada.
Stars: ✭ 20 (-60%)
Mutual labels:  classification-algorithm
CRC4Docker
Python scripts for the textbook "Image Analysis, Classification and Change Detection in Remote Sensing, Fourth Revised Edition"
Stars: ✭ 84 (+68%)
Mutual labels:  classification-algorithm
abess
Fast Best-Subset Selection Library
Stars: ✭ 266 (+432%)
Mutual labels:  classification-algorithm
Blur-and-Clear-Classification
Classifying the Blur and Clear Images
Stars: ✭ 88 (+76%)
Mutual labels:  classification-algorithm
pause
🍊 PAUSE (Positive and Annealed Unlabeled Sentence Embedding), accepted by EMNLP'2021 🌴
Stars: ✭ 19 (-62%)
Mutual labels:  classification-algorithm
Online-Category-Learning
ML algorithm for real-time classification
Stars: ✭ 67 (+34%)
Mutual labels:  classification-algorithm
VALIS
Vote ALlocating Immune System, an immune-inspired classification algorithm
Stars: ✭ 21 (-58%)
Mutual labels:  classification-algorithm
Hierarchical-attention-network
My implementation of "Hierarchical Attention Networks for Document Classification" in Keras
Stars: ✭ 26 (-48%)
Mutual labels:  classification-algorithm
Skin Lesion Detection Deep Learning
Skin lesion detection from dermoscopic images using Convolutional Neural Networks
Stars: ✭ 48 (-4%)
Mutual labels:  classification-algorithm
DataCLUE
DataCLUE: 数据为中心的NLP基准和工具包
Stars: ✭ 133 (+166%)
Mutual labels:  classification-algorithm
pycoal
Python toolkit for characterizing Coal and Open-pit surface mining impacts on American Lands
Stars: ✭ 20 (-60%)
Mutual labels:  classification-algorithm
Machine-Learning-with-Iris-Dataset
Data Visualization and Machine Learning with Iris Dataset.
Stars: ✭ 65 (+30%)
Mutual labels:  classification-algorithm
kelp-core
www.kelp-ml.org
Stars: ✭ 19 (-62%)
Mutual labels:  classification-algorithm

下载代码

git clone https://github.com/Jinkeycode/keras_lstm_chinese_document_classification.git

安装依赖

pip install -r requirements.txt

二分类

标签形式为[0, 0, 1, 1] 代表分类的四个样本分别为第 0 类和第 1 类

具体代码在 chinese_binary.py

多分类

标签形式为[[1, 0, 0], [0, 1, 0], [0, 0, 1]] 代表分类的四个样本分别为第 0 类、第 1 类、第 2 类

具体代码在 chinese_multi.py

训练

取消掉这几行的注释即可

# 训练模型
# model.fit(text_processed, target, batch_size=512, epochs=10, )
# 保存模型
# model.save("health_and_tech.h5")

预测

sen = "*" 改为 自己的句子

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].