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

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.

主站蜘蛛池模板: 阿勒泰市| 华坪县| 古浪县| 二连浩特市| 巫溪县| 泰宁县| 满洲里市| 阿拉善左旗| 通州区| 奎屯市| 南澳县| 获嘉县| 从化市| 临沂市| 房产| 郸城县| 呼伦贝尔市| 吕梁市| 泸州市| 万安县| 宣武区| 平南县| 峨山| 台山市| 古浪县| 历史| 治多县| 唐山市| 宁国市| 略阳县| 日照市| 阳江市| 靖州| 上虞市| 平乐县| 三原县| 武定县| 石柱| 富宁县| 印江| 正安县|