Skip to content

Classification #8139

Open
Open

Description

@ucmazsinan

Is your feature request related to a problem? Please describe

ı want to classify ordinal logistic reggression

Describe the solution you'd like

ı want to confusion matrix classfication performance more than 2 level ordinal regression

Activity

  1. ucmazsinan commented on Feb 18, 2022

    @ucmazsinan
    Author

    Screenshot_2
    here ı dont want to get probability, instead classification labeled data

  2. josef-pkt commented on Feb 18, 2022

    @josef-pkt
    Member

    I have it somewhere (?) but haven't found it yet.

    AFAIR:
    In the examples that I used it wasn't very useful because several choices had no predicted class.
    to get predicted classification: I used predicted.argmax(1) the choice with the highest prediction

    model.endog should be the integer labeled choices

  3. josef-pkt commented on Feb 18, 2022

    @josef-pkt
    Member
  4. ucmazsinan commented on Feb 19, 2022

    @ucmazsinan
    Author

    Screenshot_1

    Screenshot_3

    You say meant, argmax my splitting test data set,
    and pred_table show all predicted results

  5. josef-pkt commented on Feb 19, 2022

    @josef-pkt
    Member

    we don't have out of sample measures in the models.

    you can use the code https://www.statsmodels.org/dev/_modules/statsmodels/miscmodels/ordinal_model.html#OrderedResults.pred_table
    and
    replace endog by y_test
    and add x_test to predict

  6. ucmazsinan commented on Feb 22, 2022

    @ucmazsinan
    Author

    thanks sir, for your support.
    if ı want to draw roc-curve ı should use this table either which outputs.
    Screenshot_4

  7. josef-pkt commented on Feb 22, 2022

    @josef-pkt
    Member

    I never looked at multiclass AUC

    We don't have direct support for classification in statsmodels.

    We are estimating predicted probabilities. How do convert those to a decision for classification is up to the user.

    A quick search finds some crossvalidated answers
    https://stats.stackexchange.com/questions/209374/with-multinomial-regression-how-to-predict-an-event-and-get-the-roc-curve
    https://stats.stackexchange.com/questions/2151/how-to-plot-roc-curves-in-multiclass-classification

    The same will apply for ordinal models, except that we have some additional measures on ordered probabilities like probability residuals.

  8. ucmazsinan commented on Apr 3, 2022

    @ucmazsinan
    Author

    Hi Sir,
    Again me ı have a problem about doing classification. giving error messages and ı try the solve using some parameters or different code blocks :
    here
    https://www.statsmodels.org/dev/generated/statsmodels.discrete.discrete_model.Logit.fit.html
    and here
    https://www.statsmodels.org/dev/examples/notebooks/generated/ordinal_regression.html
    but ı cant solve, what ı should ı do , solve the problem.
    issue

  9. josef-pkt commented on Apr 4, 2022

    @josef-pkt
    Member

    How many observations do you have for the different levels, especially in the last 3?

    my only guess is that there are few observations with y == "5.dllm"

    It looks like we are not protecting that the prob becones zero.
    I think we will need to add a lower bound to force a minimal value on the constants that so we have strictly increasing thresholds.

    Can you add more of the earlier lines of the traceback?

    The problem might be already in finding the start_params.
    you could try using fit(start_params= ...) with start_params similar to the coef in summary, except replacing -inf by, for example, -5

  10. ucmazsinan commented on Apr 4, 2022

    @ucmazsinan
    Author

    3.dilim 1152
    2.dilim 590
    1.dilim 365
    4.dilim 210
    5.dilim 50
    Here , you could want to ordinal levels. But ı think if ı remove last levels issue is fixed.

  11. ucmazsinan commented on Apr 4, 2022

    @ucmazsinan
    Author

    so how do ı get rmse , ı have predicted probability. Could I find actual probability.
    rms

  12. ucmazsinan commented on Apr 5, 2022

    @ucmazsinan
    Author

    Screenshot_2
    Can ı use this code for prections isntead of confusion matrix

  13. added this to the 0.15 milestone on Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions