Table of Contents

0. Metamodel
1. Templates
1. Abstractions
2. Code units
3. Process
4. Requirements
2. Constants
parameter positions
1. Requirements
Categorize transactions
The project should not impose constraints
The user should be informed
Transactions are in a database
2. Process
0. Process overview
1. The user's project
Config
csv file
external script
2. categorizerai
Services and DTOs
ai
data
db
ui
update
External dependencies
not yet modeled
Deviations
Model Errors
Unimplemented behaviours

List of Figures

1. Thing and Constraint
2. Container
3. Type and property
4. Constraints
5. Data abstractions
6. Constraints and Derived Relations
7. Callable
8. Constraints
9. Containers
10. Constraints
11. Constant providers
12. Constraints
13. DTO and factory
14. Constraints
15. Service
16. Constraints
17. Delegate
18. Constraints
19. External units
20. Unit test
21. Type definition
22. Process
23. Process constraints
24. Requirements
25. Constraints
26. Requirements
27. Categorize transactions
28. The project should not impose constraints
29. The user should be informed
30. Transactions are in a database
31. Process overview
32. Get Data From database
33. Config
34. csv file
35. external script
36. Compute suggestions
37. CategorizerService
38. ai
39. AIData
40. AITestData
41. AccuracyCheckService
42. NeuralNetBuilderService
43. NeuralNetTrainerService
44. prepare data for AI
45. DataTestData
46. NumericConverterService
47. PrepareDataService
48. CategoryService
49. DbTestData
50. ui
51. AccuracyErrorDisplayService
52. ChoiceAskService
53. DisplayAccuracyService
54. OptionDisplayService
55. TransactionDisplayService
56. UITestData
57. ChoiceObtainerService
58. OptionPreparatorService
59. RowUpdateService
60. UpdateService
61. UpdateTestData
62. choices
63. External dependencies
64. New Zenta View

0. Metamodel

1. Templates

1. Abstractions

Abstract entities are used to derive other ones. Abstract entities are white, and they are not meant to show up in any model.

0. Thing, Constraint and Derived Relation

Figure 1. Thing and Constraint

Thing and Constraint



Thing

A Thing is a Basic Object.

Appears in: Thing and Constraint.

connections:

Constraint

A Constraint is a Basic Object.

Appears in: Thing and Constraint.

connections:

  • Constraint constrains Thing

Derived Relation

A Derived Relation is a Basic Object.

Appears in: Thing and Constraint.

connections:

  • Derived Relation expands Thing

1. Container

Figure 2. Container

Container



Container

A Container is a Thing.

Appears in: Container.

A container can contain another container, hence it can be contained by another container.

connections:

2. Type and property

Figure 3. Type and property

Type and property



Constraints

Figure 4. Constraints

Constraints



Has a type

Has a type is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'is a/is type of,1')[@xsi:type='Type']) 
                                    
                                 

) = 1

connections:

Property

A Property is a Thing.

Appears in: Constraints, Type and property.

A field of a type.

connections:

Type

A Type is a Container.

Appears in: Type and property, Data abstractions, Constant providers.

This is an abstract entity used for anything which is either usually implemented as a class, or have some kind of property.

connections:

3. Data abstractions

Figure 5. Data abstractions

Data abstractions



constraints

Figure 6. Constraints and Derived Relations

Constraints and Derived Relations



has an example as/is an example of

Has an example as/is an example of is a Derived Relation.

Appears in: Constraints and Derived Relations.

2| zenta:neighboursRun1($p1,$p2,'is based on/is base of,2;has an example as/is an example of,2')

connections:

is a/is type of

Is a/is type of is a Derived Relation.

Appears in: Constraints and Derived Relations.

1| zenta:neighboursRun1($p1,$p2,'has an example as/is an example of,2;is of/is type of,1')

connections:

uses

Uses is a Derived Relation.

Appears in: Constraints and Derived Relations.

2|

zenta:neighboursRun1($p1,$p2,'has an example as/is an example of,2;is/is used as parameter,2;uses,2;is implemented by/implements,2')
                                    |
                                    zenta:neighboursRun1($p1,$p2,'has an example as/is an example of,2;results,2;is implemented by/implements,2') |
                                    zenta:neighboursRun1($p1,$p2,'is based on/is base of,2;has an example as/is an example of,2;is/is used as parameter,2;uses,2;is
                                    implemented by/implements,2') |
                                    zenta:neighboursRun1($p1,$p2,'is based on/is base of,2;has an example as/is an example of,2;results,2;is implemented by/implements,2')
                                    
                                    
                                    
                                    
                                 

connections:

Used by at least one behaviour

Used by at least one behaviour is a Constraint.

Appears in: Constraints and Derived Relations.

analysis| count(zenta:neighbours($p1,$p2,'uses,2')[@xsi:type='Behaviour']) > 0

connections:

  • Used by at least one behaviour constrains Constant

Have an example test artifact

Have an example test artifact is a Constraint.

Appears in: Constraints and Derived Relations.

design| (

count(zenta:neighbours($p1,$p2,'has an example as/is an example of,1')[@xsi:type='Test Artifact'])
                                    
                                 

) > 0

connections:

Is an example of a Business object

Is an example of a Business object is a Constraint.

Appears in: Constraints and Derived Relations.

design| (

count(zenta:neighbours($p1,$p2,'has an example as/is an example of,2')[@xsi:type='Test Artifact'])
                                    
                                 

) > 0

connections:

Business Object

A Business Object is a Type.

Appears in: Callable, Constraints and Derived Relations, Data abstractions.

A Business Object is an object which have meaning in the context of certain steps of a process. It is in most cases carries the business meaning of something which is result of one service and input of another one. It does not have implementation, but tightly coupled with a type which has.

connections:

Constant Provider

A Constant Provider is a Type.

Appears in: Data abstractions.

Constant provider is a type which have only constants as properties.

Constant

A Constant is a Property.

Appears in: Requirements, Callable, Constraints and Derived Relations, Data abstractions.

Constant is a special property. Its value is predetermined and never changes.

connections:

4. Callable

Figure 7. Callable

Callable



Constraints

Figure 8. Constraints

Constraints



Have a position

Have a position is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'referenced as/references,1')[@xsi:type='Position']) 
                                    
                                 

) > 0

connections:

Is of exactly one Business Object

Is of exactly one Business Object is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'is/is used as parameter,1')[@xsi:type='Business Object']) 
                                    
                                 

) = 1

connections:

  • Is of exactly one Business Object constrains Parameter

Belongs to a callable

Belongs to a callable is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'uses,2')[@xsi:type='Callable']) +
                                    count(zenta:neighbours($p1,$p2,'uses,2')[@xsi:type='Service']) 
                                    
                                 

) = 1

connections:

Callable

A Callable is a Type.

Appears in: Requirements, Callable.

A Callable is an abstraction for anything which can be called.

connections:

Parameter

A Parameter is a Thing.

Appears in: Constraints, Callable.

A parameter is determined by the Business Object (and the Type through it), its position, and an optional default value.

connections:

Position

A Position is a Thing.

Appears in: Callable.

The position of a parameter in the argument list of a callable

connections:

2. Code units

Code units are the units which are implemented within the project. They are brownish in color, to make it

1. containers

Figure 9. Containers

Containers



Constraints

Figure 10. Constraints

Constraints



Contains at least one package

Contains at least one package is a Constraint.

Appears in: Constraints.

design| if ($p2/@xsi:type = 'Project') then

 count(zenta:neighbours($p1,$p2,'contains,1')[@xsi:type='Package']) >0
                                    
                                 

else

 true()
                                    
                                 

connections:

  • Contains at least one package constrains Project

In exactly one Project or Package

In exactly one Project or Package is a Constraint.

Appears in: Constraints.

design| (

 count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='External Project']) +
                                    count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Project']) +
                                    count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Package'])
                                    
                                 

) = 1

connections:

  • In exactly one Project or Package constrains Package

Package

A Package is a Container.

Appears in: Constraints, Containers.

A set of code contributing to a functionality of a product. Packages contain process steps, and the code units (Services, DTOs, and other packages) implementing those process steps.

connections:

Project

