Forráskód Böngészése

Make warning come up for max inertia metric

Kirk Trombley 3 éve
szülő
commit
5802b7d02a
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 1
      nearest.html
  2. 1 1
      nearest.js

+ 1 - 1
nearest.html

@@ -59,7 +59,7 @@
                 </div>
 
                 <div id="cluster-mean-warning" class="container center-justified hide">
-                    Warning: RMS has little meaning when clusters are used
+                    Warning: RMS and inertia have little meaning when clusters are used
                 </div>
 
                 <div class="container control hide">

+ 1 - 1
nearest.js

@@ -498,7 +498,7 @@ const onCustomControlsChanged = skipScore => {
 const checkClusterMeanWarning = () => {
   const warning = getClusterMeanWarning();
   const unhidden = warning.getAttribute("class").replaceAll("hide", "");
-  if (state.clusterChoice !== 0 && state.metric === 0) {
+  if (state.clusterChoice !== 0 && (state.metric === 0 || state.metric === 4)) {
     warning.setAttribute("class", unhidden);
   } else {
     warning.setAttribute("class", unhidden + " hide");