First¶
-
class
hdnnpy.training.loss_function.
First
(model, properties, mixing_beta, **_)[source]¶ Bases:
hdnnpy.training.loss_function.loss_functions_base.LossFunctionBase
Loss function to optimize 0th and 1st-order property.
Parameters: - 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.
-
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