<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	【Kaggle初心者入門編】タイタニック号で生き残るのは誰？ へのコメント	</title>
	<atom:link href="https://www.codexa.net/kaggle-titanic-beginner/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codexa.net/kaggle-titanic-beginner/</link>
	<description>毎日1400名以上のエンジニアが利用してる機械学習 入門コースの決定版！機械学習に必要な線形代数や統計基礎、Pythonライブラリなどの基礎コースも無料で公開中！</description>
	<lastBuildDate>Sun, 08 Jan 2023 11:16:59 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.7.8</generator>
	<item>
		<title>
		hogehoge より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-31</link>

		<dc:creator><![CDATA[hogehoge]]></dc:creator>
		<pubDate>Sun, 08 Jan 2023 11:16:59 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-31</guid>

					<description><![CDATA[ブログ投稿から5年ほど経過していると思いますが、本サイト参考にスムーズに実行できました。
ありがとうございました。]]></description>
			<content:encoded><![CDATA[<p>ブログ投稿から5年ほど経過していると思いますが、本サイト参考にスムーズに実行できました。<br />
ありがとうございました。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		pythonさん より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-28</link>

		<dc:creator><![CDATA[pythonさん]]></dc:creator>
		<pubDate>Mon, 18 Oct 2021 17:54:08 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-28</guid>

					<description><![CDATA[# 「test」の説明変数を使って「my_tree_one」のモデルで予測
my_prediction = my_tree_one.predict(test_features)

ここでエラーが出るのですが、何がいけないのでしょか?]]></description>
			<content:encoded><![CDATA[<p># 「test」の説明変数を使って「my_tree_one」のモデルで予測<br />
my_prediction = my_tree_one.predict(test_features)</p>
<p>ここでエラーが出るのですが、何がいけないのでしょか?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		C より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-26</link>

		<dc:creator><![CDATA[C]]></dc:creator>
		<pubDate>Tue, 22 Jun 2021 06:54:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-26</guid>

					<description><![CDATA[サンプルコマンドをそのままコピペで実行しましたが、微妙に正解確率が違ってしまいました。]]></description>
			<content:encoded><![CDATA[<p>サンプルコマンドをそのままコピペで実行しましたが、微妙に正解確率が違ってしまいました。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		im より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-25</link>

		<dc:creator><![CDATA[im]]></dc:creator>
		<pubDate>Sun, 22 Nov 2020 16:28:35 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-25</guid>

					<description><![CDATA[my_tree_one = tree.DecisionTreeClassifier()のところまではうまくいったのですが、
my_tree_one = my_tree_one.fit(features_one, target)を実行しようとすると、以下のようなエラーが出てしまいます。どうすれば解決できるのでしょうか？

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
 in 
      1 my_tree_one = tree.DecisionTreeClassifier()
----&#062; 2 my_tree_one = my_tree_one.fit(features_one, target)

~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit(self, X, y, sample_weight, check_input, X_idx_sorted)
    888         &quot;&quot;&quot;
    889 
--&#062; 890         super().fit(
    891             X, y,
    892             sample_weight=sample_weight,

~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit(self, X, y, sample_weight, check_input, X_idx_sorted)
    154             check_X_params = dict(dtype=DTYPE, accept_sparse=&quot;csc&quot;)
    155             check_y_params = dict(ensure_2d=False, dtype=None)
--&#062; 156             X, y = self._validate_data(X, y,
    157                                        validate_separately=(check_X_params,
    158                                                             check_y_params))

~\anaconda3\lib\site-packages\sklearn\base.py in _validate_data(self, X, y, reset, validate_separately, **check_params)
    427                 # :(
    428                 check_X_params, check_y_params = validate_separately
--&#062; 429                 X = check_array(X, **check_X_params)
    430                 y = check_array(y, **check_y_params)
    431             else:

~\anaconda3\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)
     71                           FutureWarning)
     72         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---&#062; 73         return f(**kwargs)
     74     return inner_f
     75 

~\anaconda3\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)
    597                     array = array.astype(dtype, casting=&quot;unsafe&quot;, copy=False)
    598                 else:
--&#062; 599                     array = np.asarray(array, order=order, dtype=dtype)
    600             except ComplexWarning:
    601                 raise ValueError(&quot;Complex data not supported\n&quot;

~\anaconda3\lib\site-packages\numpy\core\_asarray.py in asarray(a, dtype, order)
     83 
     84     &quot;&quot;&quot;
---&#062; 85     return array(a, dtype, copy=False, order=order)
     86 
     87 

TypeError: float() argument must be a string or a number, not &#039;method&#039;]]></description>
			<content:encoded><![CDATA[<p>my_tree_one = tree.DecisionTreeClassifier()のところまではうまくいったのですが、<br />
my_tree_one = my_tree_one.fit(features_one, target)を実行しようとすると、以下のようなエラーが出てしまいます。どうすれば解決できるのでしょうか？</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
TypeError                                 Traceback (most recent call last)<br />
 in<br />
      1 my_tree_one = tree.DecisionTreeClassifier()<br />
&#8212;-&gt; 2 my_tree_one = my_tree_one.fit(features_one, target)</p>
<p>~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit(self, X, y, sample_weight, check_input, X_idx_sorted)<br />
    888         &#8220;&#8221;&#8221;<br />
    889<br />
&#8211;&gt; 890         super().fit(<br />
    891             X, y,<br />
    892             sample_weight=sample_weight,</p>
<p>~\anaconda3\lib\site-packages\sklearn\tree\_classes.py in fit(self, X, y, sample_weight, check_input, X_idx_sorted)<br />
    154             check_X_params = dict(dtype=DTYPE, accept_sparse=&#8221;csc&#8221;)<br />
    155             check_y_params = dict(ensure_2d=False, dtype=None)<br />
&#8211;&gt; 156             X, y = self._validate_data(X, y,<br />
    157                                        validate_separately=(check_X_params,<br />
    158                                                             check_y_params))</p>
<p>~\anaconda3\lib\site-packages\sklearn\base.py in _validate_data(self, X, y, reset, validate_separately, **check_params)<br />
    427                 # 🙁<br />
    428                 check_X_params, check_y_params = validate_separately<br />
&#8211;&gt; 429                 X = check_array(X, **check_X_params)<br />
    430                 y = check_array(y, **check_y_params)<br />
    431             else:</p>
<p>~\anaconda3\lib\site-packages\sklearn\utils\validation.py in inner_f(*args, **kwargs)<br />
     71                           FutureWarning)<br />
     72         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})<br />
&#8212;&gt; 73         return f(**kwargs)<br />
     74     return inner_f<br />
     75 </p>
<p>~\anaconda3\lib\site-packages\sklearn\utils\validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)<br />
    597                     array = array.astype(dtype, casting=&#8221;unsafe&#8221;, copy=False)<br />
    598                 else:<br />
&#8211;&gt; 599                     array = np.asarray(array, order=order, dtype=dtype)<br />
    600             except ComplexWarning:<br />
    601                 raise ValueError(&#8220;Complex data not supported\n&#8221;</p>
<p>~\anaconda3\lib\site-packages\numpy\core\_asarray.py in asarray(a, dtype, order)<br />
     83<br />
     84     &#8220;&#8221;&#8221;<br />
&#8212;&gt; 85     return array(a, dtype, copy=False, order=order)<br />
     86<br />
     87 </p>
<p>TypeError: float() argument must be a string or a number, not &#8216;method&#8217;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		im より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-24</link>

		<dc:creator><![CDATA[im]]></dc:creator>
		<pubDate>Sun, 22 Nov 2020 06:38:15 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-24</guid>

					<description><![CDATA[my_tree_one = tree.DecisionTreeClassifier()のところまではうまくいくのですが、my_tree_one.fit(features_one, target)のところからTypeErrorが出てしまいます。
どなたか解決方法わかる方いらっしゃるでしょうか？]]></description>
			<content:encoded><![CDATA[<p>my_tree_one = tree.DecisionTreeClassifier()のところまではうまくいくのですが、my_tree_one.fit(features_one, target)のところからTypeErrorが出てしまいます。<br />
どなたか解決方法わかる方いらっしゃるでしょうか？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		くま より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-14</link>

		<dc:creator><![CDATA[くま]]></dc:creator>
		<pubDate>Tue, 22 Jan 2019 10:28:06 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-14</guid>

					<description><![CDATA[&lt;a href=&quot;https://www.codexa.net/kaggle-titanic-beginner/#comment-9&quot;&gt;ジューン&lt;/a&gt; への返信。

他にも、こっちの方が効率が悪くなりますがlocを使って
test.loc[test[&quot;Sex&quot;]==&quot;male&quot;,&quot;Sex&quot;] = 0
とするやり方もありますよね。]]></description>
			<content:encoded><![CDATA[<p>他にも、こっちの方が効率が悪くなりますがlocを使って<br />
test.loc[test[&#8220;Sex&#8221;]==&#8221;male&#8221;,&#8221;Sex&#8221;] = 0<br />
とするやり方もありますよね。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		ジューン より		</title>
		<link>https://www.codexa.net/kaggle-titanic-beginner/#comment-9</link>

		<dc:creator><![CDATA[ジューン]]></dc:creator>
		<pubDate>Thu, 14 Jun 2018 03:33:36 +0000</pubDate>
		<guid isPermaLink="false">https://www.codexa.net/?p=501#comment-9</guid>

					<description><![CDATA[初心者ですがすごく参考になりました！
ただ文字を数値に置換するところはwarningが出てしまうので
    train[&quot;Sex&quot;] = train[&quot;Sex&quot;].map({&quot;male&quot; : 0, &quot;female&quot; : 1})
    train[&quot;Embarked&quot;] = train[&quot;Embarked&quot;].map({&quot;S&quot; : 0, &quot;C&quot; : 1, &quot;Q&quot; : 2})
のようにしたほうがいいと思いました。]]></description>
			<content:encoded><![CDATA[<p>初心者ですがすごく参考になりました！<br />
ただ文字を数値に置換するところはwarningが出てしまうので<br />
    train[&#8220;Sex&#8221;] = train[&#8220;Sex&#8221;].map({&#8220;male&#8221; : 0, &#8220;female&#8221; : 1})<br />
    train[&#8220;Embarked&#8221;] = train[&#8220;Embarked&#8221;].map({&#8220;S&#8221; : 0, &#8220;C&#8221; : 1, &#8220;Q&#8221; : 2})<br />
のようにしたほうがいいと思いました。</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
