Skip to main content

ANN based learning of quantifiers

Project description

quants package

Package for Artifical Neural Network (ANN) based learning of quantifiers.

It contains definition of scenes of elements and classes for both quantifier sampling and NN simple example package.

Classes

Quantifer classes

These classes are a quantifier hierarchy with methods and definitions for:

  • Scenes that are composed of world elements pertaining to use of a sentence of the form "q as are bs".
  • Construction of quantifier if parameters (such as in the case of ExactlyN for instance) are required.
  • Static method for generation of a completely random scene.
  • Generation of permuted prototype scenes that are evaluated as true under the given quantifier q.
  • Evaluation of a given scene (returns TRUE for scenes generated by the same quantifier q in the previous method).

Classifier class approach

This approach assumes that quantifiers are learned as a group, essentially each quantifier q TRUE scene is a negative example for all other quantifiers q'. There is of course many scenes for which more than one quantifier is evaluated as TRUE, for instance if "Both students are eating" is TRUE then "Some students are eating" is also TRUE, this can be mitigated by implicatures which we do not address.

The classifier is in effect a solver for which q makes the sentence "q as are bs" most likely given an input scene s.

This enables us to use not only the quantifier quantify evaluation methods but the classifier in order to generate a teacher-student scheme.

AE approach

The AE approach tries to let an AE look at scenes where a given quantifier q was used by a teacher (language speaker), this is repeated many times till whatever structure typical to scenes TRUE under the quantifier q are encoded in the AE hidden values' represented structure. When learning is complete and when we are given a scene we use the AE as an anomaly detector to decide whether the scene is True under the quantifier q. The idea is that after seeing many q TRUE scenes a non q TRUE scene will have relatively high reconstruction errors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quants-2.0.1.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file quants-2.0.1.tar.gz.

File metadata

  • Download URL: quants-2.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for quants-2.0.1.tar.gz
Algorithm Hash digest
SHA256 afe57984b4f239422a44edf0d912f62dc5803406c90d3c379f6c418f47de060e
MD5 5f487f2bb096ea7d1aca0cc23092458d
BLAKE2b-256 9848a9125f29904e1cbfee9efc2a01d13597c25c070967658bd9491ae5b0abfb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page