A Project is a Container.

Appears in: Constraints, Containers.

A set of code and documentation which is bundled together as a shippable unit useable for its intended audience (also known as product), or the complete procedure of software development from requirement gathering to testing and maintenance, carried out according to the execution methodologies, in a specified period of time to deliver the product.

Projects can contain packages.

connections:

2. Constant providers

Figure 11. Constant providers

Constant providers



Constraints

Figure 12. Constraints

Constraints



Configuration provider

A Configuration provider is a Constant Provider.

Appears in: Constraints, Constant providers.

A set of constants provided by the user to parametrize the behaviour of the product.

connections:

TestData

A TestData is a Constant Provider.

Appears in: Constraints, Constant providers, Unit test.

modeled

A set of constants for testing.

Test data contains the test artifacts. This is the set of inputs and corresponding outputs which pins the contract of the services. Test artifacts can be stubs describing the behaviour of parameters or actual data.

The test data for basic non-error behaviour should be provided by architects, and each data which is an easy conversation of another data should be defined using the conversation. This improves integration consistency.

Dependencies between test data units should be noncircular. Test data is placed in the same subsystem in the test hierarchy as the corresponding Service. Test data should not reference production code in any way. If the constant is needed, it should be copied over to test data.

In Java:

  • it is a class
  • The test artifacts are in public fields
  • The functions generating the test artifacts are private methods.
  • DTOs and other test data units are instantiated using new.

In Python:

  • test data units are classes ending as TestData, and beginning with the name of the package or service they are related.
  • all methods of test data units are private (start with ‘_’)
  • other test data units are instantiated in the constructor by “calling them”

connections:

Can contain only constants

Can contain only constants is a Constraint.

Appears in: Constraints.

design| count(zenta:neighbours($p1,$p2,'contains,1')[@xsi:type='Property']) = 0

connections:

Contains only Test Artifacts

Contains only Test Artifacts is a Constraint.

Appears in: Constraints.

design| count(zenta:neighbours($p1,$p2,'contains,1')[@xsi:type='Property']) = 0

connections:

  • Contains only Test Artifacts constrains TestData

3. DTO and Factory

Figure 13. DTO and factory

DTO and factory



Constraints

Figure 14. Constraints

Constraints



Have a factory

Have a factory is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'is created by/creates,1')[@xsi:type='Factory']) 
                                    
                                 

) = 1

connections:

  • Have a factory constrains DTO

Creates a DTO

Creates a DTO is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'is created by/creates,2')[@xsi:type='DTO']) 
                                    
                                 

) = 1

connections:

DTO

A DTO is a Type.

Appears in: Constraints, DTO and factory, Delegate.

DTO is used to hold a data object. It is transparent and have no business logic.

A DTO is placed in a data subpackage in the production code hierarchy

In java it is a class with no methods, just private fields, and Lombok @Getter, @Setter and possibly @EqualsAndHashCode annotations. A DTO have no explicit constructor, its constructor should not be used, except in its factory. A DTO is placed in the package designated by the architect.

A DTO have an associated factory responsible for creating it. A creation of a DTO instance in production code should only be initiated using its factory.

As all aspects of the DTO is determined by the architect, it is good practice to generate it.

invariants hashcode, toString and equals may be implemented in a subclass. In this case that subclass should be used throughout the rest of the code. This rule may change later as more experience is gathered, as this breaks the rule that a DTO should not have logic.

In python a DTO is a class with @DTO decorator, and propery type-annotated fields, initialized as None. No methods, not even __init__.

connections:

Factory

A Factory is a Type.

Appears in: Constraints, DTO and factory.

A factory is a special kind of service solely responsible to create default instances of a DTO or Delegate.

A Factory is placed in a data subpackage in the production code hierarchy

In java it is a class annotated as @Service extending FactoryBean, and resides in the data subpackage of the created object’s package. In Python, factories should be created only for implemented DTOs, for all others we consider types.SimpleNamespace to be the factory.

As it is fully boilerplate, it is a good practice to generate it.

connections:

4. Service

Figure 15. Service

Service



Constraints

Figure 16. Constraints

Constraints



Implements a Process Step

Implements a Process Step is a Constraint.

Appears in: Constraints.

design| count(zenta:neighbours($p1,$p2,'is implemented by/implements,2')[@xsi:type='Process Step']) = 1

connections:

  • Implements a Process Step constrains Service

Service

A Service is a Callable.

Appears in: Constraints, Service, Delegate.

A service is a unit implementing some logic. In java it is a class and an interface. In Python it is a class, using the Java naming convention, including the one class one module rule.

A service do not have any state. In java that means that the service only have fields for constants and the management of its dependencies (see below), no other fields. In python dependencies and constants are static: they are created in the module before the class definition.

A service does one thing. Therefore it either have one public function, or more public functions with different types of parameters where those functions do the same.

In polymorphic languages all the functions of the service therefore have to have the same name (“call”) as a rule. An exception of the rule when the compiler/interpreter cannot reliably determine the correct function to use.

A service references its dependencies in an abstract way, using dependency inversion. If there is a dependency injection mechanism for the language, that mechanism should be used. In java by default we use Spring, which means that the class is marked as @Service, and the dependencies are fields referencing the interface of the dependent service using @Autowired. In Python by default we use winterboot. Python services are marked with the @Service annotation, and referenced as serviceName = Autowired(‘servicename’). When the wider framework uses other DI mechanisms, their use should be modelled after this as closely as possible.

The service is placed in the production code hierarchy in a way which is related to its place in the business logic, and makes it easy to find it. In java this means that both the interface and implementation should be placed in the same package, the interface name ending in Service, the implementation name ending with ServiceImpl. In Python the class name (hence the module basename) ends with ‘Service’. In Python the service class should be descendant of object. The interface have one method called “call”.

If the need to break down the functionality of a package arises driven by programming activities (e.g. because of exceeding code complexity measures), the programmer’s responsibility is to notify the architect. The process of the resolution of the issue is left at the architect’s discretion until the need arises to further clarify it.

In java and python Services should not have static methods except when the needs of a Delegate dictate it.

In java all interface methods should have an @Override annotation in the implementation class. Other methods should be private.

In Python a service have a single public method called “call”, all other methods should start with ‘_’ to make them private. At least the call method should be properly annotated with the types of both the parameters and return value.

connections:

5. Delegate

Figure 17. Delegate

Delegate



Constraints

Figure 18. Constraints

Constraints



Uses at least one service

Uses at least one service is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'contributes to/uses,2')[@xsi:type='Service']) 
                                    
                                 

) > 0

connections:

  • Uses at least one service constrains Delegate

Uses exactly one DTO

Uses exactly one DTO is a Constraint.

Appears in: Constraints.

design| (

count(zenta:neighbours($p1,$p2,'uses,1')[@xsi:type='DTO']) 
                                    
                                 

) = 1

connections:

  • Uses exactly one DTO constrains Delegate

Delegate

A Delegate is a Type.

Appears in: Constraints, Delegate.

Delegates are to implement classes containing both state and business logic, and/or when the DI framework needs to be manually bootstrapped.

The state is delegated to a DTO

The business logic is delegated to one or more Services

In Java:

  • The DI bootstrapping is delegated to a static void method with sole parameter of this in an interface of the underlying service.
  • The state of a delegate is stored in a DTO, referenced in a field annotated with @Delegate and if the integration tests need it, @Getter annotation.
  • The underlying services are referenced using @Autowire -d fields using the interface
  • The methods use the delegate pattern, with this as an extra parameter in the delegated call.

connections:

6. External units

External units are implemented outside of the project, hence they are all grey. Configuration provider is shown earlier, and it is also an external unit.

In a model view it is a good practice to grey out elements which are outside of the scope of implementation for the view, even if they are implemented elsewhere inside the project.

Figure 19. External units

External units



External Service under DI framework

An External Service under DI framework is a Callable.

Appears in: External units.

A service which can be used by the DI framework of the project as an internal one, but implemented outside of the project.

External type

An External type is a Callable.

Appears in: External units, Type definition.

An external type, used either as data carrier, service, or both.

connections:

External Project

An External Project is a Project.

Appears in: External units.

External package

