<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>koideforest</author_name>
  <author_url>https://blog.hatena.ne.jp/koideforest/</author_url>
  <blog_title>nano_exit</blog_title>
  <blog_url>https://koideforest.hatenadiary.com/</blog_url>
  <categories>
    <anon>プログラミング</anon>
  </categories>
  <description>最適輸送距離について調べていた時に、何をやっているのかパッとわからないノルムの取り方をしているコードがあった。 最適輸送入門 n = 100 # 点群サイズ mu = np.random.randn(n, 2) # 入力分布 1 nu = np.random.randn(n, 2) + 1 # 入力分布 2 C = np.linalg.norm(nu[np.newaxis] - mu[:,np.newaxis], axis=2) # コスト行列 mu, nuは二次元分布を表しており、Cがmuの各点とnuの各点の間の距離を表す行列になっている。Cの計算（定義）の部分は、以下の愚直な内容と同じにな…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkoideforest.hatenadiary.com%2Fentry%2F2023%2F01%2F18%2F024932&quot; title=&quot;numpyで異なる離散分布における各点間のノルムを総当たりに得る方法 - nano_exit&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/89449353/1514224948935857</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-01-18 02:49:32</published>
  <title>numpyで異なる離散分布における各点間のノルムを総当たりに得る方法</title>
  <type>rich</type>
  <url>https://koideforest.hatenadiary.com/entry/2023/01/18/024932</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
