Preset¶
κ_lips(x, y)
¶
Lipschitz kernel: \(κ(x, y) = \frac{10 \sqrt{x^2 + y^2}}{1 + \sqrt{|x - y|}}\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
VertexType
|
An array of vertex types. |
required |
y
|
VertexType
|
An array of vertex types. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of kernel values. |
Source code in src/bprg/preset.py
κ_expo(x, y)
¶
Exponential kernel: \(κ(x, y) = \frac{5 (e^{x + 0.5 y} - 1)}{1 + \sqrt{|x - y|}}\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
VertexType
|
An array of vertex types. |
required |
y
|
VertexType
|
An array of vertex types. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of kernel values. |
Source code in src/bprg/preset.py
κ_sing(x, y)
¶
Kernel with singularity: \(κ(x, y) = \frac{x + y}{|x - y| + |x - 1| + |y - 1|}\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
VertexType
|
An array of vertex types. |
required |
y
|
VertexType
|
An array of vertex types. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of kernel values. |
Source code in src/bprg/preset.py
μ_lebe(x)
¶
Vertex type Lebesgue measure: \(μ(I) = |I|\)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
VertexType
|
An array of vertex types. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
An array of measure values. |
Source code in src/bprg/preset.py
make_η_constant(margin)
¶
Create a constant vertex threshold measure function that is independent of the vertex type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
margin
|
Simplex
|
Probability distribution of vertex thresholds (sums to 1). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
ThresholdMeasure |
ThresholdMeasure
|
A function that takes a vertex type and returns the threshold distribution. |