Asymmetric cost loss function false negative cost 0
Defines a custom loss function in TensorFlow/Keras where predicting 1 as 0 (False Negative) has zero cost, while predicting 0 as 1 (False Positive) has a cost of 1.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill asymmetric-cost-loss-function-false-negative-cost-0Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.2 KB, 174 tokens by cl100k_base, as published. Nobody here has run it
Asymmetric Cost Loss Function (False Negative Cost = 0)
Defines a custom loss function in TensorFlow/Keras where predicting 1 as 0 (False Negative) has zero cost, while predicting 0 as 1 (False Positive) has a cost of 1.
Prompt
Define a custom loss function in TensorFlow/Keras. The loss function must implement the logic where the cost of False Negatives (predicting 1 as 0) is 0. The cost of False Positives (predicting 0 as 1) is 1. Ensure type casting to float32 to avoid type mismatch errors.
Triggers
- 自定义一个评估标准,把1预测成0不算错
- 自定义loss函数
- 把1预测成0不算错
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.