Focal Loss : Why are the weights of the hard sample involved in the guide
It is easier to scale up losses from difficult samples and to identify the difference between dynamic weights and those in the general category.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Easier scale with loss of difficult samples
- Identify differences between dynamic weights and ordinary category weights
Suggested first
- Classification and probabilities projections
It's a lot of things like what to do with training
In tasks such as intensive testing, a very large number of easy samples may account for most of the total loss and gradient. Focal Loss The relative contribution of high-confidence correct samples is reduced by using a modem factor to follow current forecast changes before cross entropy. It initially targeted a specific category of imbalance scenario and cannot therefore be described as the default best loss applicable to all long-tailed data.
Comparison of two positive values
omitted category balance factor, taken gamma = 2. The current case is projected to be 0.8 at approximately 0.22344 for common cross-enfants, 0.04 for modems, and Focal for losses of approximately 0.008926; At only 0.2 p.m., cross-alkanes were projected to be approximately 1.609438, with a factor of 0.64, Focal losing approximately 1.030040. In relative terms, it is easy for a positive case to be substantially reduced in weight. The negative case should be subject to a prognosis of the real category, i.e., a positive reduction, which cannot be inserted into the formula without distinction of the same p. gamma = 0.00.00 factor to restore the corresponding cross-enhexium; If the category balance factor is added, it will also change the relative measure of the positive or negative category and will need to be recorded separately.
Not a fixed sample weight
The modem itself relies on model output and therefore guides the gradient when it is sought. The normal cross-alcerium gradient is multiplied by a current factor and the gradient of the factor is stopped, which is not generally the same optimised target. When comparing handwritten realization with library, the chain contribution, the denominator and the label code should be checked.
Difficultness doesn't necessarily mean it's worth it
Low-confidence correct categories may come from effective difficulties, or from mislabelling, collection of abnormal or completely over-covered data. The emphasis on difficult samples sometimes increases noise and cannot claim to be more robust. High loss sample sources, customer segment The quality of the label is associated with the determination of whether the weighting is in line with the task.
Borders for Probability Use
A change in loss may affect the probability measure. Improved classification or sequencing does not represent an output that is suitable for direct calculation of event expectations; Independent probabilities evaluation and calibration are required. If the target is a weighted loss of principal, it should also indicate how the sample weights are combined with the adjusted weights. In practice, this should be compared with the same data agreement for baselines such as reasonable sampling, category weights, threshold adjustments, etc. This paper is only formula numeracy, does not run the detection framework or report any online benefits. The selection of the loss should be driven by the observed problem, rather than by the fact that the name contains the focus, which automatically leads to the correct focus.
Self-measurement and provocator
Gamma = 2, real category probability 0.8, what is the modem?
For (1-0.8) 2 = 0.04, the loss is approximately 0.008926.
Applying the cross entropy gradient directly to that factor is usually the same as the Focal gradient?
Not equal to the fact that factors also depend on output and require the retention of their lead numbers; Stopping its gradient defines another set of updates.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.