官术网_书友最值得收藏!

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We will begin applying PCA to the handwritten digits dataset with the following code."

A block of code is set as follows:

import numpy as np
from sklearn.datasets import load_digits
import matplotlib.pyplot as plt
from sklearn.decomposition import PCA
from sklearn.preprocessing import scale
from sklearn.lda import LDA
import matplotlib.cm as cm

digits = load_digits()
data = digits.data

n_samples, n_features = data.shape
n_digits = len(np.unique(digits.target))
labels = digits.target

Any command-line input or output is written as follows:

[ 0.39276606 0.49571292 0.43933243 0.53573558 0.42459285 
 0.55686854 0.4573401 0.49876358 0.50281585 0.4689295 ]

0.4772857426

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 徐汇区| 高要市| 扎鲁特旗| 磐安县| 库伦旗| 东乡| 蛟河市| 通榆县| 六盘水市| 吉木萨尔县| 淮安市| 达拉特旗| 临武县| 海口市| 正宁县| 连南| 永吉县| 阜城县| 无极县| 阜城县| 巫山县| 永嘉县| 蓬莱市| 含山县| 达拉特旗| 会同县| 浮山县| 乌苏市| 松原市| 左贡县| 阳春市| 依兰县| 安义县| 甘孜| 来安县| 伊金霍洛旗| 衡山县| 桦川县| 田阳县| 哈密市| 孝义市|