Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf601d5b

Browse files
committed
Pushing the docs to dev/ for branch: main, commit 2d9fa48aafa8e43304b7fd2b0cb76eabc48806ef
1 parent54df66d commitf601d5b

File tree

1,319 files changed

+5785
-5780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,319 files changed

+5785
-5780
lines changed

‎dev/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config:64552944cc0ffe4efdd50963e6027564
3+
config:a0f54c044cc4c39c7016296a66a9f00f
44
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.

‎dev/_downloads/15dc6d7a809edf988a7328336a25faec/plot_column_transformer.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"outputs": [],
1717
"source": [
18-
"# Author: Matt Terry <matt.terry@gmail.com>\n#\n# License: BSD 3 clause\n\nimport numpy as np\n\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.decomposition importTruncatedSVD\nfrom sklearn.feature_extraction import DictVectorizer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.metrics import classification_report\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import FunctionTransformer\nfrom sklearn.svm import LinearSVC"
18+
"# Author: Matt Terry <matt.terry@gmail.com>\n#\n# License: BSD 3 clause\n\nimport numpy as np\n\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.decomposition importPCA\nfrom sklearn.feature_extraction import DictVectorizer\nfrom sklearn.feature_extraction.text import TfidfVectorizer\nfrom sklearn.metrics import classification_report\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.preprocessing import FunctionTransformer\nfrom sklearn.svm import LinearSVC"
1919
]
2020
},
2121
{
@@ -105,7 +105,7 @@
105105
},
106106
"outputs": [],
107107
"source": [
108-
"pipeline = Pipeline(\n [\n # Extract subject & body\n (\"subjectbody\", subject_body_transformer),\n # Use ColumnTransformer to combine the subject and body features\n (\n \"union\",\n ColumnTransformer(\n [\n # bag-of-words for subject (col 0)\n (\"subject\", TfidfVectorizer(min_df=50), 0),\n # bag-of-words with decomposition for body (col 1)\n (\n \"body_bow\",\n Pipeline(\n [\n (\"tfidf\", TfidfVectorizer()),\n (\"best\", TruncatedSVD(n_components=50)),\n ]\n ),\n 1,\n ),\n # Pipeline for pulling text stats from post's body\n (\n \"body_stats\",\n Pipeline(\n [\n (\n \"stats\",\n text_stats_transformer,\n ), # returns a list of dicts\n (\n \"vect\",\n DictVectorizer(),\n ), # list of dicts -> feature matrix\n ]\n ),\n 1,\n ),\n ],\n # weight above ColumnTransformer features\n transformer_weights={\n \"subject\": 0.8,\n \"body_bow\": 0.5,\n \"body_stats\": 1.0,\n },\n ),\n ),\n # Use a SVC classifier on the combined features\n (\"svc\", LinearSVC(dual=False)),\n ],\n verbose=True,\n)"
108+
"pipeline = Pipeline(\n [\n # Extract subject & body\n (\"subjectbody\", subject_body_transformer),\n # Use ColumnTransformer to combine the subject and body features\n (\n \"union\",\n ColumnTransformer(\n [\n # bag-of-words for subject (col 0)\n (\"subject\", TfidfVectorizer(min_df=50), 0),\n # bag-of-words with decomposition for body (col 1)\n (\n \"body_bow\",\n Pipeline(\n [\n (\"tfidf\", TfidfVectorizer()),\n (\"best\", PCA(n_components=50, svd_solver=\"arpack\")),\n ]\n ),\n 1,\n ),\n # Pipeline for pulling text stats from post's body\n (\n \"body_stats\",\n Pipeline(\n [\n (\n \"stats\",\n text_stats_transformer,\n ), # returns a list of dicts\n (\n \"vect\",\n DictVectorizer(),\n ), # list of dicts -> feature matrix\n ]\n ),\n 1,\n ),\n ],\n # weight above ColumnTransformer features\n transformer_weights={\n \"subject\": 0.8,\n \"body_bow\": 0.5,\n \"body_stats\": 1.0,\n },\n ),\n ),\n # Use a SVC classifier on the combined features\n (\"svc\", LinearSVC(dual=False)),\n ],\n verbose=True,\n)"
109109
]
110110
},
111111
{

‎dev/_downloads/3e8abcbcde21489054beb05cb87da525/plot_column_transformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
fromsklearn.composeimportColumnTransformer
2828
fromsklearn.datasetsimportfetch_20newsgroups
29-
fromsklearn.decompositionimportTruncatedSVD
29+
fromsklearn.decompositionimportPCA
3030
fromsklearn.feature_extractionimportDictVectorizer
3131
fromsklearn.feature_extraction.textimportTfidfVectorizer
3232
fromsklearn.metricsimportclassification_report
@@ -141,7 +141,7 @@ def text_stats(posts):
141141
Pipeline(
142142
[
143143
("tfidf",TfidfVectorizer()),
144-
("best",TruncatedSVD(n_components=50)),
144+
("best",PCA(n_components=50,svd_solver="arpack")),
145145
]
146146
),
147147
1,
Binary file not shown.

‎dev/_downloads/scikit-learn-docs.zip

-18 KB
Binary file not shown.
-746 Bytes
-101 Bytes
-16 Bytes
2 Bytes
16 Bytes
118 Bytes
8 Bytes
59 Bytes
-110 Bytes
-125 Bytes
35 Bytes
-7.09 KB
-3.97 KB
-836 Bytes
45 Bytes
1 Byte
-47 Bytes
-35 Bytes
33 Bytes
4 Bytes
-120 Bytes
97 Bytes
-47 Bytes
220 Bytes
-59 Bytes
-23 Bytes
925 Bytes
-372 Bytes
-407 Bytes
-350 Bytes
13 Bytes
-41 Bytes
1 Byte

‎dev/_sources/auto_examples/applications/plot_cyclical_feature_engineering.rst.txt

Lines changed: 1 addition & 1 deletion

‎dev/_sources/auto_examples/applications/plot_digits_denoising.rst.txt

Lines changed: 1 addition & 1 deletion

‎dev/_sources/auto_examples/applications/plot_face_recognition.rst.txt

Lines changed: 3 additions & 3 deletions

‎dev/_sources/auto_examples/applications/plot_model_complexity_influence.rst.txt

Lines changed: 14 additions & 14 deletions

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp