← 开源
rmunro

pytorch_active_learning

PyTorch Library for Active Learning to accompany Human-in-the-Loop Machine Learning book

Model DevelopmentTraining toolkitsPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
995
Star
182
Fork
+0
本周
3
贡献者
创建于 2019-05-26 · 更新于 2026-10-09 · 今日第 12171 名
主要开发者
rmunrojaircastruita

rmunro/pytorch_active_learning 排名第 12,171,有 995 个星标。

同类别比较

rmunro/pytorch_active_learning 排名第 12,171,此处有 8 个同类条目;Unity-Technologies/com.unity.perception 排名第 12,167。

同类别比较
名称排名指标
yuchenlin/LLM-Blender12,158
语言:
Python
星标数:
997
分叉数:
91
简介:
[ACL2023] We introduce LLM-Blender, an innovative ensembling framework to attain consistently superior performance by leveraging the diverse strengths of multiple open-source LLMs. LLM-Blender cut the weaknesses through ranking and integrate the strengths through fusing generation to enhance the capability of LLMs.
PAIR-code/saliency12,159
语言:
Jupyter Notebook
星标数:
996
分叉数:
191
简介:
Framework-agnostic implementation for state-of-the-art saliency methods (XRAI, BlurIG, SmoothGrad, and more).
facebookresearch/av_hubert12,161
语言:
Python
星标数:
996
分叉数:
166
简介:
A self-supervised learning framework for audio-visual speech
Unity-Technologies/com.unity.perception12,167
语言:
C#
星标数:
995
分叉数:
187
简介:
Perception toolkit for sim2real training and validation in Unity
molecularsets/moses12,180
语言:
Python
星标数:
993
分叉数:
282
简介:
Molecular Sets (MOSES): A Benchmarking Platform for Molecular Generation Models
mxgmn/TextureSynthesis12,186
语言:
C#
星标数:
992
分叉数:
55
简介:
Texture synthesis from examples
MaurizioFD/RecSys2019_DeepLearning_Evaluation12,189
语言:
Python
星标数:
991
分叉数:
251
简介:
This is the repository of our article published in RecSys 2019 "Are We Really Making Much Progress? A Worrying Analysis of Recent Neural Recommendation Approaches" and of several follow-up studies.
dgasmith/opt_einsum12,192
语言:
Python
星标数:
991
分叉数:
78
简介:
⚡️Optimizing einsum functions in NumPy, Tensorflow, Dask, and more with contraction order optimization.
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Training toolkits
星标数995
分叉数182
贡献者3
创建日期2019-05-26
更新日期2026-10-09
1 天星标数0
7 天星标数0
排名12,171
上次排名12,100
排名变化-71
7 天星标排名13,300
上次 7 天星标排名13,311
7 天星标排名变化11
总星标排名11,194
上次总星标排名11,174
总星标排名变化-20
国家USA
README 摘录

PyTorch Active Learning Library for common Active Learning methods to accompany: Human-in-the-Loop Machine Learning Robert Monarch Manning Publications The code is stand-alone and can be used with the book. Active Learning methods in the library The code currently contains methods for: *Least Confidence sampling* *Margin of Confidence sampling* *Ratio of Confidence sampling* *Entropy (classification entropy)* *Model-based outlier sampling* *Cluster-based sampling* *Representative sampling* *Adaptive Representative sampling* *Active Transfer Learning for Uncertainty Sampling* *Active Transfer Learning

for Representative Sampling* *Active Transfer Learning for Adaptive Sampling (ATLAS)* The book covers how to apply them indepedently, in combination, and for different use cases in Computer Vision and Natural Language Processing. It also covers strategies for sampling for real-world diversity to avoid bias. Installation: If you clone this repo and already have PyTorch installed, you should be able to get going immediately: Running Chapter 2, Getting Started with Human-in-the-Loop Machine Learning When you run the

software, you will be prompted to classify news headlines as being disaster-related or not. The prompt will also tell you give you the option to see a precise definitions for what constitutes "disaster-related". You can also read those definitions in the code in the variable: After you have classified (annotated) enough data for evaluation and to begin training, you will see that machine learning models now train after each iteration of annotation, reporting the accuracy on your held

-out evaluation data as F-Scores and AUC. After the initial iteration of training, which will just be on randomly-chosen data, you will start to see Active Learning kick-in to find unlabeled items that the model is confused about or are outliers with novel features. The Active Learning will be evident in the annotations, too, as the disaster-related headlines will be very rare initially, but should become around 40% of the data that you are annotating after

a few iterations. Running Chapter 4, Diversity Sampling This builds on the earlier dataset. See the chapter for the details of the feature flags that allow you to sample using different types of Diversity Sampling, like Model-based Outliers, Clustering, and Representative Sampling. Requirements: The code assumes that you are using python3. If you really need to get this working on python2. \*, please let me know: the PyTorch and Active Learning algorithms _should_ all be 2. \* compliant and it is

only python's methods for getting command-line inputs that will need to be changed (python2. If enough people request it, then I'll try to update the code to be compatible for earlier versions of python! Installing PyTorch: AWS I recommend using the Deep Learning AMI on AWS, because PyTorch is already installed and can be activated with: That should be all you need to run the program immediately. For more details on using PyTorch on AWS, see: Google Cloud I

recommend using a PyTorch image for a Deep Learning virtual machine on Google Cloud, because PyTorch is already installed. Both

常见问题

记录了多少星标和分叉?

