Training Code

The training code includes the following class and functions:

class train.FuzzyArt(x, T, rho, beta, alpha, nep, update)[source]

Train using ART Neural Network

Parameters:
  • x – Input data
  • rho – Free parameter
  • beta – Choice Parameter
  • alpha – Learning Rate
  • nep – Number of epochs
create(I, T, nc, j)[source]

Resonance did not occur - create new template

Parameters:
  • I – Input
  • T – Template
  • nc – Number of Categories
  • j – Input matrix iteration value
Return T:

Template matrix with new template

update(I, T, j, cmax)[source]

Resonance did occur - update new template

Parameters:
  • I – Input
  • T – Template
  • cmax – Maximum choice template location
  • j – Input matrix iteration value
Return T:

Template matrix with update template

match_choice(c, norm, normI, normT)[source]

Checks match criterion Compute choice equation Discovers best choice

Parameters:
  • norm – minimum of input and templates
  • normI – norm of input
Returns:

returns category choice location

template_options_loop(cmax, chmax, ch, nc)[source]

Match Criterion

Parameters:
  • cmax – Maximum choice (initialized to be -1)
  • chmax – Match Criterion (initialized to be -1)
  • ch – Template choice
  • nc – Number of Categories
Return cmax:

Maximum choice template location

while loop end when ->

art_train(I, T, T_length)[source]

Train ART - Create Template Matrix

Parameters:
  • I – Input Matrix
  • T – Template Matrix
  • cmax – Max choice (initialized to be -1)
  • chmax – Match Criterion (initialized to be -1)
Return T:

Final Template