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

Added SparseCategoricalCrossEntropy Loss Function #36

Conversation

quadri-haider-ali
Copy link

@quadri-haider-ali quadri-haider-ali commented Oct 4, 2020

Added Sparse Categorical Cross Entropy Loss Function
Fixes #9

This pull request adds SparseCategoricalCrossEntropy Loss function in MLlib/loss_func.py

@staticmethod
def loss(X, Y, W):
M=X.shape[0]
H=sigmoid(np.dot(X,W).T)*(len(Y)-1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use softmax and use input one hot encoder and also use assert to check if the given y is one hot encoder.

@TarunTomar122
Copy link
Member

Closed due to Inactivity!

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

Successfully merging this pull request may close these issues.

Add more loss functions like cross-entropy...
3 participants