GithubHelp home page GithubHelp logo

Comments (8)

hsuantien avatar hsuantien commented on August 21, 2024

I suggest that we consider the logistic regression type only. Technically,
the C-SVC one can be converted to the LogisticRegression one in some way.
Thanks.

--HT

SC Lee [email protected] 於 2015年12月17日 週四 下午9:22寫道:

Currently Model.predict_real is connected to predict_proba in
scikit-learn, which returns an array of n_classes floats standing for
probabilities of corresponding labels. But decision_function is another
candidate whose returning shapes vary from model to model, for example (in
our case n_samples = 1):

  • LogisticRegression: (n_samples,) if n_classes == 2 else (n_samples,
    n_classes)
  • C-SVC: (n_samples, n_classes * (n_classes-1) / 2)

We have to make sure what we want in order to well-define the interface.
@hsuantien https://github.com/hsuantien can you give us some advice on
this?


Reply to this email directly or view it on GitHub
#21.

from libact.

yangarbiter avatar yangarbiter commented on August 21, 2024

Actually the output of C-SVC differs with different multi class method (OVO, OVR).

from libact.

yangarbiter avatar yangarbiter commented on August 21, 2024

I tried to fix it in this branch https://github.com/ntucllab/libact/tree/predict_real_interface

Though I am not entirely sure the implementation of the largest margin method for now.

from libact.

lsc36 avatar lsc36 commented on August 21, 2024

We should determine the interface before writing code. Is the "LogReg-style conversion" generally applicable?

from libact.

yangarbiter avatar yangarbiter commented on August 21, 2024

For binary classification case, svm and logReg-style are able to convert.

For multiclass case logReg-style supports only OVR method for SVM, but not OVO (it seems sklearn's logReg didn't support OVO).

As for other classifier, we might have to discuss case by case.

from libact.

hsuantien avatar hsuantien commented on August 21, 2024

Let's use OVR-style for the interface now, I suggest. Thanks.

On Fri, Dec 18, 2015 at 5:13 PM, yangarbiter [email protected]
wrote:

For binary classification case, svm and logReg-style are able to convert.

For multiclass case logReg-style supports only OVR method for SVM, but not
OVO (it seems sklearn's logReg didn't support OVO).

As for other classifier, we might have to discuss case by case.


Reply to this email directly or view it on GitHub
#21 (comment).


Hsuan-Tien Lin [email protected]

http://www.csie.ntu.edu.tw/~htlin

Associate Professor
Dept. of Computer Science and Information Engineering
& Graduate Institute of Networking and Multimedia

National Taiwan University

from libact.

yangarbiter avatar yangarbiter commented on August 21, 2024

I think for now we can make predict_real output ndarray with shape (n_sample, n_classes) (even n_classes=2)

but another thing might be defining the meaning of predict_real. For LogisticRegression and SVM like algorithm, their value may be more positive more towards label 1 and negative towards label -1.

How about other algorithms? Will they always be in this case?
@hsuantien

from libact.

lsc36 avatar lsc36 commented on August 21, 2024

Consider as solved. Closing.

from libact.

Related Issues (20)

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.