neuralogic.core
Subpackages
- neuralogic.core.builder
- neuralogic.core.constructs
- Submodules
- neuralogic.core.constructs.factories
- neuralogic.core.constructs.function
Aggregation
Combination
Function
Transformation
Transformation.EXP
Transformation.IDENTITY
Transformation.INVERSE
Transformation.LEAKY_RELU
Transformation.LOG
Transformation.LUKASIEWICZ
Transformation.NORM
Transformation.RELU
Transformation.RESHAPE
Transformation.REVERSE
Transformation.SIGMOID
Transformation.SIGNUM
Transformation.SLICE
Transformation.SOFTMAX
Transformation.SPARSEMAX
Transformation.SQRT
Transformation.TANH
Transformation.TRANSP
Transformation.name
- neuralogic.core.constructs.java_objects
JavaFactory
JavaFactory.add_metadata_function()
JavaFactory.add_parametrized_function()
JavaFactory.atom_to_clause()
JavaFactory.get_conjunction()
JavaFactory.get_generic_relation()
JavaFactory.get_lifted_example()
JavaFactory.get_metadata()
JavaFactory.get_new_weight_factory()
JavaFactory.get_predicate()
JavaFactory.get_predicate_metadata_pair()
JavaFactory.get_query()
JavaFactory.get_relation()
JavaFactory.get_rule()
JavaFactory.get_term()
JavaFactory.get_valued_fact()
JavaFactory.get_variable_factory()
JavaFactory.get_weight()
ValueFactory
- neuralogic.core.constructs.metadata
- neuralogic.core.constructs.predicate
- neuralogic.core.constructs.relation
- neuralogic.core.constructs.rule
- neuralogic.core.settings
- Module contents
Settings
Settings.chain_pruning
Settings.create_disconnected_proxy()
Settings.create_proxy()
Settings.epochs
Settings.error_function
Settings.grounder
Settings.initializer
Settings.iso_value_compression
Settings.optimizer
Settings.prune_only_identities
Settings.relation_combination
Settings.relation_transformation
Settings.rule_aggregation
Settings.rule_combination
Settings.rule_transformation
- Submodules
- neuralogic.core.settings.settings_proxy
SettingsProxy
SettingsProxy.chain_pruning
SettingsProxy.debug_exporting
SettingsProxy.default_fact_value
SettingsProxy.epochs
SettingsProxy.error_function
SettingsProxy.get_aggregation_function()
SettingsProxy.get_combination_function()
SettingsProxy.get_transformation_function()
SettingsProxy.grounder
SettingsProxy.initializer
SettingsProxy.initializer_const
SettingsProxy.initializer_uniform_scale
SettingsProxy.iso_value_compression
SettingsProxy.number_format()
SettingsProxy.optimizer
SettingsProxy.prune_only_identities
SettingsProxy.relation_combination
SettingsProxy.relation_transformation
SettingsProxy.rule_aggregation
SettingsProxy.rule_combination
SettingsProxy.rule_transformation
SettingsProxy.to_json()
- Module contents
Submodules
neuralogic.core.enums
neuralogic.core.sources
neuralogic.core.template
- class Template(*, template_file: str | None = None)[source]
Bases:
object
- add_hook(relation: BaseRelation | str, callback: Callable[[Any], None]) None [source]
Hooks the callable to be called with the relation’s value as an argument when the value of the relation is being calculated.
- Parameters:
relation
callback
- Returns:
- add_module(module: Module)[source]
Expands the module into rules and adds them into the template
- Parameters:
module
- Returns:
- draw(filename: str | None = None, show=True, img_type='png', value_detail: int = 0, graphviz_path: str | None = None, model=None, *args, **kwargs)[source]
- get_parsed_template(settings: SettingsProxy, java_factory: JavaFactory)[source]
- remove_hook(relation: BaseRelation | str, callback)[source]
Removes the callable from the relation’s hooks
- Parameters:
relation
callback
- Returns: