This example shows how to use thehyperbolicPenalty
function to calculate the hyperbolic penalty for a given point with respect to a bounded region.
Calculate the penalty value for the point0.1
within the interval [-2
,2
],使用默认值lambda
和tau
parameters.
Calculate the penalty value for the point4
outside the interval [-2
,2
].
Calculate the penalty value for the point0.1
within the interval [-2
,2
], using alambda
参数5
.
Calculate the penalty value for the point4
outside the interval [-2
,2
], using alambda
参数5
.
Calculate the penalty value for the point4
outside the interval [-2
,2
], using atau
参数0.5
.
计算该点的罚款值[-2
,0
,4
] with respect to the box defined by the intervals [0
,1
],[[-1
,1
], and [-2
,2
] along the x, y, and z dimensions, respectively, using the default value forlambda
和tau
参数0
.
Visualize Penalty Values for an Interval
创建一个分布在 -5
和5
.
Calculate penalties for all the points in the vector, using default values for thelambda
和tau
parameters.
Plot the points and add grid, labels and title.