Code Monkey home page Code Monkey logo

Comments (24)

evilsocket avatar evilsocket commented on September 28, 2024 1

oook, so the problem is caused by sklearn, the new version broke backwards compatibility by removing the micro avg metric and replacing it with accuracy which has less columns in the classification_report ... working on a fix for both

ironically, it was my environment to be outdated, apologies.

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024 1

yes

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

So I've inserted the following line at line 30 (original file, not the capture above):
if len(row) > len(measures):
And if you don't care about the json report it seems to be fixing it.

image

Side note: That'd be great to mention you also need to install python3-tk package somewhere in the doc

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

could you attach the dataset so I can reproduce it?

Besides:

Schermata da 2019-05-28 11-19-50

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Ok for the doc, thanks.
The dataset is yours, from the pe-av example.

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

I just loaded the dataset with no issue whatsoever, maybe some more details about your config? can you post here the output of ergo info ?

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Sure. EDIT: Can you tell me what versions of tf/keras you have ?
Also Ubuntu 16.04, Python 3.5.2

image

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

Can you try:

sudo pip3 uninstall tensorflow
sudo pip3 install tensorflow==1.12.0

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Ok, done. I'm restarting a training.

from ergo.

nicochidt avatar nicochidt commented on September 28, 2024

Hi Tigzy,

It's very odd that you don't have those metrics in the report. That's generated from sklearn. Can you please report the output of this code snippet:

from sklearn.metrics import classification_report
from sklearn import __version__
print (__version__)
a = [ 0,1,0,1]
b = [0,1,1,0]
print (classification_report(a,b))

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

tf to 1.12 didn't fix, let me get this output @nicochidt

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

to be honest i'm glad it didn't, it'd be very f weird

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Here you go (don't mind my monkey typing :p)
It's not there either...

image

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

this is what you should be seeing ...

Schermata da 2019-05-28 11-45-14

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Maybe I should revert to version 0.20 ? Is that a python module ?

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Wtf 0.0 version.... :/

image

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Thanks a lot ! So in theory if I want to continue working on it today I just need to revert sklearn to 0.20 right ?

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Oh I see there's a fix already, neat.

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

or just uninstall ergo-ai and install this repo from sources

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

yeah yeah I was heading this way rather.

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Was looking at the fix and shouldn't it be a label replacement somewhere as well? Where's that accuracy VS micro avg defined?

from ergo.

evilsocket avatar evilsocket commented on September 28, 2024

i don't understand the question ... the new version just does not present any micro average, but instead there's a new global accuracy metric

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

The question is: I see there's None returned when unable to parse properly
Isn't that possible to have actual accuracy (the old micro avg) values instead of just handle the parsing issue and ignore rows ?

image

from ergo.

Tigzy avatar Tigzy commented on September 28, 2024

Oh OK I think I understand. The new accuracy doesn't replace micro AVG, it's a totally other metric that only has f1-score and support, am I right ?

from ergo.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.