nl_tokens: / * ThresholdClassifier - classifier that converts multi - class classifier to multi - label classifier by finding the best appropriate threshold .
pl_tokens: function ( opts ) { opts = opts || { } ; if ( ! ( 'multiclassClassifierType' in opts ) ) { console . dir ( opts ) ; throw new Error ( "opts must contain multiclassClassifierType" ) ; } if ( ! opts . multiclassClassifierType ) { console . dir ( opts ) ; throw new Error ( "opts.multiclassClassifierType is null" ) ; } if ( ! ( 'evaluateMeasureToMaximize' in opts ) ) { console . dir ( opts ) ; throw new Error ( "opts must contain evaluateMeasureToMaximize" ) ; } if ( ! opts . evaluateMeasureToMaximize ) { console . dir ( opts ) ; throw new <mask> ( "opts.evaluateMeasureToMaximize is null" ) ; } if ( ! opts . numOfFoldsForThresholdCalculation ) { console . dir ( opts ) ; throw new Error ( "opts.numOfFoldsForThresholdCalculation is null" ) ; } this . multiclassClassifier = new opts . multiclassClassifierType ( ) ; // [F1, Accuracy]	 this . evaluateMeasureToMaximize = opts . evaluateMeasureToMaximize ; // constant size of validation set this . devsetsize = 0.1 // > 1, n - fold cross - validation, otherwise validation set this . numOfFoldsForThresholdCalculation = opts . numOfFoldsForThresholdCalculation }