An External package is a Package.

Appears in: External units.

7. Not modeled but implemented

1. Unit test

Figure 20. Unit test

Unit test



Test Case

A Test Case is a Thing.

Appears in: Requirements, Unit test.

Tests one aspect of a behaviour.

The unit of payment for coding work.

Not modeled.

connections:

Unit Test

An Unit Test is a Type.

Appears in: Unit test.

Not modeled

A unit test is a code testing (a part of) the implementation of a Service. If there is a TCDD (temporary name) framework for the given language, that should be used instead of unit tests.

Only services implemented by the project should be tested.

A unit test is placed in the same subsystem in the test hierarchy as the service in the production code hierarchy

The unit test references the implementation class of the service, but must avoid calling methods not contained in the interface.

The unit test otherwise uses the standard practices for unit testing in the given language.

The unit tests names/descriptions are used to generate low level documentation of the project. Therefore they should be a full declarative sentence, using whatever ways the language offers: method names, annotations, and even comments may be used. If not method names are used, then naming is left to the discretion of the programmer, with minimal language-specific rules. In the face of it this is against the clean code principles, but checking that the description is indeed covers the functionality checked by the unit test is a central element of the review process, and if there is other descriptive element, then actual method names do not matter.

All behaviours should be tested in at least one unit referencing the behaviour in its name and an appropriate way in the source code (annotation or comment, if annotations are not available in the language). Separating the tests to further units (e.g. because code complexity constraints) is the responsibility of the programmer. Separation should be made in a way that minimizes boilerplate.

The unit tests should not contain constants, stubs, or helper functions constants should be used from test data units. No constants in production code should be used.

stubs describing behaviour of production code or external dependencies should be put to stub providers

stubs describing behaviour of parameters should be put to test data units

helper functions should be put to test helpers

setup can be used to actually call the tested service, and leave only the assertions to the test cases

connections:

Test Helper

A Test Helper is a Type.

Appears in: Unit test.

not modeled

The test helpers contain the methods helping assertions: assertion methods, and methods to make easier to write assertions.

In Java a testhelper contains static methods.

In python the module directly contains the methods.

connections:

Stub provider

A Stub provider is a Type.

Appears in: Unit test.

not modeled

stub providers provide the stubs describing the service behaviours using the test artifacts. There are two kinds of stubs:

  • stubs describing the behaviour of the service with respect to some external state (e.g. the role of the logged in user). These are context stubs.
  • stubs describing the service behaviour which is independent of external states: behaviour stubs

Stub providers are placed in the test hierarchy in the subsystem of the described service, with a name referencing the service described. Stubs for external dependencies go to a subsystem dedicated to that. In java, the package name is the package name of the external dependency, in python it is the “externalstubs” package in the test hierarchy.

If the need arises to place stub providers into more units, it is the responsibility of the programmer.

In java

  • stub providers are interfaces named [service name]Stubs, for example ContractRunnerStubs for ContractRunnerService
  • the stubs are created in static void methods with no parameters
  • the static void behaviour() method uses all behaviour stubs to provide the whole contract of a given service.
  • if the need arises to use additional interfaces for the same service (e.g. due to code complexity constraints), the additional code should be placed in interfaces with names starting with the name of the service, and ending with Stubs, e.g. ContractRunnerReturningContractsStubs. The additional services should extend the default-named interface so it is enough to reference that in tests. In case of multiple interfaces, it is good practice to keep only the behaviour() method in the default one.

In Python

  • stub providers are modules named [service name]StubProvider
  • stubs are defined in methods. the service to be stubbed is obtained with Autowired(). At the phase the stub services are called, this will result in a mock object.

connections:

Test Artifact

A Test Artifact is a Constant.

Appears in: Constraints and Derived Relations, Data abstractions, Unit test.

connections:

8. Python specific

Figure 21. Type definition

Type definition



Type Alias

Type Alias is a Type.

Appears in: Type definition.

A class descending from types in the typing package.

It is technically needed when a complex type annotation cannot be carried out using an external type.

The only content of the class is:

 __slots__ = ()
                                 
                                 
                              

connections:

3. Process

Figure 22. Process

Things which have business relevance but not implemented as is are colored blueish.

Process



constraints

Figure 23. Process constraints

Process constraints



Contained in a Package or a process step

Contained in a Package or a process step is a Constraint.

Appears in: Process constraints.

analysis|(

count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Package']) +
                                 count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='External package']) +
                                 count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Process Step'])+ 
                                 count(zenta:neighbours($p1,$p2,'iterates,2')[@xsi:type='Process Step'])
                                 
                              

) > 0

connections:

  • Contained in a Package or a process step constrains Process Step

Contained in at most one Package

Contained in at most one Package is a Constraint.

Appears in: Process constraints.

analysis| count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Package']) < 2

connections:

Iterates or contained in at most one Process Step

Iterates or contained in at most one Process Step is a Constraint.

Appears in: Process constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'iterates,2')[@xsi:type='Process Step']) + 
                                 count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Process Step']) 
                                 
                              

) <2

connections:

  • Iterates or contained in at most one Process Step constrains Process Step

Is done by a user or implemented by a Callable

Is done by a user or implemented by a Callable is a Constraint.

Appears in: Process constraints.

design|(

count(zenta:neighbours($p1,$p2,'is done by/does,1')) + 
                                 count(zenta:neighbours($p1,$p2,'is implemented by/implements,1')) 
                                 
                              

) = 1

connections:

  • Is done by a user or implemented by a Callable constrains Process Step

Does Process Steps

Does Process Steps is a Constraint.

Appears in: Process constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'is done by/does,2')[@xsi:type='Process Step']) 
                                 
                              

) > 0

connections:

  • Does Process Steps constrains Role

Process Step

A Process Step is a Behaviour.

Appears in: Process constraints, Process, Containers.

A behaviour which is carried out by either a role or a service. Process steps can contain other process steps, behaviours, Services and DTOs

<doctemplate> containing neighbours: <xpath>

zenta:itemizedList(zenta:neighbours(/,.,'contains,2'))
                              
                           

</xpath>

debug

<xpath> . </xpath> <doctemplate>

connections:

Role

A Role is a Thing.

Appears in: Process constraints, Process.

The responsibility for performing specific behavior.

A role is assigned to human(s).

connections:

is implemented by/implements

Is implemented by/implements is a Derived Relation.

Appears in: Process constraints.

1| if (not(zenta:neighboursRun1($p1,$p2,'is implemented by/implements,1'))) then

(zenta:neighboursRun1($p1,$p2,'iterates,2;is implemented by/implements,1') |
                              zenta:neighboursRun1($p1,$p2,'contains,2;is implemented by/implements,1') )
                              
                           

else

()
                              
                           

connections:

4. Requirements

Figure 24. Requirements

Requirements



constraints

Figure 25. Constraints

Constraints



Determined by at least one Objective

Determined by at least one Objective is a Constraint.

Appears in: Process constraints, Constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'determines,2')[@xsi:type='Objective']) 
                                 
                              

) > 0

connections:

  • Determined by at least one Objective constrains Behaviour
  • Determined by at least one Objective constrains Process Step

Determines at least one behaviour or Process Step

Determines at least one behaviour or Process Step is a Constraint.

Appears in: Constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'determines,1')[@xsi:type='Process Step']) +
                                 count(zenta:neighbours($p1,$p2,'determines,1')[@xsi:type='Behaviour']) 
                                 
                              

) > 0

connections:

  • Determines at least one behaviour or Process Step constrains Objective

Drives Objectives

Drives Objectives is a Constraint.

Appears in: Constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'drives,1')[@xsi:type='Objective']) 
                                 
                              

) > 0

connections:

  • Drives Objectives constrains Policy

Driven by at least one Policy

Driven by at least one Policy is a Constraint.

Appears in: Constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'drives,2')[@xsi:type='Policy']) 
                                 
                              

) > 0

connections:

  • Driven by at least one Policy constrains Objective

Belongs to a Process Step

Belongs to a Process Step is a Constraint.

Appears in: Constraints.

analysis| (

count(zenta:neighbours($p1,$p2,'contains,2')[@xsi:type='Process Step']) 
                                 
                              

) > 0

