You are on page 1of 2

Errata May 2023

Chap Page/loc
ter ation Current (wrong) Revised

295 last
paragrap Python's \emph{MLPClassifier()}
11 h Python's \emph{MLPClassify()} method method

\begin{eqnarray}
\label{eq:euclideanDA}
D_{{\rm Statistical}} (\mathbf{x},\overline{\mathbf{x}})
&=& \sqrt{
[\mathbf{x} - \overline{\mathbf{x}}]' S^{-1}
[\mathbf{x} - \overline{\mathbf{x}}]
} \nonumber \\
&=& \sqrt{
[(x_1- \overline{x}_1),(x_2- \overline{x}_2), \ldots,
(x_p- \overline{x}_p)] S^{-1} \left[
\begin{array}{l}
x_1- \overline{x}_1 \\
x_2- \overline{x}_2 \\
\hspace*{.2in} \vdots \\
x_p- \overline{x}_p \end{array}
Equation The two right hand sides of the equation \right]
} \nonumber \\
12 12.2 require a square root \end{eqnarray}

7 Table 7.2 outcome = outcome = 'Ownership'

8 Table 8.5 pd.set_option('precision', 4) pd.set_option('display.precision', 4)

Table
11 11.2 hidden_layer_sizes=(3) hidden_layer_sizes=[3]

Table
11 11.6 hidden_layer_sizes=(2) hidden_layer_sizes=[2]

Figure boxdata_df = boxdata_df =


5.1 pred_error_train.append(pred_error_vali pd.concat([pred_error_train,
5 (code) d, ignore_index=True) pred_error_valid])

# the missing values will create a third


category
# use drop_first=True to drop the first # use the arguments drop_first and
dummy variable dummy_na to control the outcome
housing_df = housing_df =
Table 2.6 pd.get_dummies(housing_df, pd.get_dummies(housing_df,
2 (code) prefix_sep='_', drop_first=True) prefix_sep='_', dtype=int)

bank_df.Education.cat.rename_categori
bank_df.Education.cat.rename_categori es(new_categories)
Table es(new_categories, inplace=True) bank_df = pd.get_dummies(bank_df,
10.2 bank_df = pd.get_dummies(bank_df, prefix_sep='_', drop_first=True,
10 (code) prefix_sep='_', drop_first=True) dtype=int)

fct = pd.DataFrame([lda_reg.intercept_], fct = pd.concat([


Table columns=lda_reg.classes_, pd.DataFrame([lda_reg.intercept_],
12.4 index=['constant']) columns=lda_reg.classes_,
12 (code) fct = index=['constant']),
fct.append(pd.DataFrame(lda_reg.coef_. pd.DataFrame(lda_reg.coef_.transpose(
transpose(), columns=lda_reg.classes_, ), columns=lda_reg.classes_,
index=list(accidents_df.columns)[:-1])) index=list(accidents_df.columns)[:-1])])

train_res_arima = train_res_arima =
ARIMA(train_lm_trendseason.resid, ARIMA(train_lm_trendseason.resid,
order=(1, 0, 0), order=(1, 0, 0), freq='MS', trend='c').fit()
Table freq='MS').fit(trend='nc') forecast =
17.7 forecast, _, conf_int = train_res_arima.get_forecast(1)
17 (code) train_res_arima.forecast(1) conf_int = forecast.conf_int()

Table
17.9 sp500_arima = ARIMA(sp500_ts, sp500_arima = ARIMA(sp500_ts,
17 (code) order=(1, 0, 0)).fit(disp=0) order=(1, 0, 0)).fit()

You might also like