<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>billest</author_name>
  <author_url>https://blog.hatena.ne.jp/billest/</author_url>
  <blog_title>未来は僕以外の手の中</blog_title>
  <blog_url>https://billest.hatenadiary.org/</blog_url>
  <categories>
    <anon>Python</anon>
  </categories>
  <description>Python、特にSciPyは日本語でのドキュメントが少ないので、メモがてら記述。 単語文書行列などでは大規模疎行列になることがよくある。 そこで格納方法の工夫などを行っていく必要がある。 最もスタンダードな方法としては圧縮行格納方式などがある。 基本的に疎行列の要素は0なので、非零の要素の位置だけ覚えておこうという発想。 もちろん(?)SciPyには疎行列を扱うモジュールsparseが用意されている。 lil_matrixにて疎行列を生成。引数には行列の大きさ(m, n)を指定。 from numpy import * from scipy import io, sparse A = spa…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbillest.hatenadiary.org%2Fentry%2F20090906%2F1252269157&quot; title=&quot;SciPyでの疎行列の扱い、保存など - 未来は僕以外の手の中&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-09-06 05:32:37</published>
  <title>SciPyでの疎行列の扱い、保存など</title>
  <type>rich</type>
  <url>https://billest.hatenadiary.org/entry/20090906/1252269157</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