connections:

  • Belongs to a Process Step constrains Behaviour

is implemented by/implements

Is implemented by/implements is a Derived Relation.

Appears in: Constraints.

1| if (not(zenta:neighboursRun1($p1,$p2,'is implemented by/implements,1'))) then

zenta:neighboursRun1($p1,$p2,'contains,2;is implemented by/implements,1') 
                                 
                              

else

()
                                 
                              

connections:

  • is implemented by/implements expands Behaviour

Implementation of it belongs to a process step

Implementation of it belongs to a process step is a Constraint.

Appears in: Constraints.

design|

  if (@xsi:type='Behaviour')
                                 then
                                 	(
                                 	count(value[@ancestorName='is implemented by/implements' and @derived != 'true']) 
                                 	) > 0 
                                 else
                                 true()
                                 
                                 
                              

connections:

  • Implementation of it belongs to a process step constrains Behaviour

Policy

A Policy is a Thing.

Appears in: Constraints, Requirements.

A policy is a management level statement about what the software should do, should not do, or the perceived threats and constraints to avoid.

Policy, Threat, and Assumption of Common Criteria are modeled with a Policy.

connections:

Objective

An Objective is a Thing.

Appears in: Constraints, Requirements.

An objective is a statement about the workings or structure of the software. It is lower level than a Policy, but higher level than a behaviour.

This is the same as Objective of Common Criteria

connections:

Behaviour

A Behaviour is a Container.

Appears in: Constraints, Requirements.

A specific, implementable, testable statement about the behaviour of the software. The set of behaviours should fully define the workings of the callable (in most cases Service) implementing them.

The behaviour is the work unit offered for coding.

This is the same as Requirement in Common Criteria.

connections:

is implemented by/implements

An is implemented by/implements is a Basic Relation.

2. Constants

parameter positions

1

1 is a Position.

Appears in: NumericConverterService, PrepareDataService, AccuracyCheckService, NeuralNetBuilderService, NeuralNetTrainerService, DisplayAccuracyService, OptionDisplayService, TransactionDisplayService, ChoiceObtainerService, OptionPreparatorService, RowUpdateService, UpdateService, CategoryService.

connections:

2

2 is a Position.

Appears in: NumericConverterService, PrepareDataService, NeuralNetBuilderService, NeuralNetTrainerService, OptionDisplayService, OptionPreparatorService, RowUpdateService.

connections:

3

3 is a Position.

Appears in: NeuralNetTrainerService, OptionDisplayService, OptionPreparatorService, RowUpdateService.

connections:

4

4 is a Position.

Appears in: RowUpdateService.

connections:

1. Requirements

Figure 26. Requirements

Requirements



Categorize transactions

Figure 27. Categorize transactions

Categorize transactions



Refuse work if the accuracy of predictions are too low

Refuse work if the accuracy of predictions are too low is an Objective.

Appears in: Categorize transactions, AccuracyCheckService, NeuralNetTrainerService, ai, DisplayAccuracyService, AccuracyErrorDisplayService, ui.

connections:

The user is presented with the most probable category combinations, and chooses one of them

The user is presented with the most probable category combinations, and chooses one of them is an Objective.

Appears in: Categorize transactions, ChoiceAskService, OptionDisplayService, TransactionDisplayService, ui, OptionPreparatorService.

connections:

Use an AI to categorize the transactions

Use an AI to categorize the transactions is an Objective.

Appears in: Categorize transactions, NumericConverterService, PrepareDataService, prepare data for AI, CategorizerService, NeuralNetBuilderService, NeuralNetTrainerService, ai, Compute suggestions.

connections:

The project should not impose constraints

Figure 28. The project should not impose constraints

The project should not impose constraints



The important AI parameters should be tuneable

The important AI parameters should be tuneable is an Objective.

Appears in: The project should not impose constraints, NeuralNetBuilderService.

connections:

All aspects of the database structure are configureable

All aspects of the database structure are configureable is an Objective.

Appears in: The project should not impose constraints, PrepareDataService, CategorizerService.

connections:

The user should be informed

Figure 29. The user should be informed

The user should be informed



Information about the record and possible choices should be presented to the user in a way that makes it easy to comprehend, and contains all information needed by the user

Information about the record and possible choices should be presented to the user in a way that makes it easy to comprehend, and contains all information needed by the user is an Objective.

Appears in: The user should be informed, OptionDisplayService, TransactionDisplayService, ui.

connections:

  • Information about the record and possible choices should be presented to the user in a way that makes it easy to comprehend, and contains all information needed by the user is drived by The user should be informed about significant circumstances
  • Information about the record and possible choices should be presented to the user in a way that makes it easy to comprehend, and contains all information needed by the user determines Display choice for user
  • Information about the record and possible choices should be presented to the user in a way that makes it easy to comprehend, and contains all information needed by the user determines Display a transaction

The accuracy of the model and probability of predictions should be shown

The accuracy of the model and probability of predictions should be shown is an Objective.

Appears in: The user should be informed, AccuracyCheckService, NeuralNetTrainerService, DisplayAccuracyService, AccuracyErrorDisplayService, ui.

connections:

Transactions are in a database

Figure 30. Transactions are in a database

Transactions are in a database



The record data is provided by the user in CSV

The record data is provided by the user in CSV is an Objective.

Appears in: Transactions are in a database, external script, Get Data From database, CategorizerService.

connections:

The records are updated in the database

The records are updated in the database is an Objective.

Appears in: Transactions are in a database, CategorizerService, RowUpdateService, UpdateService, Compute suggestions.

connections:

Use category combinations determined in the database

Use category combinations determined in the database is an Objective.

Appears in: Transactions are in a database.

connections:

Categorize transactions

Categorize transactions is a Policy.

Appears in: Categorize transactions, Requirements.

connections:

Transactions are in a database

Transactions are in a database is a Policy.

Appears in: Transactions are in a database, Requirements.

connections:

The project should not impose constraints on the database structure, and be adaptable for various needs

The project should not impose constraints on the database structure, and be adaptable for various needs is a Policy.

Appears in: The project should not impose constraints, Requirements.

connections:

The user should be informed about significant circumstances

The user should be informed about significant circumstances is a Policy.

Appears in: The user should be informed, Requirements.

connections:

2. Process

0. Process overview

Figure 31. Process overview

Process overview



1. The user's project

Figure 32. Get Data From database

Get Data From database



Config

Figure 33. Config

Config



Config

Config is a Configuration provider.

Appears in: external script, Config, Get Data From database, PrepareDataService, CategorizerService, AccuracyCheckService, NeuralNetBuilderService, NeuralNetTrainerService, OptionDisplayService, CategoryService.

connections:

PROBLEM_SET_COLUMNS

PROBLEM_SET_COLUMNS is a Constant.

Appears in: external script, Config, CategorizerService.

connections:

PROBLEM_SET_FILE

PROBLEM_SET_FILE is a Constant.

Appears in: external script, Config, CategorizerService.

connections:

TRAINING_SET_COLUMNS

TRAINING_SET_COLUMNS is a Constant.

Appears in: external script, Config, CategorizerService.

connections:

TRAINING_SET_FILE

TRAINING_SET_FILE is a Constant.

Appears in: external script, Config, CategorizerService.

connections:

MIN_ACCURACY

MIN_ACCURACY is a Constant.

Appears in: Config, AccuracyCheckService.

connections:

FIRST_LAYER_NEURONS

FIRST_LAYER_NEURONS is a Constant.

Appears in: Config, NeuralNetBuilderService.

connections:

SECOND_LAYER_NEURONS

SECOND_LAYER_NEURONS is a Constant.

Appears in: Config, NeuralNetBuilderService.

connections:

BATCH_SIZE

BATCH_SIZE is a Constant.

Appears in: Config, NeuralNetTrainerService.

connections:

PROBLEM_SET_ID_COLUMN

PROBLEM_SET_ID_COLUMN is a Constant.

Appears in: Config, PrepareDataService.

connections:

PROBLEM_SET_INPUT_COLUMN

PROBLEM_SET_INPUT_COLUMN is a Constant.

Appears in: Config, PrepareDataService.

