این کلاس یک تانسور را تبدیل می کند بنابراین هر متغیر دارای میانگین صفر و انحراف استاندارد یک است. به صورت اختیاری، هر متغیر را می توان قبل از اعمال تبدیل مرکزی و مقیاس بندی بر اساس جمعیت مقیاس بندی کرد. کلاس میانگین و انحراف استاندارد هر متغیر را ذخیره می کند.
ارگ
tensor
تانسور ابعاد (n_geos, n_times, n_channel) برای محاسبه میانگین و انحرافات استاندارد استفاده می شود.
population
یک تانسور بعد (n_geos,) که شامل جمعیت هر جغرافیایی است، برای محاسبه فاکتورهای مقیاس استفاده میشود.
population_scaling_id
یک تانسور بولی اختیاری از ابعاد (n_channels,) که متغیرهایی را که مقدار آنها بر اساس جمعیت مقیاس میشود را نشان میدهد.
تاریخ آخرین بهروزرسانی 2024-11-19 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-19 بهوقت ساعت هماهنگ جهانی."],[],["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"]]