Giter VIP home page Giter VIP logo

scikit-elm's People

Contributors

akusok avatar espinosaleal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scikit-elm's Issues

predict_proba() doesn't match predict() in binary classification

Hi,
I'm running the code that prints the model.predict, model.predict_proba in binary classification. The problem is the probabilities from predict_proba() don't appear to match the predicted class from predict(). See the sample of the code and the printout below:

df = pd.read_excel (r'D:\elm\heartlog.xlsx',header=None)
X,y=df.iloc[:,:-1],df.iloc[:,-1]
X_train, X_test, y_train, y_test = train_test_split(X, y, stratify=y, test_size=0.02)
clf=ELMClassifier(n_neurons=10, ufunc='sigm')
clf.fit(X_train,y_train)
y_pred=clf.predict(X_test)
y_proba=clf.predict_proba(X_test)
print("pred",y_pred)
print("proba",y_proba)

Result :
pred [1 1 2 1 1 1]
proba [[0.39689426 0.60310574]
[0.39158382 0.60841618]
[0.33327835 0.66672165]
[0.39609943 0.60390057]
[0.39689428 0.60310572]
[0.39689424 0.60310576]]

It shows all test data having the highest probability to the second class. I did try to do it on other dataset with binary class (livers disorder and HCC survival from UCI), but almost all of predict_proba result was having the highest probability to the second class and it didnt match with model.predict results.

I also tried to do it on dataset with multi class datasets (iris, dermatology, and breast tissue from UCI), the results of predict is matching with predict_proba. So i think the problem is only occurs on binary classification.

How can i get predict results that match with predict_proba in binary classification?

_get_tags

ValueError: The key pairwise is not defined in _get_tags() for the class ELMClassifier.

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.