connections:

TRAINING_SET_INPUT_COLUMN

TRAINING_SET_INPUT_COLUMN is a Constant.

Appears in: Config, PrepareDataService.

connections:

TRAINING_SET_OUTPUT_COLUMN

TRAINING_SET_OUTPUT_COLUMN is a Constant.

Appears in: Config, PrepareDataService.

connections:

OPTION_DISPLAY_FORMAT

OPTION_DISPLAY_FORMAT is a Constant.

Appears in: Config, OptionDisplayService.

connections:

SQL_TO_OBTAIN_CATEGORIES

SQL_TO_OBTAIN_CATEGORIES is a Constant.

Appears in: Config, CategoryService.

connections:

  • SQL_TO_OBTAIN_CATEGORIES is contained by Config
  • SQL_TO_OBTAIN_CATEGORIES is a str
  • SQL_TO_OBTAIN_CATEGORIES is used by CS.CONFIGURED_SQL

ID_COLUMN_POSITION_IN_CATEGORIES_TABLE

ID_COLUMN_POSITION_IN_CATEGORIES_TABLE is a Constant.

Appears in: Config, CategoryService.

connections:

  • ID_COLUMN_POSITION_IN_CATEGORIES_TABLE is contained by Config
  • ID_COLUMN_POSITION_IN_CATEGORIES_TABLE is a int
  • ID_COLUMN_POSITION_IN_CATEGORIES_TABLE is used by CS.ID_COLUMN

csv file

Figure 34. csv file

csv file



column list

Column list is a Property.

Appears in: csv file.

connections:

filename

Filename is a Property.

Appears in: csv file.

connections:

csv file

Csv file is a Type.

Appears in: external script, csv file.

connections:

external script

Figure 35. external script

external script



external script

External script is an External type.

Appears in: external script, Get Data From database, External dependencies.

connections:

Problem set csv

Problem set csv is a Business Object.

Appears in: external script.

connections:

Training set csv

Training set csv is a Business Object.

Appears in: external script.

connections:

gets dataset from database

Gets dataset from database is a Behaviour.

Appears in: Get Data From database.

the dataset is put into a CSV, containing columns for at least: - id: the id of the row in the database - comment: a text compiled from the fields of the record, on which the AI decides - category id: a small number representing the (combination of) category(es) for the row

connections:

gets problemset from the database

Gets problemset from the database is a Behaviour.

Appears in: Get Data From database.

the problemset is put into a CSV, containing columns for at least: - id: the id of the row in the database - comment: a text compiled from the fields of the record, on which the AI decides

connections:

starts categorizer

Starts categorizer is a Behaviour.

Appears in: Get Data From database.

by setting up PYTHONPATH to contain the config for the preoject, and calling the CategorizerAI script

connections:

problem_set.csv

Problem_set.csv is a Test Artifact.

Appears in: external script.

1115 boo 1116 fefefe

connections:

training_set.csv

Training_set.csv is a Test Artifact.

Appears in: external script.

1112 abc 2 1113 cő 3 1114 efgh 3 1118 baz 1

connections:

User

User is a Role.

Appears in: external script, Get Data From database.

connections:

Get data from database

Get data from database is a Process Step.

Appears in: Process overview, external script, Get Data From database, prepare data for AI, Compute suggestions, External dependencies.

connections:

2. categorizerai

Figure 36. Compute suggestions

Compute suggestions



Services and DTOs

CategorizerService

Figure 37. CategorizerService

CategorizerService



CategorizerService

CategorizerService is a Service.

Appears in: CategorizerService, Compute suggestions.

connections:

loads problemset from csv

Loads problemset from csv is a Process Step.

Appears in: CategorizerService, Compute suggestions.

connections:

loads training set from csv

Loads training set from csv is a Process Step.

Appears in: CategorizerService, Compute suggestions.

connections:

ai

Figure 38. ai

ai



Services and DTOs

AIData

Figure 39. AIData

AIData



AIData

AIData is a DTO.

Appears in: PrepareDataService, AIData, OptionPreparatorService, RowUpdateService, UpdateService.

connections:

max_length

Max_length is a Property.

Appears in: AIData.

connections:

  • max_length is contained by AIData
  • max_length is a int

numberOfOutputNeurons

NumberOfOutputNeurons is a Property.

Appears in: AIData.

connections:

  • numberOfOutputNeurons is contained by AIData
  • numberOfOutputNeurons is a int

problemOids

ProblemOids is a Property.

Appears in: AIData.

connections:

problemValues

ProblemValues is a Property.

Appears in: AIData.

connections:

trainResults

TrainResults is a Property.

Appears in: AIData.

connections:

trainValues

TrainValues is a Property.

Appears in: AIData.

connections:

AIDataFactory

AIDataFactory is a Factory.

Appears in: AIData.

connections:

  • AIDataFactory creates AIData

AITestData

Figure 40. AITestData

AITestData



model

Model is a Test Artifact.

Appears in: NeuralNetBuilderService, NeuralNetTrainerService, AITestData.

self._initModel()

connections:

ACCURACY

ACCURACY is a Test Artifact.

Appears in: NeuralNetTrainerService, AITestData.

0.78

connections:

TRAIN_RESULTS

TRAIN_RESULTS is a Test Artifact.

Appears in: NeuralNetTrainerService, AITestData.

"train_results"

connections:

TRAIN_VALUES

TRAIN_VALUES is a Test Artifact.

Appears in: NeuralNetTrainerService, AITestData.

"train_values"

connections:

AITestData

AITestData is a TestData.

Appears in: NeuralNetBuilderService, NeuralNetTrainerService, AITestData.

   def _initModel(self):
                                    model = MagicMock()
                                    history = MagicMock()
                                    model.fit.return_value = history
                                    history.history.get.return_value = [self.ACCURACY]
                                    self.model = model
                                    
                                    
                                 

connections:

AccuracyCheckService

Figure 41. AccuracyCheckService

AccuracyCheckService



Accuracy

Accuracy is a Parameter.

Appears in: AccuracyCheckService.

connections:

AccuracyCheckService

AccuracyCheckService is a Service.

Appears in: AccuracyCheckService, ai.

connections:

ACCURACYCHECK_FAILURE_HANDLING

ACCURACYCHECK_FAILURE_HANDLING is a Behaviour.

Appears in: AccuracyCheckService.

If the accuracy is below MIN_ACCURACY, it displays the error message and exits the program

connections:

NeuralNetBuilderService

Figure 42. NeuralNetBuilderService

NeuralNetBuilderService



NeuralNetBuilderService

NeuralNetBuilderService is a Service.

Appears in: NeuralNetBuilderService, ai.

connections:

max_length

Max_length is a Parameter.

Appears in: NeuralNetBuilderService.

connections:

numberOfOutputNeurons

NumberOfOutputNeurons is a Parameter.

Appears in: NeuralNetBuilderService.

connections:

Neural net

Neural net is a Business Object.

Appears in: NeuralNetBuilderService, NeuralNetTrainerService.

connections:

number of categories

Number of categories is a Business Object.

Appears in: NeuralNetBuilderService.

connections:

maximum string length in all records

Maximum string length in all records is a Business Object.

Appears in: NumericConverterService, NeuralNetBuilderService.

connections:

  • maximum string length in all records is used as parameter max_length
  • maximum string length in all records is used as parameter max_length
  • maximum string length in all records is of int
  • maximum string length in all records has an example as MAX_LENGTH

There are three layers in the model

There are three layers in the model is a Behaviour.

Appears in: NeuralNetBuilderService.

connections:

All three layers are Dense

All three layers are Dense is a Behaviour.

Appears in: NeuralNetBuilderService.

connections:

The number of neurons is configureable

The number of neurons is configureable is a Behaviour.

Appears in: NeuralNetBuilderService.

in the first two layers

connections:

the number of output neurons

The number of output neurons is a Behaviour.

Appears in: NeuralNetBuilderService.

is used from the parameter

connections:

NeuralNetTrainerService

Figure 43. NeuralNetTrainerService

NeuralNetTrainerService



model

Model is a Parameter.

Appears in: NeuralNetTrainerService.

connections:

NeuralNetTrainerService