rmunro/pytorch_active_learning 有 995 个星标和 182 个分叉。

仓库排名是多少?

rmunro/pytorch_active_learning 排名第 12,171。

记录的语言和类别是什么?

rmunro/pytorch_active_learning 有 995 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

rmunro/pytorch_active_learning 与 Unity-Technologies/com.unity.perception 比较,后者排名第 12,167,有 995 个星标。

README

PyTorch Active Learning

Library for common Active Learning methods to accompany:
Human-in-the-Loop Machine Learning
Robert Monarch
Manning Publications https://www.manning.com/books/human-in-the-loop-machine-learning

The code is stand-alone and can be used with the book.

Active Learning methods in the library

The code currently contains methods for:

Least Confidence sampling

Margin of Confidence sampling

Ratio of Confidence sampling

Entropy (classification entropy)

Model-based outlier sampling

Cluster-based sampling

Representative sampling

Adaptive Representative sampling

Active Transfer Learning for Uncertainty Sampling

Active Transfer Learning for Representative Sampling

Active Transfer Learning for Adaptive Sampling (ATLAS)

The book covers how to apply them indepedently, in combination, and for different use cases in Computer Vision and Natural Language Processing. It also covers strategies for sampling for real-world diversity to avoid bias.

Installation:

If you clone this repo and already have PyTorch installed, you should be able to get going immediately:

git clone https://github.com/rmunro/pytorch_active_learning

cd pytorch_active_learning

Running Chapter 2, Getting Started with Human-in-the-Loop Machine Learning

python active_learning_basics.py

When you run the software, you will be prompted to classify news headlines as being disaster-related or not. The prompt will also tell you give you the option to see a precise definitions for what constitutes "disaster-related". You can also read those definitions in the code in the detailed_instructions variable: https://github.com/rmunro/pytorch_active_learning/blob/master/active_learning_basics.py

After you have classified (annotated) enough data for evaluation and to begin training, you will see that machine learning models now train after each iteration of annotation, reporting the accuracy on your held-out evaluation data as F-Scores and AUC.

After the initial iteration of training, which will just be on randomly-chosen data, you will start to see Active Learning kick-in to find unlabeled items that the model is confused about or are outliers with novel features. The Active Learning will be evident in the annotations, too, as the disaster-related headlines will be very rare initially, but should become around 40% of the data that you are annotating after a few iterations.

Running Chapter 4, Diversity Sampling

python diversity_sampling.py

This builds on the earlier dataset. See the chapter for the details of the feature flags that allow you to sample using different types of Diversity Sampling, like Model-based Outliers, Clustering, and Representative Sampling.

Requirements:

The code assumes that you are using python3.6 or later.

If you really need to get this working on python2.*, please let me know: the PyTorch and Active Learning algorithms should all be 2.* compliant and it is only python's methods for getting command-line inputs that will need to be changed (python2.* expects integrer inputs only). If enough people request it, then I'll try to update the code to be compatible for earlier versions of python!

Installing PyTorch:

AWS

I recommend using the Deep Learning AMI on AWS, because PyTorch is already installed and can be activated with:
source activate pytorch_p36
That should be all you need to run the program immediately.

For more details on using PyTorch on AWS, see:
https://docs.aws.amazon.com/dlami/latest/devguide/tutorial-pytorch.html

Google Cloud

I recommend using a PyTorch image for a Deep Learning virtual machine on Google Cloud, because PyTorch is already installed. Both the CPU and GPU should work: pytorch-latest-cpu

pytorch-latest-gpu

For more details on using PyTorch on Google Cloud, see:
https://cloud.google.com/deep-learning-vm/docs/images

Microsoft Azure

I recommend using a Data Science pre-configured virtual machine on Microsoft Azure:
https://azure.microsoft.com/en-us/develop/pytorch/ The Azure Notebook option might also be a good option, but I haven't tested it out: please let me know if you do!

Linux / Mac / Windows

If you're installing locally or on a cloud server without PyTorch pre-installed, you can use these options:

Mac:
conda install pytorch torchvision -c pytorch

Linux/Windows:
conda install pytorch torchvision cudatoolkit=9.0 -c pytorch

These local instructions are current as of June 2019. PyTorch are great about maintaining quickstart instructions, so I recommend going there if these commands don't work for you for some reason. See "QUICK START LOCALLY" at:
https://pytorch.org/

Mac users should also make sure they are using python3.6 or later, as Mac's still ship with python2.7 by default. See above re support for 2.7 if you really require it.

For pip users, it is possible that you can install pytorch with the following commands: pip3 install torch or pip3 install torch However, this sometimes works and sometimes doesn't depending on the versions of various libraries and your exact operating system. That's why conda is recommended over pip on the pytorch website.

Data Sources

Currently, the data used is from the "Million News Headlines" dataset posted on Kaggle:
https://www.kaggle.com/therohk/million-headlines The data is taken from headlines from Australia's "ABC" news organization. They are in Austalian English, which will be closer to UK English than US English, but a complete lexical subset of UK & US English, differing only in that some words in Australian English have meanings that do not occur in UK or US English.

However, I intend to replace it soonish. The headlines are all lower-case and stripped of all characters other than a-z and 0-9: no punctuation, accented characters, etc. Many of the headlines seem to be truncated for some reason, too. So, I will update it with a dataset that is closer to true headlines.

This dataset is perfectly fine for everything that you need to learn in this code - it is just that the resulting annotations/models will be less useful in real-world situations.

排名相邻
同类项目