Skip to content
Back to skills

Asymmetric Cost Loss Function False Negative Cost 0

ASecurity

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.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 30, 2026
data

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add gabrielmoreira/agent-skills-mirror --skill asymmetric-cost-loss-function-false-negative-cost-0 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Asymmetric Cost Loss Function False Negative Cost 0?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Asymmetric Cost Loss Function False Negative Cost 0
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gabrielmoreira-asymmetric-cost-loss-function-false-negative-cost-/badge)](https://www.skillsdirectory.com/skills/gabrielmoreira-asymmetric-cost-loss-function-false-negative-cost-)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "5839394e-59fb-4edf-8d15-b11a4cb09436"
name: "Asymmetric Cost Loss Function (False Negative Cost = 0)"
description: "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."
version: "0.1.0"
tags:
  - "tensorflow"
  - "keras"
  - "loss function"
  - "asymmetric cost"
  - "imbalanced data"
  - "machine learning"
triggers:
  - "自定义一个评估标准,把1预测成0不算错"
  - "自定义loss函数"
  - "把1预测成0不算错"
---

# 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不算错

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.