diff --git a/lab/webapp/src/components/Datasets/components/DatasetCard/components/BestResult/index.jsx b/lab/webapp/src/components/Datasets/components/DatasetCard/components/BestResult/index.jsx
index dfe018582..08b052c8c 100644
--- a/lab/webapp/src/components/Datasets/components/DatasetCard/components/BestResult/index.jsx
+++ b/lab/webapp/src/components/Datasets/components/DatasetCard/components/BestResult/index.jsx
@@ -29,6 +29,8 @@ import React from 'react';
import { Segment, Header, Progress } from 'semantic-ui-react';
import { formatAlgorithm } from '../../../../../../utils/formatter';
+
+
function BestResult({ result, hasMetadata }) {
const getNoResultMessage = () => {
if(!hasMetadata) {
@@ -41,6 +43,37 @@ function BestResult({ result, hasMetadata }) {
const getResultLink = () => `/#/results/${result._id}`;
const getPercent = () => (result.score * 100).toFixed(2);
+
+ const getValue = () => (result.score).toFixed(2);
+
+ const renderProgressBar = (result) => {
+ switch(result.prediction_type) {
+ case 'classification':
+ return (
+
+ );
+ case 'regression':
+ return (
+
+ );
+ default:
+ return;
+ }
+ }
+
if(!result) {
return (
@@ -50,13 +83,6 @@ function BestResult({ result, hasMetadata }) {
);
}
- // add label for best results
- var label = "";
- if (result.prediction_type == "classification") {
- label = "Balanced Accuracy";
- } else if (result.prediction_type == "regression") {
- label = "R2";
- }
return (
{`#${result._id}`}
-
+ { renderProgressBar(result) }
);
}
-export default BestResult;
+export default BestResult;
\ No newline at end of file
diff --git a/lab/webapp/src/components/Results/index.jsx b/lab/webapp/src/components/Results/index.jsx
index ef2b7f25e..9608a888b 100644
--- a/lab/webapp/src/components/Results/index.jsx
+++ b/lab/webapp/src/components/Results/index.jsx
@@ -364,7 +364,7 @@ class Results extends Component {
scores={experiment.data.scores}
/>