GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BuildingMachineLearningSystemsWithPython/ch02 at master · luispedro/BuildingMachineLearningSystemsWithPython

Expand file tree

/

ch02

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

ch02

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
data
data
 
 
extra
extra
 
 
tests
tests
 
 
README.rst
README.rst
 
 
chapter.py
chapter.py
 
 
figure1.py
figure1.py
 
 
figure2.py
figure2.py
 
 
figure4_5_no_sklearn.py
figure4_5_no_sklearn.py
 
 
figure4_5_sklearn.py
figure4_5_sklearn.py
 
 
heldout.py
heldout.py
 
 
knn.py
knn.py
 
 
load.py
load.py
 
 
seeds_knn.py
seeds_knn.py
 
 
seeds_knn_increasing_k.py
seeds_knn_increasing_k.py
 
 
seeds_knn_sklearn.py
seeds_knn_sklearn.py
 
 
seeds_threshold.py
seeds_threshold.py
 
 
simple_threshold.py
simple_threshold.py
 
 
stump.py
stump.py
 
 
threshold.py
threshold.py
 
 

README.rst

Chapter 2

Support code for Chapter 2: Learning How to Classify with Real-world Examples. The directory data contains the seeds dataset, originally downloaded from https://archive.ics.uci.edu/ml/datasets/seeds

chapter.py
The code as printed in the book.
figure1.py
Figure 1 in the book: all 2-by-2 scatter plots
figure2.py
Figure 2 in the book: threshold & decision area
figure4_5_sklearn.py
Figures 4 and 5 in the book: Knn decision borders before and after feature normalization. This also produces a version of the figure using 11 neighbors (not in the book), which shows that the result is smoother, not as sensitive to exact positions of each datapoint.
figure4_5_no_sklearn.py
Alternative code for Figures 4 and 5 without using scikit-learn
load.py
Code to load the seeds data
simple_threshold.py
Code from the book: finds the first partition, between Setosa and the other classes.
stump.py
Code from the book: finds the second partition, between Virginica and Versicolor.
threshold.py
Functional implementation of a threshold classifier
heldout.py
Evalute the threshold model on heldout data
seeds_knn_sklearn.py
Demonstrate cross-validation and feature normalization using scikit-learn
seeds_threshold.py
Test thresholding model on the seeds dataset (result mention in book, but no code)
seeds_knn_increasing_k.py
Test effect of increasing num_neighbors on accuracy.
knn.py
Implementation of K-Nearest neighbor without using scikit-learn.
seeds_knn.py
Demonstrate cross-validation (without scikit-learn)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.