<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Ask Ghassem - Recent questions tagged sklearn</title>
<link>https://ask.ghassem.com/tag/sklearn</link>
<description>Powered by Question2Answer</description>
<item>
<title>Can I use a single Pipeline for multiple estimators in scikit-learn?</title>
<link>https://ask.ghassem.com/819/can-use-single-pipeline-for-multiple-estimators-scikit-learn</link>
<description>Is there any proper way to combine multiple classifiers and their parameter grids in one Pipeline?</description>
<category>Machine Learning</category>
<guid isPermaLink="true">https://ask.ghassem.com/819/can-use-single-pipeline-for-multiple-estimators-scikit-learn</guid>
<pubDate>Tue, 18 Feb 2020 14:14:30 +0000</pubDate>
</item>
<item>
<title>score() vs accuracy_score() in sklearn</title>
<link>https://ask.ghassem.com/777/score-vs-accuracyscore-in-sklearn</link>
<description>Hi,&lt;br /&gt;
&lt;br /&gt;
Since I still have confuse to use the score() &amp;nbsp;and accuracy_score(), so I want to confirm my test assumption.&lt;br /&gt;
Q1: score(), we use the split data to test the accuracy by knn.score(X_test, y_test) to prevent bias using the same training data, right? here knn.score(X_test, y_test) just compare the pair of test value.&lt;br /&gt;
&lt;br /&gt;
Q2: accuracy_score from sklearn.metrics to test the predicted output of target value &amp;quot;y_pred&amp;quot; with the y_test, using accuracy_score(y_test, y_pred), just compare the actual target value and predicted target value?&lt;br /&gt;
&lt;br /&gt;
Q3.My result is the same after using both methods, are they doing the same thing?&lt;br /&gt;
&lt;br /&gt;
Q4.using accuracy_score(), I can using to compare the split training target data y_train with the y_train_pred(return form knn.predict(X_train) ). Then it should be OK now, using it to show the accuracy by accuracy_score(y_train, y_train_pred), since the prediction is done and just compare the original data, then the bias does not exist?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
<category>Machine Learning</category>
<guid isPermaLink="true">https://ask.ghassem.com/777/score-vs-accuracyscore-in-sklearn</guid>
<pubDate>Tue, 21 Jan 2020 21:28:11 +0000</pubDate>
</item>
</channel>
</rss>