machinelearning's People
Forkers
drjmunozmx lamjwe 24man akkhil2012 harshbhardwajcsit atrisaxena tanvirduggal enigmak9 sungbin2 suriyajsk kksun12 mohamedragab44 songtaeseung ziapapa sharon9383 iwatama97 assaeunji bigexplorer zephyrosjyd shpimit sridhu1988 leighsix 95hongju itlockit2 nemozzang twotop3 wonhyeok inbm pmw1711 ybib moonhj3117 habibmrad raon0207 kyenn28 egreen777 jeonlegend hansangyoon yamujin jinmopark kim-keunwook yyyujin2 jeff-madison naheenosaur davidchoi-dev kim2108pw polpolie bbytiger heewonchae necimye meduremi jungwonhak peterchokr kangyunghun jykim91 aliciawill rajreddyr yullieyang woosangwoo dagistankaradeniz uijihmachinelearning's Issues
AttributeError: 'dict' object has no attribute 'iteritems'
Python 버전 : 3.7.4
Error log :
Traceback (most recent call last): File "c:/Dev/python/kNN.py", line 59, in
result = classify0([2.0, 3.0], group, labels,3)
File "c:/Dev/python/kNN.py", line 53, in classify0
sortedClassCount = findMajorityClass(inX, dataSet, labels, k, sortedDistIndices)
File "c:/Dev/python/kNN.py", line 46, in findMajorityClass
return sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True)
AttributeError: 'dict' object has no attribute 'iteritems'
Solve:
Line 46 = return sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True)
iteritems => items 로 수정
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.