Git Product home page Git Product logo

unearth.demo.mlcodes's Introduction

Unearth.Demo.MLCodes

Find codes in a string in ML.NET - are char-grams a good idea?

Often you will get text data with embedded codes, not always in the same position, and have to interpret these codes from a string.

This demo creates 2 models using the same training data (airline flight info strings), one uses Text Featurization and the other uses character tri-grams (looking for IATA Aircraft type codes like '73H').

With a training set of 10K samples the typical result is: Text Featurizing Model: 93% Accurate, CharGram Model: 98.5% accurate, but training with all the extra features takes much (10x) longer. Still the char-gram approach is worthwhile in this case.

HOWEVER, if you train with 'ManyFlightCodes' (100K samples) this becomes more like 97.8% -> 98.5%.

Adding Text Featurization or extra character n-grams (say quad-grams) makes training slower and helps accuracy only imperceptably.

The conclusion is: As always, 'It Depends'. If you have a limited set of training data then tri (or bi, or quad - depends on what you are looking for) -grams are a good idea. But the 'catch all' Text Featurization facility in ML.NET is very good, especially when paired with the SDCA algorithm and fed lots of training data. The LogisticRegression algorithm works best when you have lots of features (n-grams in this case).

unearth.demo.mlcodes's People

Contributors

endintiers avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.