Comments (1)
I just double-checked and you are right. This difference occurs in scikit-learn 0.20. If I use 0.19, I still get the 3 examples misclassified. In any case, for the perceptron, this is not important as it does not converge anyway when the classes are not linearly seperable, so you will get different results depending on the random seed or the number of iterations. I.e., it will cyclye through 2-9 misclassifications if you run it longer.
In other words, it's not an issue in your code, more like a shortcoming of the perceptron algorithm. If you are interested, I have some more details about the perceptron algorithms in my lecture slides: https://github.com/rasbt/stat479-deep-learning-ss19/blob/master/L03_perceptron/L03_perceptron_slides.pdf
from python-machine-learning-book-2nd-edition.
Related Issues (20)
- Typo of Chapter 7 HOT 1
- typo: pg. 186 HOT 1
- Chapter 16 typo HOT 1
- Chapter 16: Modeling Sequential Data Using Recurrent HOT 6
- Running on Ubuntu 16.04 fails HOT 3
- Chapter 9: displaying web app in firefox vs chrome HOT 1
- Chapter 6, page 203 HOT 3
- About sklearn best estimator from cross validator HOT 1
- Chapter 9: update.py HOT 1
- Fix for imread not working if scipy version > 1.2.0 HOT 1
- create a tensorflow 2.0 version of chapter 13 to 16? HOT 1
- kernel pca scikit plotting code extension for multiple gammas
- Chapter 15 p498 typo? HOT 3
- Mm
- 2
- chap09-9.4 将电影评论分类器转换为网络应用:代码编译不过 HOT 1
- python ml book
- Chap15 conv1d and conv2d HOT 3
- Olá, comecei a estudar Machile Learning há alguns meses. Com isso comecei a estudar Redes Neurais. Tentei escrever um script para dá uma olhada no comportamento do Perceptron para entender melhor, no entanto, quando comecei a escrever o código e rodei o mesmo me deparei com o seguinte erro: AttributeError: 'Perceptron' object has no attribute 'fit' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-machine-learning-book-2nd-edition.