Join the newly launched Discord
community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.knots.KnotInfo
Stay organized with collections
Save and categorize content based on your preferences.
Contains the number of knots, knot locations, and weights.
meridian
.
model
.
knots
.
KnotInfo
(
n_knots
:
int
,
knot_locations
:
np
.
ndarray
[
int
,
np
.
dtype
[
int
]],
weights
:
np
.
ndarray
[
int
,
np
.
dtype
[
float
]]
)
The weights used to multiply with the knot values to get time-
varying coefficients.
Methods
__eq__
__eq__
(
other
)
Return self==value.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-05 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-05 UTC."],[[["\u003cp\u003e\u003ccode\u003eKnotInfo\u003c/code\u003e stores information about knots, including their number, locations, and weights.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003en_knots\u003c/code\u003e attribute specifies the total number of knots.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eknot_locations\u003c/code\u003e provides the specific positions of each knot.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eweights\u003c/code\u003e are used to calculate time-varying coefficients by being multiplied with knot values.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003e__eq__\u003c/code\u003e method returns a boolean of whether the object is the same as the compared value.\u003c/p\u003e\n"]]],["The `KnotInfo` class stores knot-related data: the number of knots (`n_knots`), their locations (`knot_locations`), and their associated weights (`weights`). These weights are used to derive time-varying coefficients by multiplying them with the knot values. The class also includes an `__eq__` method to compare if one `KnotInfo` is equal to another.\n"],null,["\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/google/meridian/blob/v1.2.0/meridian/model/knots.py#L136-L149) |\n\nContains the number of knots, knot locations, and weights. \n\n meridian.model.knots.KnotInfo(\n n_knots: int,\n knot_locations: np.ndarray[int, np.dtype[int]],\n weights: np.ndarray[int, np.dtype[float]]\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ||\n|------------------|--------------------------------------------------------------------------------------|\n| `n_knots` | The number of knots |\n| `knot_locations` | The location of knots |\n| `weights` | The weights used to multiply with the knot values to get time- varying coefficients. |\n\n\u003cbr /\u003e\n\nMethods\n\n`__eq__` \n\n __eq__(\n other\n )\n\nReturn self==value."]]