RepositoryPythonITItaly
giacbrd

giacbrd/ShallowLearn

An experiment about re-implementing supervised learning models based on shallow neural network approaches (e.g. fastText) with some additional exclusive features and nice API. Written in Python and fully compatible with Scikit-learn.

198stars
29forks
17issues
0views

🧠 ShallowLearn: Học máy giám sát từ mạng nơ-ron nông, tích hợp sẵn với scikit-learn

ShallowLearn tái cài đặt các mô hình học máy giám sát dựa trên mạng nơ-ron nông như word2vec và fastText, kết hợp các tính năng độc đáo và API thân thiện, hoàn toàn tương thích với scikit-learn.

ShallowLearn là một dự án thử nghiệm viết bằng Python, nhằm xây dựng lại các mô hình học máy giám sát dựa trên các phương pháp mạng nơ-ron nông (shallow neural networks) như fastText và word2vec. Dự án kế thừa và tối ưu từ Gensim, đồng thời hỗ trợ đầy đủ các phương thức tiêu chuẩn của scikit-learn như fit, predict, predict_proba. Dữ liệu đầu vào là văn bản thô, mỗi mẫu là một danh sách token (từ của tài liệu).

✨ Điểm nổi bật

  • GensimFastText: Mô hình dựa trên thuật toán fastText từ Gensim, hỗ trợ Softmax, Hierarchical Softmax và Negative Sampling.
  • FastText: Cài đặt supervised learning của fastText qua fastText.py, hỗ trợ subwords và n-gram features bằng hashing trick.
  • Online learning: Hỗ trợ partial_fit để học trực tuyến, kết hợp với hashing trick để xây dựng bộ phân loại văn bản mạnh mẽ.
  • Pre-trained embeddings: Cho phép tải word vectors đã huấn luyện trước hoặc huấn luyện embedding bằng fit_embeddings.
  • Persistence: Hỗ trợ lưu và tải mô hình qua save và load, tận dụng giao diện SaveLoad của Gensim với hỗ trợ nén.
  • Tương thích scikit-learn: Tất cả mô hình đều tuân thủ API của scikit-learn, dễ dàng tích hợp vào pipeline.
  • Benchmark: Đạt hiệu năng tốc độ vượt trội so với các phương pháp truyền thống trong phân loại văn bản.

💡 Vì sao đáng chú ý

ShallowLearn khác biệt từ các thư viện khác ở sự kết hợp giữa sự đơn giản của mạng nơ-ron nông và sức mạnh của các kỹ thuật như hashing trick, online learning và pre-trained embeddings. Dự án đặc biệt phù hợp cho các ứng dụng phân loại văn bản, học trực tuyến và khai thác tri thức ngôn ngữ dạng embedding. Với tốc độ nhanh và API thân thiện, ShallowLearn là lựa chọn hiệu quả cho cả thử nghiệm và sản xuất.


#MachineLearning #Python #ScikitLearn #FastText #Word2Vec #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.2k
Oct 24, 2026
RepositoryPython
PrashantRanjan09/WordEmbeddings-Elmo-Fasttext-Word2Vec

Using pre trained word embeddings (Fasttext, Word2Vec)

157
Jun 19, 2018
RepositoryPython
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

105.1k
Oct 26, 2026
RepositoryJupyter Notebook
microsoft/ML-For-Beginners

12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all

91.7k
Oct 21, 2026
RepositoryPython
onnx/onnx

Open standard for machine learning interoperability

21.6k
Oct 26, 2026
RepositoryPython
piskvorky/gensim

Topic Modelling for Humans

16.5k
Nov 1, 2025
RepositoryPython
duoergun0729/nlp

兜哥出品 <一本开源的NLP入门书籍>

2.5k
Jan 6, 2025
RepositoryPython
JasonKessler/scattertext

Beautiful visualizations of how language differs among document types.

2.3k
Jul 4, 2026
RepositoryPython
explosion/sense2vec

🦆 Contextually-keyed word vectors

1.7k
Mar 27, 2026