Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
meridian.model.transformers.CenteringAndScalingTransformer
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसर पर, केंद्र में रखने और स्केलिंग करने वाले ट्रांसफ़ॉर्मेशन लागू करता है.
यहां से इनहेरिट किया गया: TensorTransformer
meridian.model.transformers.CenteringAndScalingTransformer(
tensor: tf.Tensor,
population: tf.Tensor,
population_scaling_id: (tf.Tensor | None) = None
)
यह क्लास किसी टेंसर को बदल देती है, ताकि हर वैरिएबल का माध्य शून्य और स्टैंडर्ड वैरिएशन एक हो. इसके अलावा, सेंटरिंग और स्केलिंग ट्रांसफ़ॉर्मेशन लागू करने से पहले, हर वैरिएबल को पॉप्युलेशन के हिसाब से स्केल किया जा सकता है. क्लास में हर वैरिएबल का
मीन और स्टैंडर्ड डीविएशन सेव किया जाता है.
Args |
tensor
|
डाइमेंशन (n_geos, n_times, n_channel) का टेंसर, जिसका इस्तेमाल माध्य और मानक विचलन
का पता लगाने के लिए किया जाता है.
|
population
|
डाइमेंशन (n_geos,) के टेंसर में, हर भौगोलिक जगह की जनसंख्या शामिल होती है.
इसका इस्तेमाल स्केल फ़ैक्टर की गणना करने के लिए किया जाता है.
|
population_scaling_id
|
डाइमेंशन का एक वैकल्पिक बूलियन टेंसर (n_channels,) , जो उन वैरिएबल को दिखाता है जिनके लिए वैल्यू को जनसंख्या के आधार पर स्केल किया जाएगा.
|
तरीके
forward
सोर्स देखें
forward(
tensor: tf.Tensor
) -> tf.Tensor
सेव किए गए कोएफ़िशिएंट का इस्तेमाल करके, किसी दिए गए टेंसर को स्केल करता है.
inverse
सोर्स देखें
inverse(
tensor: tf.Tensor
) -> tf.Tensor
सेव किए गए गुणांक का इस्तेमाल करके, किसी दिए गए टेंसर को वापस स्केल करता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-11-14 (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-14 (UTC) को अपडेट किया गया."],[],["This content describes a `CenteringAndScalingTransformer` class that transforms a tensor by centering (mean zero) and scaling (standard deviation one) its variables. It takes a tensor, population data, and an optional population scaling ID as input. The class stores the mean and standard deviation. It has two main methods: `forward`, which applies the scaling to a tensor, and `inverse`, which reverses the scaling using the stored coefficients. The transformations can be applied channel-wise with the `population_scaling_id`.\n"],null,[]]