Python数据科学手册 中英文pdf+源代码
Python数据科学手册 中英文pdf+源代码
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 20865282 2018-04-27 19:59 Python数据科学手册Python Data Science Handbook.pdf
....... 1240 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master.gitignore
....... 259 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master.gitmodules
....... 1083 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-masterLICENSE-CODE
....... 18650 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-masterLICENSE-TEXT
....... 13353 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 0.00-Preface.ipynb
....... 7834 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.00-IPython-Beyond-Normal-Python.ipynb
....... 14784 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.01-Help-And-Documentation.ipynb
....... 9952 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.02-Shell-Keyboard-Shortcuts.ipynb
....... 9289 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.03-Magic-Commands.ipynb
....... 8471 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.04-Input-Output-History.ipynb
....... 10908 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.05-IPython-And-Shell-Commands.ipynb
....... 20591 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.06-Errors-and-Debugging.ipynb
....... 18662 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.07-Timing-and-Profiling.ipynb
....... 4965 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.08-More-IPython-Resources.ipynb
....... 6924 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.00-Introduction-to-NumPy.ipynb
....... 23253 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.01-Understanding-Data-Types.ipynb
....... 32845 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.02-The-Basics-Of-NumPy-Arrays.ipynb
....... 31400 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.03-Computation-on-arrays-ufuncs.ipynb
....... 30638 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.04-Computation-on-arrays-aggregates.ipynb
....... 101551 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.05-Computation-on-arrays-broadcasting.ipynb
....... 40504 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.06-Boolean-Arrays-and-Masks.ipynb
....... 62360 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.07-Fancy-Indexing.ipynb
....... 61603 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.08-Sorting.ipynb
....... 16591 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.09-Structured-Data-NumPy.ipynb
....... 6409 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.00-Introduction-to-Pandas.ipynb
....... 39448 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.01-Introducing-Pandas-objects.ipynb
....... 40650 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.02-Data-Indexing-and-Selection.ipynb
....... 26937 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.03-Operations-in-Pandas.ipynb
....... 36784 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.04-Missing-Values.ipynb
............此处省略142个文件信息
import numpy as np
import matplotlib.pyplot as plt
from sklearn.tree import DecisionTreeClassifier
from ipywidgets import interact
def visualize_tree(estimator X y boundaries=True
xlim=None ylim=None ax=None):
ax = ax or plt.gca()
# Plot the training points
ax.scatter(X[: 0] X[: 1] c=y s=30 cmap=‘viridis‘
clim=(y.min() y.max()) zorder=3)
ax.axis(‘tight‘)
ax.axis(‘off‘)
if xlim is None:
xlim = ax.get_xlim()
if ylim is None:
ylim = ax.get_ylim()
# fit the estimator
estimator.fit(X y)
xx yy = np.meshgrid(np.linspace(*xlim num=200)
np.linspace(*ylim num=200))
Z = estimator.predict(np.c_[xx.ravel() yy.ravel()])
# Put the result into a color plot
n_classes = len(np.unique(y))
Z = Z.reshape(xx.shape)
contours = ax.contourf(xx yy Z alpha=0.3
levels=np.arange(n_classes + 1) - 0.5
cmap=‘viridis‘ clim=(y.min() y.max())
zorder=1)
ax.set(xlim=xlim ylim=ylim)
# Plot the decision boundaries
def plot_boundaries(i xlim ylim):
if i >= 0:
tree = estimator.tree_
if tree.feature[i] == 0:
ax.plot([tree.threshold[i] tree.threshold[i]] ylim ‘-k‘ zorder=2)
plot_boundaries(tree.children_left[i]
[xlim[0] tree.threshold[i]] ylim)
plot_boundaries(tree.children_right[i]
[tree.threshold[i] xlim[1]] ylim)
elif tree.feature[i] == 1:
ax.plot(xlim [tree.threshold[i] tree.threshold[i]] ‘-k‘ zorder=2)
plot_boundaries(tree.children_left[i] xlim
[ylim[0] tree.threshold[i]])
plot_boundaries(tree.children_right[i] xlim
[tree.threshold[i] ylim[1]])
if boundaries:
plot_boundaries(0 xlim ylim)
def plot_tree_interactive(X y):
def interactive_tree(depth=5):
clf = DecisionTreeClassifier(max_depth=depth random_state=0)
visualize_tree(clf X y)
return interact(interactive_tree depth=[1 5])
def randomized_tree_interactive(X y):
N = int(0.75 * X.shape[0])
xlim = (X[: 0].min() X[: 0].max())
ylim = (X[: 1].min() X[: 1].max())
def fit_randomized_tree(random_state=0):
clf = DecisionTreeClassifier(max_depth=15)
i = np.arange(len(y))
rng = np.random.RandomState(random_state)
rng.shuffle(i)
visualize_tree(clf X[i[:N]] y[i[:N]] boundaries=False
xlim=xlim ylim=ylim)
interact(fit_randomized_tree random_state=[0 100]);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 20865282 2018-04-27 19:59 Python数据科学手册Python Data Science Handbook.pdf
....... 1240 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master.gitignore
....... 259 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master.gitmodules
....... 1083 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-masterLICENSE-CODE
....... 18650 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-masterLICENSE-TEXT
....... 13353 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 0.00-Preface.ipynb
....... 7834 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.00-IPython-Beyond-Normal-Python.ipynb
....... 14784 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.01-Help-And-Documentation.ipynb
....... 9952 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.02-Shell-Keyboard-Shortcuts.ipynb
....... 9289 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.03-Magic-Commands.ipynb
....... 8471 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.04-Input-Output-History.ipynb
....... 10908 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.05-IPython-And-Shell-Commands.ipynb
....... 20591 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.06-Errors-and-Debugging.ipynb
....... 18662 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.07-Timing-and-Profiling.ipynb
....... 4965 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 1.08-More-IPython-Resources.ipynb
....... 6924 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.00-Introduction-to-NumPy.ipynb
....... 23253 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.01-Understanding-Data-Types.ipynb
....... 32845 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.02-The-Basics-Of-NumPy-Arrays.ipynb
....... 31400 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.03-Computation-on-arrays-ufuncs.ipynb
....... 30638 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.04-Computation-on-arrays-aggregates.ipynb
....... 101551 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.05-Computation-on-arrays-broadcasting.ipynb
....... 40504 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.06-Boolean-Arrays-and-Masks.ipynb
....... 62360 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.07-Fancy-Indexing.ipynb
....... 61603 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.08-Sorting.ipynb
....... 16591 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 2.09-Structured-Data-NumPy.ipynb
....... 6409 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.00-Introduction-to-Pandas.ipynb
....... 39448 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.01-Introducing-Pandas-ob
....... 40650 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.02-Data-Indexing-and-Selection.ipynb
....... 26937 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.03-Operations-in-Pandas.ipynb
....... 36784 2017-11-14 05:31 Python数据科学手册PythonDataScienceHandbook-master
otebooks 3.04-Missing-Values.ipynb
............此处省略142个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)