<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rare_Remrin</author_name>
  <author_url>https://blog.hatena.ne.jp/rare_Remrin/</author_url>
  <blog_title>Remrinのpython攻略日記</blog_title>
  <blog_url>https://python-remrin.hatenadiary.jp/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>アルゴリズム</anon>
  </categories>
  <description>最小二乗法について。 (2, 3), (4, 7), (9, 11)の3点をデータとして、最小二乗法を1次式で行う場合。 とすると、 これの最小値を求めることになり、偏微分をして となるベクトルが係数ベクトルとなる。 # coding: utf-8 import numpy as np import matplotlib.pyplot as plt data = [(2, 3), (4, 7), (9, 11)] a = np.matrix(data) b = a[:, 1].copy() a[:, 1] = 1 # 係数ベクトルを求める x = ((a.T * a)**-1) * a.T *…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpython-remrin.hatenadiary.jp%2Fentry%2F2017%2F05%2F18%2F141616&quot; title=&quot;最小二乗法 - Remrinのpython攻略日記&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-ak.f.st-hatena.com/images/fotolife/r/rare_Remrin/20170518/20170518140226.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-05-18 14:16:16</published>
  <title>最小二乗法</title>
  <type>rich</type>
  <url>https://python-remrin.hatenadiary.jp/entry/2017/05/18/141616</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
