<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hayataka2049</author_name>
  <author_url>https://blog.hatena.ne.jp/hayataka2049/</author_url>
  <blog_title>静かなる名辞</blog_title>
  <blog_url>https://hayataka2049.hatenablog.jp/</blog_url>
  <categories>
    <anon>python</anon>
    <anon>scipy</anon>
    <anon>機械学習</anon>
    <anon>Tips</anon>
  </categories>
  <description>ことのあらまし データの標準化は機械学習の前処理としてとても重要です。そして疎行列型データ構造は、スパースなデータを表現するためにはとても適しています。 残念ながら、普通に疎行列型を標準化しようとすると、疎行列性が失せます。考えてみればわかるのですが、普通の標準化では平均0にしてしまいます。たとえば非負の疎行列だとすると、大半を占める0のデータはたぶん負値になることでしょう。そしてスパース性は維持できません。 scikit-learnの素敵な対策 ま、この辺は当然考えられていて、なんと超親切なメッセージが出ます。 from scipy.sparse import csr_matrix from…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhayataka2049.hatenablog.jp%2Fentry%2F2020%2F02%2F08%2F073241&quot; title=&quot;scikit-learnのStandardScalerで疎行列型のまま標準化する - 静かなる名辞&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>2020-02-08 07:32:41</published>
  <title>scikit-learnのStandardScalerで疎行列型のまま標準化する</title>
  <type>rich</type>
  <url>https://hayataka2049.hatenablog.jp/entry/2020/02/08/073241</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
