mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-26 06:14:38 +01:00
Remove NaN for stats to have a result when some values is missing
This commit is contained in:
parent
595b90f798
commit
776134bdcc
@ -129,9 +129,9 @@ draft: false
|
|||||||
}
|
}
|
||||||
row.appendChild(td)
|
row.appendChild(td)
|
||||||
}
|
}
|
||||||
|
const noNanVals=vals.filter((v)=>!Number.isNaN(v))
|
||||||
const avals=vals.map(v=>Math.abs(v))
|
const avals=noNanVals.map(v=>Math.abs(v))
|
||||||
for(const val of [ss.min(vals),ss.max(vals),ss.mean(vals),ss.mean(avals),ss.median(vals),ss.median(avals),ss.rootMeanSquare(vals),ss.variance(vals),ss.standardDeviation(vals)]){
|
for(const val of [ss.min(noNanVals),ss.max(noNanVals),ss.mean(noNanVals),ss.mean(avals),ss.median(noNanVals),ss.median(avals),ss.rootMeanSquare(noNanVals),ss.variance(noNanVals),ss.standardDeviation(noNanVals)]){
|
||||||
var td=document.createElement("td")
|
var td=document.createElement("td")
|
||||||
td.innerText=noNanPrecision(val,3)
|
td.innerText=noNanPrecision(val,3)
|
||||||
row.appendChild(td)
|
row.appendChild(td)
|
||||||
|
Loading…
Reference in New Issue
Block a user