NeuralNetTrainerService is a Service.

Appears in: NeuralNetTrainerService, ai.

connections:

trainResults

TrainResults is a Parameter.

Appears in: NeuralNetTrainerService.

connections:

trainValues

TrainValues is a Parameter.

Appears in: NeuralNetTrainerService.

connections:

model accuracy

Model accuracy is a Business Object.

Appears in: AccuracyCheckService, NeuralNetTrainerService, DisplayAccuracyService.

connections:

trainValues

TrainValues is a Business Object.

Appears in: NeuralNetTrainerService.

connections:

trainResults

TrainResults is a Business Object.

Appears in: NeuralNetTrainerService.

connections:

compiles the model

Compiles the model is a Process Step.

Appears in: NeuralNetTrainerService.

loss function is sparse categorical crossentropy optimizer is adam

connections:

trains the model

Trains the model is a Process Step.

Appears in: NeuralNetTrainerService.

connections:

returns model accuracy

Returns model accuracy is a Process Step.

Appears in: NeuralNetTrainerService.

connections:

ai

Ai is a Package.

Appears in: AccuracyCheckService, NeuralNetBuilderService, NeuralNetTrainerService, AIData, ai.

connections:

build AI

Build AI is a Process Step.

Appears in: Process overview, prepare data for AI, CategorizerService, NeuralNetBuilderService, ai, Compute suggestions.

connections:

check model accuracy

Check model accuracy is a Process Step.

Appears in: Process overview, AccuracyCheckService, ai, ui.

connections:

Train AI

Train AI is a Process Step.

Appears in: Process overview, CategorizerService, NeuralNetTrainerService, ai, Compute suggestions.

connections:

data

Figure 44. prepare data for AI

prepare data for AI



Services and DTOs

DataTestData

Figure 45. DataTestData

DataTestData



OUTPUT_NEURONS

OUTPUT_NEURONS is a Test Artifact.

Appears in: DataTestData, NeuralNetBuilderService.

4

connections:

MAX_LENGTH

MAX_LENGTH is a Test Artifact.

Appears in: NumericConverterService, DataTestData, NeuralNetBuilderService.

6

connections:

TRAIN_SET_VALUES

TRAIN_SET_VALUES is a Test Artifact.

Appears in: NumericConverterService, DataTestData.

numpy.array(list(DbTestData.trainComments))

connections:

PROBLEM_SET

PROBLEM_SET is a Test Artifact.

Appears in: PrepareDataService, DataTestData.

pandas.read_csv(Config.PROBLEM_SET_FILE,'\t',encoding='utf-8',names=Config.PROBLEM_SET_COLUMNS)

connections:

TRAIN_SET

TRAIN_SET is a Test Artifact.

Appears in: PrepareDataService, DataTestData.

pandas.read_csv(Config.TRAINING_SET_FILE,'\t',encoding='utf-8',names=Config.TRAINING_SET_COLUMNS)

connections:

DataTestData

DataTestData is a TestData.

Appears in: NumericConverterService, PrepareDataService, DataTestData, NeuralNetBuilderService.

connections:

NumericConverterService

Figure 46. NumericConverterService

NumericConverterService



inputSet

InputSet is a Parameter.

Appears in: NumericConverterService.

connections:

max_length

Max_length is a Parameter.

Appears in: NumericConverterService.

connections:

NumericConverterService

NumericConverterService is a Service.

Appears in: NumericConverterService, prepare data for AI.

connections:

Input set

Input set is a Business Object.

Appears in: NumericConverterService.

connections:

input array for AI model

Input array for AI model is a Business Object.

Appears in: NumericConverterService.

connections:

Convert strings to numeric arrays

Convert strings to numeric arrays is a Process Step.

Appears in: Process overview, NumericConverterService, prepare data for AI.

connections:

NCS.ARRAY_SIZE

NCS.ARRAY_SIZE is a Behaviour.

Appears in: NumericConverterService.

the array contains a row for each string

connections:

NCS.ROW_SIZE

NCS.ROW_SIZE is a Behaviour.

Appears in: NumericConverterService.

the row contains as many elements as characters in the string

connections:

NCS.ELEMENTS

NCS.ELEMENTS is a Behaviour.

Appears in: NumericConverterService.

Each element in the row corresponds to the codepoint of the character in the string

connections:

PrepareDataService

Figure 47. PrepareDataService

PrepareDataService



PrepareDataService

PrepareDataService is a Service.

Appears in: PrepareDataService, prepare data for AI.

connections:

problemSet

ProblemSet is a Parameter.

Appears in: PrepareDataService.

connections:

trainSet

TrainSet is a Parameter.

Appears in: PrepareDataService.

connections:

data for AI

Data for AI is a Business Object.

Appears in: PrepareDataService, OptionPreparatorService, RowUpdateService, UpdateService.

connections:

  • data for AI is used as parameter data
  • data for AI is used as parameter data
  • data for AI is used as parameter data
  • data for AI is of AIData
  • data for AI is resulted by PrepareDataService
  • data for AI has an example as data

trainset dataframe

Trainset dataframe is a Business Object.

Appears in: PrepareDataService.

connections:

problemset dataframe

Problemset dataframe is a Business Object.

Appears in: PrepareDataService.

connections:

Calculates maximum string length

Calculates maximum string length is a Process Step.

Appears in: PrepareDataService.

using both the problem set and training set

connections:

calculates number of output neurons

Calculates number of output neurons is a Process Step.

Appears in: PrepareDataService.

connections:

prepares problemValues for AI

Prepares problemValues for AI is a Process Step.

Appears in: PrepareDataService.

connections:

prepares trainValues for AI

Prepares trainValues for AI is a Process Step.

Appears in: PrepareDataService.

connections:

prepares trainResults for AI

Prepares trainResults for AI is a Process Step.

Appears in: PrepareDataService.

connections:

prepares problemOids

Prepares problemOids is a Process Step.

Appears in: PrepareDataService.

connections:

data

Data is a Package.

Appears in: NumericConverterService, PrepareDataService, prepare data for AI.

connections:

db

Services and DTOs

CategoryService

Figure 48. CategoryService

CategoryService



obtain categories

Obtain categories is a Process Step.

Appears in: Process overview, OptionPreparatorService, RowUpdateService, CategoryService.

connections:

CategoryService

CategoryService is a Service.

Appears in: CategoryService.

connections:

connection

Connection is a Parameter.

Appears in: CategoryService.

connections:

CS.CONFIGURED_SQL

CS.CONFIGURED_SQL is a Behaviour.

Appears in: CategoryService.

uses SQL_TO_OBTAIN_CATEGORIES to query database

connections:

CS.ID_COLUMN

CS.ID_COLUMN is a Behaviour.

Appears in: CategoryService.

the key for categories is the id for the category uses ID_COLUMN_POSITION_IN_CATEGORIES_TABLE as the ID column

connections:

DbTestData

Figure 49. DbTestData

DbTestData



DbTestData

DbTestData is a TestData.

Appears in: TransactionDisplayService, DbTestData.

connections:

fetched_row

Fetched_row is a Test Artifact.

Appears in: TransactionDisplayService, DbTestData.

self.all_rows[3]

connections:

all_rows

All_rows is a Test Artifact.

Appears in: DbTestData.

[

(1112, "abc", 11.12, "a", "b" ),
                                    (1113, "cő", -11.13, "d", "e" ),
                                    (1114, "efgh", -11.14, "d", "e" ),
                                    (1118, "baz", -11.18, "e", "f" ),
                                    (1115, "boo", 11.15, None , None ),
                                    (1116, "fefefe", -11.16, None, None )
                                    
                                 

]

connections:

db

Db is a Package.

Appears in: CategoryService.

connections:

ui

Figure 50. ui

ui



Services and DTOs

AccuracyErrorDisplayService

Figure 51. AccuracyErrorDisplayService

AccuracyErrorDisplayService



AccuracyErrorDisplayService

AccuracyErrorDisplayService is a Service.

Appears in: AccuracyErrorDisplayService, ui.

connections:

ChoiceAskService

Figure 52. ChoiceAskService

ChoiceAskService



ChoiceAskService

