Collective Smart Programming-errata (Chapter 5 ~ Chapter 10)

Source: Internet
Author: User

Chapter5 random optimization technology:

1. In randomoptimize, the returned value should be bestr

2. In geneticoptimize, the mute function should return a compilation result for all paths; otherwise, it will be used in subsequent dorm tests.

An exception is reported, which should be changed:

3. In crosscount, the float type should be added for forced type conversion. Otherwise, the result will still have a crossover line.

4. The drawnetwork should be saved to a local file before it can be opened.

Chapter 7 Decision Tree Modeling:

P167: If you use decision_tree_example.txt to load data, note that the last element of each row will

Remove '\ n' as needed. Otherwise, the classification result will be affected.

Chapter 8 builds a price model:

P168: 300 test data should be randomly generated.
P172: One coordinate axis is the weight, and the other is the distance.

The output result is incorrect:

P175: When you test the weight function, the result is

P181: Compared with rescale, sometimes the effect is not so significant.

Note that the interference parameters between the code in the book and the accompanying code are different when wineset is generated.

P183: The Discount Store Price is half

P188: Do not make Figure8-11 effect, my,

Chapter 9 High-level classification: kernel method and SVM:

P208 if all milesdistance values are returned by default, p210 scaleinput should be changed:

P213: nlclassify needs to be modified:

The code for calling the p213 RBF function veclength is as follows:

For libsvm usage, go to https://github.com/cjlin1/libsvm/releasesto download v290.pdf, and

You need to compile and compile the svmc. PYD file of your platform using VC ++ 2010 and put it in the DLL in the python installation path.

Specifically, go to the python folder of the libsvm-290 and execute Python setup. py install.

Chapter 10 find independent features:

To call the drawdendrogram of chapter6 on the p232 page, you need to modify a code to solve the encoding problem:

P239: When the matrix is 0, special processing is required:

P271: the tournament function contains a Written Error of the author, which should be:

 

Collective Smart Programming-errata (Chapter 5 ~ Chapter 10)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.