Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

NAS-BERT Sentiment App

A WPF/MVVM app that trains and runs either of two English sentiment classifiers:

  • NAS-BERT: ML.NET's TorchSharp text-classification trainer fine-tunes the pretrained NAS-BERT RoBERTa architecture for ten epochs.
  • ML.NET Binary (SGD): FeaturizeText with calibrated stochastic-gradient logistic regression for a fast conventional binary classifier.

Select the model type in the combo box before training or loading a model for prediction. Model files are specific to the selected model type.

During training, three independent MVVM pages update side by side below the Training button:

  • Polarity Map projects fixed text features to two dimensions and animates the model's live positive/negative probability field and decision boundary.
  • Training Dynamics shows how the same representative samples move between negative and positive confidence over successive passes or epochs.
  • Counterfactual Graph follows related phrases such as good, not good, and very good so local changes in the learned classifier remain visible.

These views are produced from the actual intermediate SGD or NAS-BERT models; they are not elapsed-time progress indicators or post-training statistics.

Dataset format

Training accepts a headerless, tab-separated file with the review text in the first column and its sentiment label in the second column (0 = negative, 1 = positive).

Wow... Loved this place.\t1
Crust is not good.\t0

The UCI Sentiment Labelled Sentences dataset contains yelp_labelled.txt in this format.

NAS-BERT training uses the CPU runtime and is substantially slower than the ML.NET binary option. Its pretrained weights are downloaded automatically the first time it is trained.

About

Text Classification WPF App (Demo) with ML.NET TorchSharp NAS-BERT.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages