Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.knots.l1_distance_weights
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
हर समयावधि के लिए, नॉट पर वज़न की गणना करता है.
meridian.model.knots.l1_distance_weights(
n_times: int, knot_locations: np.ndarray[int, np.dtype[int]]
) -> np.ndarray
आस-पास की दो गांठों से, किसी खास समयावधि के लिए वजन का अनुमान मिलता है. किसी समयावधि के लिए, दो आस-पास की हर गाँठ की वैल्यू से, उस समयावधि के लिए वैल्यू का पता चलता है. यह इस बात पर निर्भर करता है कि वे समयावधि के कितने करीब (L1 दूरी) हैं. अगर
कोई टाइम पॉइंट किसी नॉट की जगह से मेल खाता है, तो उस नॉट को 100% वेट दिया जाता है. अगर कोई टाइम पॉइंट, नॉट की रेंज से बाहर है, तो सबसे नज़दीकी एंडपॉइंट नॉट को 100% वेट दिया जाता है.
यह फ़ंक्शन, वेट के (n_knots, n_times)
कलेक्शन का हिसाब लगाता है. इस कलेक्शन का इस्तेमाल ट्रेंड और सीज़न के हिसाब से मॉडल करने के लिए किया जाता है. किसी तय समय के लिए, ऐरे में दो ऐसे वज़न होते हैं जो शून्य से ज़्यादा होते हैं. वेट, दिए गए समय से आस-पास के नोड की L1 दूरी के उलट होते हैं. दोनों वेट को नॉर्मलाइज़ किया जाता है, ताकि उनका कुल योग 1 हो.
Args |
n_times
|
टाइम पॉइंट की संख्या.
|
knot_locations
|
0, 1, 2,..., (n_times-1) में गांठों की जगह.
|
रिटर्न |
डाइमेंशन (n_knots, n_times) वाला वेट ऐरे, जिसमें हर समयावधि के लिए वैल्यू का योग 1 होता है.
|
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-11-06 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2024-11-06 (UTC) को अपडेट किया गया."],[],["The `l1_distance_weights` function calculates weights for each time period based on neighboring knots. It outputs a `(n_knots, n_times)` array, where each time period's weight is influenced by the two closest knots. Weights are inversely proportional to the L1 distance from the time period to the knots and normalized to sum to 1. If a time point is at a knot, that knot gets 100% weight; outside the knot range, the nearest endpoint knot gets 100%.\n"],null,[]]