StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
375 B
14 lines
375 B
/**
|
|
* Clamp value.
|
|
* Detects proper clamp min/max.
|
|
*
|
|
* @param {number} a Current value to cut off
|
|
* @param {number} min One side limit
|
|
* @param {number} max Other side limit
|
|
*
|
|
* @return {number} Clamped value
|
|
*/
|
|
'use strict';
|
|
module.exports = function(a, min, max){
|
|
return max > min ? Math.max(Math.min(a,max),min) : Math.max(Math.min(a,min),max);
|
|
};
|
|
|