The only time in which positive_example_penalty appears in the codebase is in:
| # ensure shallow model has +1 -1 target. |
| ifparams['model']['shallow'] orparams['target'] =='hinge': |
| params['data']['target'] =HingeTarget |
| elifparams['target'] =='maxhinge': |
| MaxHingeTarget.fac=params['data']['positive_example_penalty'] |
| params['data']['target'] =MaxHingeTarget |
| elifparams['target'] =='binary': |
| params['data']['target'] =BinaryTarget |
| elifparams['target'] =='ttd': |
| params['data']['target'] =TTDTarget |
| elifparams['target'] =='ttdinv': |
| params['data']['target'] =TTDInvTarget |
| elifparams['target'] =='ttdlinear': |
| params['data']['target'] =TTDLinearTarget |
| else: |
| g.print_unique('Unkown type of target. Exiting') |
| exit(1) |
which is loaded only for an unused method in the
MaxHingeTarget class, noted here:
| defloss_np(y_true, y_pred): |
Need to extend it to the other target functions, remove it as a parameter, or document this more thoroughly.
Not as important for DIII-D datasets as it is for our JET datasets (for which the non-/disruptive classes are more imbalanced).
The only time in which
positive_example_penaltyappears in the codebase is in:plasma-python/plasma/conf_parser.py
Lines 86 to 102 in c82ba61
which is loaded only for an unused method in the
MaxHingeTargetclass, noted here:plasma-python/plasma/models/targets.py
Line 153 in 7986f46
Need to extend it to the other target functions, remove it as a parameter, or document this more thoroughly.
Not as important for DIII-D datasets as it is for our JET datasets (for which the non-/disruptive classes are more imbalanced).
conf['training']['ranking_difficulty_fac']: 1.0 # how much to upweight incorrectly classified shots during trainingappears to perform a very related role, but instead withinloader.py,mpi_runner.py, andperformance.py.