ChoiceAskService is a Service.

Appears in: ChoiceAskService, ui.

connections:

choice

Choice is a Business Object.

Appears in: ChoiceAskService.

connections:

DisplayAccuracyService

Figure 53. DisplayAccuracyService

DisplayAccuracyService



DisplayAccuracyService

DisplayAccuracyService is a Service.

Appears in: DisplayAccuracyService, ui.

connections:

accuracy

Accuracy is a Parameter.

Appears in: DisplayAccuracyService.

connections:

DISPLAY_IN_PERCENTAGE

DISPLAY_IN_PERCENTAGE is a Behaviour.

Appears in: DisplayAccuracyService.

Displays the accuracy number in percentage. Like "12%".

connections:

OptionDisplayService

Figure 54. OptionDisplayService

OptionDisplayService



OptionDisplayService

OptionDisplayService is a Service.

Appears in: OptionDisplayService, ui.

connections:

choiceNumber

ChoiceNumber is a Parameter.

Appears in: OptionDisplayService.

connections:

probability

Probability is a Parameter.

Appears in: OptionDisplayService.

connections:

categoriesForAnswer

CategoriesForAnswer is a Parameter.

Appears in: OptionDisplayService.

connections:

tuple of categories and the ID of the combination

Tuple of categories and the ID of the combination is a Business Object.

Appears in: OptionDisplayService.

connections:

  • tuple of categories and the ID of the combination is used as parameter categoriesForAnswer
  • tuple of categories and the ID of the combination is of list[str]
  • tuple of categories and the ID of the combination has an example as CATEGORY_TUPLE

probability of an answer

Probability of an answer is a Business Object.

Appears in: OptionDisplayService.

connections:

number of the choice offered

Number of the choice offered is a Business Object.

Appears in: OptionDisplayService.

connections:

  • number of the choice offered is used as parameter choiceNumber
  • number of the choice offered is of int
  • number of the choice offered has an example as OFFERED_CHOICE

TransactionDisplayService

Figure 55. TransactionDisplayService

TransactionDisplayService



TransactionDisplayService

TransactionDisplayService is a Service.

Appears in: TransactionDisplayService, ui.

connections:

row

Row is a Parameter.

Appears in: TransactionDisplayService.

connections:

transaction from the database

Transaction from the database is a Business Object.

Appears in: TransactionDisplayService.

connections:

  • transaction from the database is used as parameter row
  • transaction from the database is of tuple
  • transaction from the database has an example as fetched_row

Display a transaction

Display a transaction is a Process Step.

Appears in: TransactionDisplayService, ui, RowUpdateService.

connections:

UITestData

Figure 56. UITestData

UITestData



ANSWER_TO_CHOICE_PROMPT

ANSWER_TO_CHOICE_PROMPT is a Test Artifact.

Appears in: ChoiceAskService, UITestData.

"42"

connections:

ANSWER_PROBABILITY

ANSWER_PROBABILITY is a Test Artifact.

Appears in: OptionDisplayService, UITestData.

self.UpdateTestData.data.problemValues[0][2]

connections:

CATEGORY_TUPLE

CATEGORY_TUPLE is a Test Artifact.

Appears in: OptionDisplayService, UITestData.

self.UpdateTestData.categories[3]

connections:

OFFERED_CHOICE

OFFERED_CHOICE is a Test Artifact.

Appears in: OptionDisplayService, UITestData.

self.UpdateTestData.resultKeys[0]

connections:

UITestData

UITestData is a TestData.

Appears in: ChoiceAskService, OptionDisplayService, UITestData.

connections:

display an error message about accuracy being low

Display an error message about accuracy being low is a Process Step.

Appears in: AccuracyCheckService, AccuracyErrorDisplayService, ui.

connections:

display model accuracy

Display model accuracy is a Process Step.

Appears in: AccuracyCheckService, DisplayAccuracyService, ui.

connections:

ask the user about choice of categories

Ask the user about choice of categories is a Process Step.

Appears in: ChoiceAskService, ui, ChoiceObtainerService.

connections:

Display choice for user

Display choice for user is a Process Step.

Appears in: OptionDisplayService, ui.

connections:

ui

Ui is a Package.

Appears in: DisplayAccuracyService, AccuracyErrorDisplayService, ChoiceAskService, OptionDisplayService, TransactionDisplayService, ui.

connections:

update

Services and DTOs

ChoiceObtainerService

Figure 57. ChoiceObtainerService

ChoiceObtainerService



ChoiceObtainerService

ChoiceObtainerService is a Service.

Appears in: ChoiceObtainerService.

connections:

obtain user's choice on the category

Obtain user's choice on the category is a Process Step.

Appears in: ChoiceObtainerService, RowUpdateService.

connections:

compute chouce from the answer

Compute chouce from the answer is a Process Step.

Appears in: ChoiceObtainerService.

connections:

COS.number

COS.number is a Behaviour.

Appears in: ChoiceObtainerService.

if a user entered the number of a choice offered, then the categories corresponding to that are returned

connections:

COS.None

COS.None is a Behaviour.

Appears in: ChoiceObtainerService.

If the user did not enter Anything, then None is returned

connections:

COS.categories

COS.categories is a Behaviour.

Appears in: ChoiceObtainerService.

The regex matching with legitimate choices is CHOICE_FORMAT_REGEX. If the user entered a string of categories separated by a ',', then a tuple of those strings are returned.

connections:

options

Options is a Parameter.

Appears in: ChoiceObtainerService.

connections:

CHOICE_FORMAT_REGEX

CHOICE_FORMAT_REGEX is a Constant.

Appears in: Config, ChoiceObtainerService.

connections:

  • CHOICE_FORMAT_REGEX is contained by Config
  • CHOICE_FORMAT_REGEX is a str
  • CHOICE_FORMAT_REGEX is used by COS.categories

OptionPreparatorService

Figure 58. OptionPreparatorService

OptionPreparatorService



OptionPreparatorService

OptionPreparatorService is a Service.

Appears in: OptionPreparatorService.

connections:

rowNumber

RowNumber is a Parameter.

Appears in: OptionPreparatorService.

connections:

data

Data is a Parameter.

Appears in: OptionPreparatorService.

connections:

categories

Categories is a Parameter.

Appears in: OptionPreparatorService.

connections:

OPS.PROBABLE

OPS.PROBABLE is a Behaviour.

Appears in: OptionPreparatorService.

choices presented have probability above MIN_PROBABILITY in the problem result for the row

connections:

MIN_PROBABILITY

MIN_PROBABILITY is a Constant.

Appears in: Config, OptionPreparatorService.

connections:

OPS.SORTED

OPS.SORTED is a Behaviour.

Appears in: OptionPreparatorService.

choices are presented in order of decreasing probability

connections:

Display choice for user

Display choice for user is a Process Step.

Appears in: OptionPreparatorService.

connections:

OPS.CHOICE_NUMBER

OPS.CHOICE_NUMBER is a Behaviour.

Appears in: OptionPreparatorService.

options are numbered from 1 in the order they are presented

connections:

rowNumber

RowNumber is a Test Artifact.

Appears in: OptionPreparatorService.

connections:

number of row in the problem set

Number of row in the problem set is a Business Object.

Appears in: OptionPreparatorService.

connections:

  • number of row in the problem set is used as parameter rowNumber
  • number of row in the problem set is of int
  • number of row in the problem set has an example as rowNumber

categories

Categories is a Test Artifact.

Appears in: OptionPreparatorService, CategoryService.

connections:

RowUpdateService

Figure 59. RowUpdateService

RowUpdateService



RowUpdateService

RowUpdateService is a Service.

Appears in: RowUpdateService.

connections:

update one row

Update one row is a Process Step.

Appears in: Process overview, OptionPreparatorService, RowUpdateService, UpdateService.

connections:

get row from the database

Get row from the database is a Process Step.

Appears in: RowUpdateService.

connections:

rowNumber

RowNumber is a Parameter.

Appears in: RowUpdateService.

connections:

data

Data is a Parameter.

Appears in: RowUpdateService.

connections:

connection

Connection is a Parameter.

Appears in: RowUpdateService.

connections:

categories

Categories is a Parameter.

