Potential

class hdnnpy.training.loss_function.Potential(model, properties, mixing_beta, summation, rotation, **_)[source]

Bases: hdnnpy.training.loss_function.loss_functions_base.LossFunctionBase

Loss function to optimize 0th property as scalar potential.

Args:
model (HighDimensionalNNP):
HDNNP object to optimize parameters.

properties (list [str]): Names of properties to optimize. mixing_beta (float):

Mixing parameter of errors of 0th and 1st order. It accepts 0.0 to 1.0. If 0.0 it optimizes HDNNP by only 0th order property and it is equal to loss function Zeroth. If 1.0 it optimizes HDNNP by only 1st order property.
summation (float):

Penalty term coefficient parameter for summation of 1st order property. This loss function adds following

penalty to 1st order property vector.

\(\sum_{i,lpha} F_{i,lpha} = 0\)

rotation (float):

Penalty term coefficient parameter for rotation of 1st order property. This loss function adds following

penalty to 1st order property vector.

:math:`

ot m{F} = 0`

eval(**dataset)[source]

Calculate loss function from given datasets and model.

Parameters:**dataset (ndarray) – Datasets passed as kwargs. Name of each key is in the format ‘inputs/N’ or ‘labels/N’. ‘N’ is the order of the dataset.
Returns:A scalar value calculated with loss function.
Return type:Variable
name = 'potential'

Name of this loss function class.

Type:str
order = {'descriptor': 2, 'property': 1}

Required orders of each dataset to calculate loss function.

Type:dict