Skip to content

Commit cc9c7eb

Browse files
committed
Pushing the docs to dev/ for branch: master, commit d011aedee6b8e6f395c6b93835765ebe93373f47
1 parent ce41f1c commit cc9c7eb

File tree

1,058 files changed

+4387
-4240
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,058 files changed

+4387
-4240
lines changed
2.08 KB
Binary file not shown.
1.15 KB
Binary file not shown.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {
7+
"collapsed": false
8+
},
9+
"outputs": [],
10+
"source": [
11+
"%matplotlib inline"
12+
]
13+
},
14+
{
15+
"cell_type": "markdown",
16+
"metadata": {},
17+
"source": [
18+
"\n# Compact estimator representations\n\n\nThis example illustrates the use of the print_changed_only global parameter.\n\nSetting print_changed_only to True will alterate the representation of\nestimators to only show the parameters that have been set to non-default\nvalues. This can be used to have more compact representations.\n\n"
19+
]
20+
},
21+
{
22+
"cell_type": "code",
23+
"execution_count": null,
24+
"metadata": {
25+
"collapsed": false
26+
},
27+
"outputs": [],
28+
"source": [
29+
"print(__doc__)\n\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn import set_config\n\n\nlr = LogisticRegression(penalty='l1')\nprint('Default representation:')\nprint(lr)\n# LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,\n# intercept_scaling=1, l1_ratio=None, max_iter=100,\n# multi_class='warn', n_jobs=None, penalty='l1',\n# random_state=None, solver='warn', tol=0.0001, verbose=0,\n# warm_start=False)\n\nset_config(print_changed_only=True)\nprint('\\nWith changed_only option:')\nprint(lr)\n# LogisticRegression(penalty='l1')"
30+
]
31+
}
32+
],
33+
"metadata": {
34+
"kernelspec": {
35+
"display_name": "Python 3",
36+
"language": "python",
37+
"name": "python3"
38+
},
39+
"language_info": {
40+
"codemirror_mode": {
41+
"name": "ipython",
42+
"version": 3
43+
},
44+
"file_extension": ".py",
45+
"mimetype": "text/x-python",
46+
"name": "python",
47+
"nbconvert_exporter": "python",
48+
"pygments_lexer": "ipython3",
49+
"version": "3.6.7"
50+
}
51+
},
52+
"nbformat": 4,
53+
"nbformat_minor": 0
54+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
=================================
3+
Compact estimator representations
4+
=================================
5+
6+
This example illustrates the use of the print_changed_only global parameter.
7+
8+
Setting print_changed_only to True will alterate the representation of
9+
estimators to only show the parameters that have been set to non-default
10+
values. This can be used to have more compact representations.
11+
"""
12+
print(__doc__)
13+
14+
from sklearn.linear_model import LogisticRegression
15+
from sklearn import set_config
16+
17+
18+
lr = LogisticRegression(penalty='l1')
19+
print('Default representation:')
20+
print(lr)
21+
# LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
22+
# intercept_scaling=1, l1_ratio=None, max_iter=100,
23+
# multi_class='warn', n_jobs=None, penalty='l1',
24+
# random_state=None, solver='warn', tol=0.0001, verbose=0,
25+
# warm_start=False)
26+
27+
set_config(print_changed_only=True)
28+
print('\nWith changed_only option:')
29+
print(lr)
30+
# LogisticRegression(penalty='l1')

dev/_downloads/scikit-learn-docs.pdf

-26.8 KB
Binary file not shown.

dev/_images/iris.png

0 Bytes
375 Bytes
375 Bytes
612 Bytes
612 Bytes

0 commit comments

Comments
 (0)