The F-beta score combines a classifier’s precision and recall, with the beta value controlling which one matters more. Choose β = 1 for F1, β > 1 to emphasize recall, or 0 < β < 1 to emphasize precision. Unlike accuracy, F-beta does not count true negatives directly, and its value depends on the classification threshold.
What F-beta measures
F-beta is a single summary of how well a classifier finds positive cases while avoiding false alarms. It is a weighted harmonic mean of precision and recall, so a poor result on either measure pulls the score down.
Precision answers, “Of the cases predicted positive, how many were actually positive?” Recall answers, “Of all actual positive cases, how many did the model find?” This trade-off is useful when the two kinds of mistakes do not have equal consequences. The metric is used in classification and information retrieval; its historical development is more involved than the shorthand often suggests (ACM review of the F-measure).
Precision, recall, and the formula
For a binary classifier, count the outcomes for the class of interest:
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- True positive (TP): a positive case correctly predicted as positive.
- False positive (FP): a negative case incorrectly predicted as positive.
- False negative (FN): a positive case incorrectly predicted as negative.
Precision = TP / (TP + FP); recall = TP / (TP + FN). The F-beta formula in terms of precision (P) and recall (R) is:
Fβ = (1 + β²) × (P × R) / (β² × P + R)
Using confusion-matrix counts, the equivalent formula is:
Fβ = ((1 + β²) × TP) / (((1 + β²) × TP) + FP + β² × FN)
These definitions and formulas are documented in scikit-learn’s model evaluation guide and its fbeta_score API reference.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →The harmonic mean is deliberately sensitive to the weaker of precision and recall. For example, precision of 0.99 and recall of 0.01 produce an F1 score of about 0.0198, not the arithmetic mean of 0.50. That keeps one excellent measure from disguising the other’s failure (discussion of the F-measure and harmonic mean).
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
What beta values mean
Beta expresses a preference for recall relative to precision; it is not a percentage split. Because the formula uses β², β = 2 means β² = 4, and the count-based denominator gives each false negative four times the coefficient of a false positive. This is a property of the metric’s formula, not a claim that recall is universally “four times as important” in every decision context.
| Score | What it emphasizes | Possible fit |
|---|---|---|
| F0.5 | Precision over recall | Cases where false alarms or manual review are costly |
| F1 | Precision and recall in balance | A conventional baseline when there is no clear reason to favor either |
| F2 | Recall over precision | Screening or triage where missing positives is especially costly |
| F0.25 or F5 | Strong preference for precision or recall, respectively | Special cases where one error type is much less acceptable |
These are starting points, not universal prescriptions. F-beta ranges from 0 to 1; 1 requires both precision and recall to be 1. A value of 0 indicates no true-positive performance under the metric’s calculation. It is a score, not a probability or percentage of predictions that are correct (scikit-learn API reference).
Worked example: compare F0.5, F1, and F2
Suppose a classifier produces 40 true positives, 10 false positives, and 20 false negatives. Its precision is 40 / (40 + 10) = 0.80; its recall is 40 / (40 + 20) ≈ 0.667.
Recommended Free Tools
| Metric | Calculation | Approximate score |
|---|---|---|
| F0.5 | 1.25 × 0.80 × 0.667 / (0.25 × 0.80 + 0.667) | 0.769 |
| F1 | 2 × 0.80 × 0.667 / (0.80 + 0.667) | 0.727 |
| F2 | 5 × 0.80 × 0.667 / (4 × 0.80 + 0.667) | 0.690 |
F0.5 is higher because precision is stronger than recall and that score favors precision. F2 gives more weight to recall, the weaker result, so it is lower. Changing beta changes how these same predictions are evaluated; it does not change the classifier’s predictions.
F-beta versus F1
F1 is the special case of F-beta where β = 1. The formula simplifies to F1 = 2 × P × R / (P + R), giving precision and recall balanced treatment in the count-based formula. “F-beta” names the family; “F1” names one member. “F-score” and “F-measure” may refer to F1 or the broader family, so check how a particular report defines the term.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Choose beta based on the cost of mistakes
Start with the consequences of false positives and false negatives, rather than choosing a beta because it is conventional:
- Favor precision (beta below 1) when a positive prediction triggers expensive investigation, intervention, or user disruption, or when irrelevant results are particularly harmful.
- Use F1 (beta = 1) when precision and recall have roughly comparable value or as a baseline without a defensible preference.
- Favor recall (beta above 1) when missed positives create greater medical, financial, safety, or compliance risk and reviewing extra positive predictions is acceptable.
For a fraud screen, for example, missing a fraudulent transaction and investigating a legitimate one may have very different costs. The appropriate beta depends on those costs and the system’s role; F2 is not automatically the right choice for every screening task.
When the consequences can be estimated, also evaluate an explicit cost or utility function that accounts for false positives, false negatives, true positives, and true negatives. F-beta compresses a trade-off into one number; it is not a complete economic, clinical, or safety model.
Threshold choice changes the score
Most classifiers turn a probability or decision score into a label using a threshold. Moving that threshold usually changes the number of predicted positives, and therefore precision, recall, and F-beta. The precision-recall curve shows how precision and recall vary as the threshold changes (scikit-learn model evaluation guide).
- Generate probabilities or decision scores for a validation set.
- Calculate precision, recall, and the chosen F-beta value at candidate thresholds.
- Select a threshold based on validation data or cross-validation, taking error costs into account.
- Evaluate the selected threshold once on held-out test data and report it alongside the score.
Do not select a threshold by maximizing F-beta on the test set: using test outcomes to make that choice leaks information into the evaluation and makes the reported performance optimistic. If the threshold is not yet decided, a single F-beta value conceals most of the available trade-off.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
F-beta for multiclass and multilabel tasks
For multiple classes, scikit-learn computes class-level results and can aggregate them in different ways. In multilabel problems, the available aggregation choices also include averaging per sample. Consequently, a multiclass or multilabel report should name the averaging method; “F2 = 0.8” by itself leaves out important information.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitches| Average | How to interpret it |
|---|---|
| binary | Score the designated positive class; this is the usual binary-classification choice. |
| macro | Calculate a score for each class, then take their unweighted mean. Each class counts equally. |
| weighted | Calculate a score per class and weight by class support, so more frequent classes count more. |
| micro | Aggregate counts across classes first, then calculate the score. |
| samples | In multilabel settings, calculate a score for each sample and average across samples. |
| None | Return a score for each class without aggregation. |
A large gap between weighted and macro scores can signal weak performance on less frequent classes. If those classes matter, inspect their individual results rather than relying on the weighted average. See scikit-learn’s per-class precision, recall, and F-score API.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Calculate F-beta in Python with scikit-learn
The fbeta_score function evaluates predicted labels. For a binary example, specify the positive-class convention and beta:
from sklearn.metrics import fbeta_score
y_true = [0, 1, 1, 0, 1, 0]
y_pred = [0, 1, 0, 0, 1, 1]
score = fbeta_score(
y_true,
y_pred,
beta=2,
average="binary"
)
print(score)
For multiclass data, choose an aggregation method explicitly. Macro gives every class equal influence; weighted reflects each class’s support.
from sklearn.metrics import fbeta_score
macro_f2 = fbeta_score(y_true, y_pred, beta=2, average="macro")
weighted_f05 = fbeta_score(y_true, y_pred, beta=0.5, average="weighted")
If the model provides probabilities, convert them to labels at the threshold you intend to evaluate. This example uses 0.30 only to illustrate the conversion; choose a threshold using validation data.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
y_prob = model.predict_proba(X_valid)[:, 1]
y_pred = (y_prob >= 0.30).astype(int)
score = fbeta_score(
y_valid,
y_pred,
beta=2,
average="binary"
)
The API also supports class selection, sample weights, and a zero_division setting; with an averaging method it returns a scalar, while average=None returns per-class scores. Consult the scikit-learn fbeta_score reference for the installed version’s parameter behavior.
Undefined cases and zero division
Precision is undefined when there are no predicted positives (TP + FP = 0); recall is undefined when there are no actual positives (TP + FN = 0). Libraries need a convention for these cases. In scikit-learn, zero_division controls the handling, and behavior can depend on the condition and library version.
- Inspect warnings rather than silently ignoring them.
- Report the convention used if undefined values are possible.
- Distinguish a dataset with no positive examples from a model that predicts no positives.
- Use the same convention when comparing models.
In particular, an all-negative classifier can have high accuracy when positives are rare yet achieve zero F-beta for the positive class when that class has actual positives and the model finds none. Accuracy alone does not reveal that failure.
What F-beta leaves out
The standard formula uses TP, FP, and FN; true negatives do not enter directly. That means a large number of correctly classified negatives cannot inflate F-beta by itself, which can make it informative when positives are rare. But it also means the score does not describe negative-class performance. Check the confusion matrix, specificity, negative predictive value, or balanced accuracy if that behavior matters (discussion of F-measure evaluation context).
Nor does a high F-beta score establish that probabilities are calibrated, that performance will generalize to a new population, that rankings are strong across thresholds, or that performance is consistent across demographic or operational groups. Small test sets can also make apparent differences unstable.
For a useful report, pair the score with precision, recall, confusion matrix, positive-class prevalence, selected threshold, and the test or cross-validation method. Add per-class and subgroup results where relevant, calibration measures when probability quality matters, and uncertainty estimates when sample size makes comparisons fragile. F-beta should not be read as proof that a system is fair, safe, or ready for deployment.
When another metric is more useful
- Precision-recall curve or average precision: use these when comparing behavior across thresholds or before settling on a deployment threshold; one F-beta score shows only a selected operating point.
- ROC AUC: use it to assess ranking across thresholds when that is the question. It answers a different question from F-beta, and a dominant negative class can make ROC-based summaries less revealing of positive-class precision.
- Balanced accuracy: consider it when sensitivity and specificity should both contribute, including when true-negative behavior matters.
- Matthews correlation coefficient: consider it as a single-number summary that uses all four confusion-matrix cells.
- Jaccard score: use it when set overlap is a natural interpretation, such as segmentation or multilabel tasks; J = TP / (TP + FP + FN).
- Cost or utility metric: use explicit costs where they are known and materially determine the decision.
No metric is best independently of the task. Report the one that matches the decision, along with enough context to show what it omits.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →

