0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

2019-08-12 わからなかったところ

Posted at

この記事は、今日の学習において、個人的にわからなかったところを復習していくだけです。私のための記事であることはご了承ください。

make_blobs

クラスタリングのサンプルデータ生成にmake_blobsを使いました。まずは、make_blobsの動作を見てみます。

from sklearn.datasets import make_blobs

x,y = make_blobs(random_state=0)

# 出力
x
# [[ 2.632  0.689]
 [ 0.081  4.691]
 [ 3.003  0.743]
 [-0.638  4.091]...
# 100行、2列の二次元配列
y
# [1 0 1 0 0 0...
# 要素が100個の配列

make_blobsは、上記の通り100行2列のndarray型の配列と100個の要素を持つndarray型の配列を生成してくれます。make_blobsの引数であるrandom_stateは、擬似乱数のシード値を固定するために使われます。擬似乱数のシード値に関してはこちらをご覧ください。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?