回答編集履歴

3

説明文修正

2018/02/24 06:06

投稿

wakame
wakame

スコア1170

test CHANGED
@@ -1,4 +1,4 @@
1
- [追記]
1
+ **[追記]**
2
2
 
3
3
  本が手元にないので翻訳元の[introduction_to_ml_with_python](https://github.com/amueller/introduction_to_ml_with_python)リポジトリを調べてみました。
4
4
 

2

説明追記

2018/02/24 06:06

投稿

wakame
wakame

スコア1170

test CHANGED
@@ -1,14 +1,44 @@
1
1
  [追記]
2
2
 
3
- https://github.com/amueller/introduction_to_ml_with_python/issues/60
3
+ 本が手元にないので翻訳元の[introduction_to_ml_with_python](https://github.com/amueller/introduction_to_ml_with_python)リポジトリを調べてみました。
4
+
5
+ 関連しそうなIssueがあったので参考にしてください。
6
+
7
+ [amueller/introduction_to_ml_with_python - Question about make_blobs(n_samples)](https://github.com/amueller/introduction_to_ml_with_python/issues/60)
4
8
 
5
9
  sklearnのmake_blobsを使うのではなく
6
10
 
7
- https://github.com/amueller/introduction_to_ml_with_python/blob/cdc33dd1e483dd8f3d494b41c49916119e78a1db/mglearn/make_blobs.py
11
+ [amueller/introduction_to_ml_with_python/mglearn/make_blobs.py](https://github.com/amueller/introduction_to_ml_with_python/blob/cdc33dd1e483dd8f3d494b41c49916119e78a1db/mglearn/make_blobs.py)
8
12
 
9
13
  こちらのリポジトリのmake_blobsを使うのではないですか。
10
14
 
11
15
 
16
+
17
+ ```python
18
+
19
+ # 質問者様が抽出しているコード?
20
+
21
+ # sklearn.datasetsのmake_blobs使ってないですね
22
+
23
+ from mglearn.datasets import make_blobs
24
+
25
+ X, y = make_blobs(n_samples=(400, 50), centers=2, cluster_std=[7.0, 2],
26
+
27
+ random_state=22)
28
+
29
+ X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)
30
+
31
+ svc = SVC(gamma=.05).fit(X_train, y_train)
32
+
33
+ ```
34
+
35
+
36
+
37
+ [amueller/introduction_to_ml_with_python/05-model-evaluation-and-improvement.ipynb](https://github.com/amueller/introduction_to_ml_with_python/blob/master/05-model-evaluation-and-improvement.ipynb)
38
+
39
+
40
+
41
+ ---
12
42
 
13
43
  tupleで渡しているのが悪いのでは?
14
44
 

1

質問追記

2018/02/24 06:05

投稿

wakame
wakame

スコア1170

test CHANGED
@@ -1,3 +1,15 @@
1
+ [追記]
2
+
3
+ https://github.com/amueller/introduction_to_ml_with_python/issues/60
4
+
5
+ sklearnのmake_blobsを使うのではなく
6
+
7
+ https://github.com/amueller/introduction_to_ml_with_python/blob/cdc33dd1e483dd8f3d494b41c49916119e78a1db/mglearn/make_blobs.py
8
+
9
+ こちらのリポジトリのmake_blobsを使うのではないですか。
10
+
11
+
12
+
1
13
  tupleで渡しているのが悪いのでは?
2
14
 
3
15