Download the seeds_dataset.txt data set from the book's GitHub site, which contains 210 independent examples. The categorical

Question:

Download the seeds_dataset.txt data set from the book's GitHub site, which contains 210 independent examples. The categorical output (response) here is the type of wheat grain: Kama, Rosa, and Canadian (encoded as 1, 2, and 3), so that \(c=3\). The seven continuous features (explanatory variables) are measurements of the geometrical properties of the grain (area, perimeter, compactness, length, width, asymmetry coefficient, and length of kernel groove). Thus, \(x \in \mathbb{R}^{7}\) (which does not include the constant feature 1) and the multi-logit pre-classifier in Example 9.2 can be written as \(\boldsymbol{g}(\boldsymbol{x})=\operatorname{softmax}(\mathbf{W} \boldsymbol{x}+\boldsymbol{b})\), where \(\mathbf{W} \in \mathbb{R}^{3 \times 7}\) and \(\boldsymbol{b} \in \mathbb{R}^{3}\). Implement and train this pre-classifier on the first \(n=105\) examples of the seeds data set using, for example, Algorithm 9.4.1. Use the remaining \(\mathrm{n}^{\prime}=105\) examples in the data set to estimate the generalization risk of the learner using the cross-entropy loss. [Hint: Use the crossentropy loss formulas from Example 9.4.]


Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Data Science And Machine Learning Mathematical And Statistical Methods

ISBN: 9781118710852

1st Edition

Authors: Dirk P. Kroese, Thomas Taimre, Radislav Vaisman, Zdravko Botev

Question Posted: