📊 Математическая задача для Data Scientists: "Идеальная точка разбиения"
**Условие** У тебя есть список чисел List[float], представляющий одномерное распределение (например, значения метрики или зарплаты). Нужно определить: существует ли индекс, на котором можно разделить массив на две части так, чтобы стандартное отклонение слева и справа отличалось не более чем на ε (например, 0.1).
data = [1.0, 2.0, 3.0, 4.0, 5.0] # Разделение после 2 → [1.0, 2.0], [3.0, 4.0, 5.0] # std слева ≈ 0.5, справа ≈ 0.816 → разница = 0.316 > 0.1 → не подходит
🔍 Подсказка Используй statistics.stdev() или numpy.std(ddof=1) (с выборочной коррекцией). Но не забывай, что длина подмассива должна быть как минимум 2.
---
✅ Пример реализации: ```python import statistics
def has_balanced_std_split(data: list[float], epsilon: float = 0.1) -> bool: n = len(data) if n < 4: return False # Нужны хотя бы 2 элемента в каждой части
for i in range(2, n - 1): left = data[:i] right = data[i:]
if abs(std_left - std_right) <= epsilon: return True
return False ```
📌 Пример использования:
```python data = [10, 12, 11, 20, 21, 19] print(has_balanced_std_split(data, epsilon=0.5)) # True или False в зависимости от разбивки ```
🎯 Что проверяет задача:
• понимание **дисперсии и стандартного отклонения** • знание **статистических библиотек Python** • работа с ограничениями на длину срезов • мышление в духе «разделяй и анализируй»
📊 Математическая задача для Data Scientists: "Идеальная точка разбиения"
**Условие** У тебя есть список чисел List[float], представляющий одномерное распределение (например, значения метрики или зарплаты). Нужно определить: существует ли индекс, на котором можно разделить массив на две части так, чтобы стандартное отклонение слева и справа отличалось не более чем на ε (например, 0.1).
data = [1.0, 2.0, 3.0, 4.0, 5.0] # Разделение после 2 → [1.0, 2.0], [3.0, 4.0, 5.0] # std слева ≈ 0.5, справа ≈ 0.816 → разница = 0.316 > 0.1 → не подходит
🔍 Подсказка Используй statistics.stdev() или numpy.std(ddof=1) (с выборочной коррекцией). Но не забывай, что длина подмассива должна быть как минимум 2.
---
✅ Пример реализации: ```python import statistics
def has_balanced_std_split(data: list[float], epsilon: float = 0.1) -> bool: n = len(data) if n < 4: return False # Нужны хотя бы 2 элемента в каждой части
for i in range(2, n - 1): left = data[:i] right = data[i:]
if abs(std_left - std_right) <= epsilon: return True
return False ```
📌 Пример использования:
```python data = [10, 12, 11, 20, 21, 19] print(has_balanced_std_split(data, epsilon=0.5)) # True или False в зависимости от разбивки ```
🎯 Что проверяет задача:
• понимание **дисперсии и стандартного отклонения** • знание **статистических библиотек Python** • работа с ограничениями на длину срезов • мышление в духе «разделяй и анализируй»
BY Математика Дата саентиста
Warning: Undefined variable $i in /var/www/group-telegram/post.php on line 260
Russian President Vladimir Putin launched Russia's invasion of Ukraine in the early-morning hours of February 24, targeting several key cities with military strikes. Since its launch in 2013, Telegram has grown from a simple messaging app to a broadcast network. Its user base isn’t as vast as WhatsApp’s, and its broadcast platform is a fraction the size of Twitter, but it’s nonetheless showing its use. While Telegram has been embroiled in controversy for much of its life, it has become a vital source of communication during the invasion of Ukraine. But, if all of this is new to you, let us explain, dear friends, what on Earth a Telegram is meant to be, and why you should, or should not, need to care. The company maintains that it cannot act against individual or group chats, which are “private amongst their participants,” but it will respond to requests in relation to sticker sets, channels and bots which are publicly available. During the invasion of Ukraine, Pavel Durov has wrestled with this issue a lot more prominently than he has before. Channels like Donbass Insider and Bellum Acta, as reported by Foreign Policy, started pumping out pro-Russian propaganda as the invasion began. So much so that the Ukrainian National Security and Defense Council issued a statement labeling which accounts are Russian-backed. Ukrainian officials, in potential violation of the Geneva Convention, have shared imagery of dead and captured Russian soldiers on the platform. Telegram users are able to send files of any type up to 2GB each and access them from any device, with no limit on cloud storage, which has made downloading files more popular on the platform. That hurt tech stocks. For the past few weeks, the 10-year yield has traded between 1.72% and 2%, as traders moved into the bond for safety when Russia headlines were ugly—and out of it when headlines improved. Now, the yield is touching its pandemic-era high. If the yield breaks above that level, that could signal that it’s on a sustainable path higher. Higher long-dated bond yields make future profits less valuable—and many tech companies are valued on the basis of profits forecast for many years in the future.
from us