Appears in: RowUpdateService.

connections:

row number in the problem set

Row number in the problem set is a Business Object.

Appears in: RowUpdateService.

connections:

  • row number in the problem set is used as parameter rowNumber
  • row number in the problem set is of int

database connection

Database connection is a Business Object.

Appears in: RowUpdateService, CategoryService.

connections:

UpdateService

Figure 60. UpdateService

UpdateService



UpdateService

UpdateService is a Service.

Appears in: UpdateService.

connections:

data

Data is a Parameter.

Appears in: UpdateService.

connections:

Update data

Update data is a Process Step.

Appears in: Process overview, CategorizerService, RowUpdateService, UpdateService, Compute suggestions.

connections:

UpdateTestData

Figure 61. UpdateTestData

UpdateTestData



data

Data is a Test Artifact.

Appears in: PrepareDataService, OptionPreparatorService, UpdateService, UpdateTestData.

self._makePreparedData()

connections:

UpdateTestData

UpdateTestData is a TestData.

Appears in: PrepareDataService, OptionPreparatorService, UpdateService, UpdateTestData.

   def _makePreparedData(self):
                                    data = MagicMock()
                                    data.problemOids = self.DataTestData.PROBLEM_OIDS
                                    data.problemValues = self.DataTestData.PROBLEM_MODEL_RESULT
                                    data.numberOfOutputNeurons = self.DataTestData.OUTPUT_NEURONS
                                    data.max_length = self.DataTestData.MAX_LENGTH
                                    return data
                                    
                                    
                                 

connections:

choices

Figure 62. choices

choices



categories

Categories is a Business Object.

Appears in: choices, OptionPreparatorService, RowUpdateService, CategoryService.

connections:

choice

Choice is a Business Object.

Appears in: ChoiceObtainerService, choices.

connections:

choices

Choices is a Business Object.

Appears in: ChoiceObtainerService, choices, OptionPreparatorService.

connections:

key

Key is a Property.

Appears in: choices.

connections:

probability

Probability is a Property.

Appears in: choices.

connections:

value

Value is a Property.

Appears in: choices.

connections:

update

Update is a Package.

Appears in: ChoiceObtainerService, OptionPreparatorService, RowUpdateService, UpdateService.

connections:

CategorizerAI

CategorizerAI is a Project.

Appears in: Process overview, CategorizerService, Compute suggestions.

connections:

categorizerai

Categorizerai is a Package.

Appears in: Process overview, prepare data for AI, CategorizerService, ui, Compute suggestions.

connections:

Update database with categories

Update database with categories is a Process Step.

Appears in: Process overview, Get Data From database, prepare data for AI, CategorizerService, Compute suggestions.

connections:

External dependencies

Figure 63. External dependencies

External dependencies



numpy.ndarray [numpy.ndarray [float]]

Numpy.ndarray [numpy.ndarray [float]] is an External type.

Appears in: NumericConverterService, NeuralNetTrainerService, AIData, External dependencies.

connections:

  • numpy.ndarray [numpy.ndarray [float]] is contained by numpy
  • numpy.ndarray [numpy.ndarray [float]] is type of trainValues
  • numpy.ndarray [numpy.ndarray [float]] is type of problemValues
  • numpy.ndarray [numpy.ndarray [float]] is type of trainValues
  • numpy.ndarray [numpy.ndarray [float]] is type of input array for AI model

numpy.ndarray [int]

Numpy.ndarray [int] is an External type.

Appears in: NeuralNetTrainerService, AIData, External dependencies.

connections:

keras.Model

Keras.Model is an External type.

Appears in: NeuralNetBuilderService, NeuralNetTrainerService, External dependencies.

connections:

int

Int is an External type.

Appears in: Config, NumericConverterService, NeuralNetBuilderService, AIData, OptionDisplayService, choices, OptionPreparatorService, RowUpdateService, External dependencies.

connections:

list[list[int]]

List[list[int]] is an External type.

Appears in: External dependencies.

connections:

list[int]

List[int] is an External type.

Appears in: Config, AIData, External dependencies.

connections:

list[str]

List[str] is an External type.

Appears in: csv file, Config, OptionDisplayService, External dependencies.

connections:

float

Float is an External type.

Appears in: Config, NeuralNetTrainerService, DisplayAccuracyService, OptionDisplayService, choices, External dependencies.

connections:

pandas.DataFrame

Pandas.DataFrame is an External type.

Appears in: PrepareDataService, External dependencies.

connections:

numpy.ndarray [str]

Numpy.ndarray [str] is an External type.

Appears in: NumericConverterService, External dependencies.

connections:

  • numpy.ndarray [str] is contained by numpy
  • numpy.ndarray [str] is type of Input set

str

Str is an External type.

Appears in: csv file, Config, ChoiceAskService, External dependencies.

connections:

User's own project

User's own project is an External Project.

Appears in: Process overview, external script, Get Data From database, External dependencies.

connections:

record categorization

Record categorization is an External package.

Appears in: Process overview, external script, Get Data From database, External dependencies.

connections:

Keras

Keras is an External Project.

Appears in: External dependencies.

connections:

numpy

Numpy is an External Project.

Appears in: External dependencies.

connections:

pandas

Pandas is an External Project.

Appears in: External dependencies.

connections:

Python core

Python core is an External Project.

Appears in: External dependencies.

connections:

tuple

Tuple is an External type.

Appears in: TransactionDisplayService, ChoiceObtainerService, choices, OptionPreparatorService, RowUpdateService, External dependencies.

connections:

dict

Dict is an External type.

Appears in: choices, OptionPreparatorService, CategoryService, External dependencies.

connections:

psycopg2

Psycopg2 is an External Project.

Appears in: External dependencies.

connections:

extensions

Extensions is an External package.

Appears in: External dependencies.

connections:

connection

Connection is an External type.

Appears in: RowUpdateService, CategoryService, External dependencies.

connections:

not yet modeled

Figure 64. New Zenta View

New Zenta View



Obtain database connection

Obtain database connection is a Process Step.

Appears in: Process overview, UpdateService.

connections:

prepare data for AI

Prepare data for AI is a Process Step.

Appears in: Process overview, PrepareDataService, prepare data for AI, CategorizerService, ai, Compute suggestions.

connections:

prepare options for a row

Prepare options for a row is a Process Step.

Appears in: Process overview, OptionPreparatorService, RowUpdateService.

connections:

run AI on problem set

Run AI on problem set is a Process Step.

Appears in: Process overview, CategorizerService, ai, Compute suggestions.

connections:

update the row in the database

Update the row in the database is a Process Step.

Appears in: Process overview, RowUpdateService.

connections:

Deviations

Model Errors

failing constraint for problem_set.csv .

problem_set.csv does not satisfy constraint Used by at least one behaviour ( count(zenta:neighbours($p1,$p2,'uses,2')[@xsi:type='Behaviour']) > 0 ).

no related issues in tracker

failing constraint for problem_set.csv .

problem_set.csv does not satisfy constraint Is an example of a Business object ( ( count(zenta:neighbours($p1,$p2,'has an example as/is an example of,2')[@xsi:type='Test Artifact']) ) > 0 ).

no related issues in tracker

failing constraint for training_set.csv .

training_set.csv does not satisfy constraint Used by at least one behaviour ( count(zenta:neighbours($p1,$p2,'uses,2')[@xsi:type='Behaviour']) > 0 ).

no related issues in tracker

failing constraint for training_set.csv .

training_set.csv does not satisfy constraint Is an example of a Business object ( ( count(zenta:neighbours($p1,$p2,'has an example as/is an example of,2')[@xsi:type='Test Artifact']) ) > 0 ).

no related issues in tracker

failing constraint for column list .

column list does not satisfy constraint Has a type ( ( count(zenta:neighbours($p1,$p2,'is a/is type of,1')[@xsi:type='Type']) ) = 1).

no related issues in tracker

failing constraint for filename .

filename does not satisfy constraint Has a type ( ( count(zenta:neighbours($p1,$p2,'is a/is type of,1')[@xsi:type='Type']) ) = 1).

no related issues in tracker

failing constraint for PROBLEM_SET_COLUMNS