Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loss Function for German Credit #2

Open
zahidirfan opened this issue Jan 9, 2023 · 0 comments
Open

Loss Function for German Credit #2

zahidirfan opened this issue Jan 9, 2023 · 0 comments

Comments

@zahidirfan
Copy link

zahidirfan commented Jan 9, 2023

I have seen that the german credit data provides the following loss function in the german.doc. Why don't we use that?

This dataset requires use of a cost matrix (see below)
1 2
----------------------------
1 0 1
-----------------------
2 5 0

# (1 = Good,  2 = Bad)

It could be simply implemented by the following function.

def loss_function (predicted, actual):
    if (actual == predicted):
        return 0
    if (actual < predicted):
        return 1
    else:
        return 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant