Samchon Framework for CPP  1.0.0
samchon::namtree::NTCriteria Class Reference

Criteria, a conditional expression with weight. More...

#include <NTCriteria.hpp>

Collaboration diagram for samchon::namtree::NTCriteria:

Public Member Functions

virtual void construct (std::shared_ptr< library::XML >) override
 Construct data of the Entity from an XML object. More...
 
virtual auto TAG () const -> std::string override
 A tag name when represented by XML. More...
 
virtual auto CHILD_TAG () const -> std::string override
 A tag name of children. More...
 
virtual auto toXML () const -> std::shared_ptr< library::XML > override
 Get an XML object represents the EntityGroup. More...
 
- Public Member Functions inherited from samchon::protocol::EntityGroup< _Container, _ETy, T >
 EntityGroup ()
 Default Constructor. More...
 
auto has (const std::string &key) const -> bool
 Indicates whether a container has an object having the specified identifier. More...
 
auto get (const std::string &key) -> value_type &
 Access the element by specified identifier(key). More...
 
auto get (const std::string &key) const -> const value_type &
 Access the const element by specified identifier(key). More...
 
- Public Member Functions inherited from samchon::protocol::Entity
 Entity ()
 Default Constructor. More...
 
virtual auto key () const -> std::string
 Get a key that can identify the Entity uniquely. More...
 
- Public Member Functions inherited from samchon::protocol::IEntityGroup
 IEntityGroup ()
 Default Constructor. More...
 

Protected Member Functions

virtual auto createChild (std::shared_ptr< library::XML >) -> NTCriteria *override
 Factory method of a child Entity. More...
 

Detailed Description

Criteria, a conditional expression with weight.

NTCriteria is an object realizing ANN(Artificial Neural Network).

You can make the ANN model having weight and bias.

  1. A conditional expression with weight

    F(x) = (NTSide < NTSide ? 1: 0) X weight

    NTCrietria is made up for conditional expression.

    • When the expression is true, returns 1 * weight
    • When the expression is false, returns 0
  2. Hierarchical relationship

    • In vertical relationship: multiply (X)
    • In horizontal relationship: plus (+)

    With that rule, you can make enormous conditions. I can sure there's not any condition can'be be expressed by the model.

    namtree_nt_criteria.png

  3. Making bias

    Just make a NTCriteria returns only true.

    It's the bias returns only weight.

  4. Explore
    1. Exporing in a NTCriteria (optimize a side)

      Make a NTSide to be nullptr, then NTCriteria will explore the best value.

      Nam-Tree will calculate the condtions from minimum to maximum in INTExplore reach to the precision, by the method of multi-demensional grid.

    2. Exploring parameter in NTSide

      If you set the parameterMNap to be empty, Nam-Tree will explore the best parameter until reach to the precision in INTExploreParameter from minimum to maximum.

      namtree_grid_method.png

    3. Exploring by creating NTCriteria

      (Creates lots of hierarchical conditions and tests them)

      If all the side (left and right) in a NTCriteria are nullptr, the NTCriteria will make a lot of children NTCriteria(s) to test lots of cases, so that derives the best condition set will be made up.

      This process will ride on same routines of 4-1 and 4-2, for each created cases. Of course, this process needs too much time, so that you may need to be patient.

namtree_criteria.png
See also
samchon::namtree
Author
Jeongho Nam http://samchon.org

Definition at line 77 of file NTCriteria.hpp.

Member Function Documentation

void NTCriteria::construct ( std::shared_ptr< library::XML xml)
overridevirtual

Construct data of the Entity from an XML object.

Constructs the EntityGroup's own member variables only from the input XML object.

Do not consider about constructing children Entity objects' data in EntityGroup::construct(). Those children Entity objects' data will constructed by their own construct() method. Even insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().

Constructs only data of EntityGroup's own.

[Inherited]

Reimplemented from samchon::protocol::EntityGroup< _Container, _ETy, T >.

Definition at line 34 of file NTCriteria.cpp.

auto NTCriteria::createChild ( std::shared_ptr< library::XML ) -> NTCriteria *override
overrideprotectedvirtual

Factory method of a child Entity.

EntityGroup::createChild() is a factory method creating a new child Entity which is belonged to the EntityGroup. This method is called by EntityGroup::construct(). The children construction methods Entity::construct() will be called by abstract method of the EntityGroup::construct().

Returns
A new child Entity belongs to EntityGroup.

Implements samchon::protocol::EntityGroup< _Container, _ETy, T >.

Definition at line 44 of file NTCriteria.cpp.

References samchon::namtree::NTFactory::createCriteria().

Here is the call graph for this function:

auto NTCriteria::TAG ( ) const -> std::string
overridevirtual

A tag name when represented by XML.

Returns
A tag name

Implements samchon::protocol::Entity.

Definition at line 16 of file NTCriteria.cpp.

auto NTCriteria::CHILD_TAG ( ) const -> std::string
overridevirtual

A tag name of children.

< TAG>
     <CHILD_TAG />
     <CHILD_TAG />
</TAG>

Implements samchon::protocol::IEntityGroup.

Definition at line 17 of file NTCriteria.cpp.

auto NTCriteria::toXML ( ) const -> std::shared_ptr<library::XML>
overridevirtual

Get an XML object represents the EntityGroup.

Archives the EntityGroup's own member variables only to the returned XML object.

Do not consider about archiving children Entity objects' data in EntityGroup::toXML(). Those children Entity objects will converted to XML object by their own toXML() method. The insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().

Archives only data of EntityGroup's own.

[Inherited]

Reimplemented from samchon::protocol::EntityGroup< _Container, _ETy, T >.

Definition at line 70 of file NTCriteria.cpp.


The documentation for this class was generated from the following files: