}
trigger={
diff --git a/lab/webapp/src/components/ChatGPT/SideMenu.js b/lab/webapp/src/components/ChatGPT/SideMenu.js
index 407cf6525..2c071fedb 100644
--- a/lab/webapp/src/components/ChatGPT/SideMenu.js
+++ b/lab/webapp/src/components/ChatGPT/SideMenu.js
@@ -4,6 +4,8 @@ import { ThemeContext } from "./context/ThemeContext";
import { AllContext } from "./context/AllContext";
+import { Icon } from "semantic-ui-react";
+
export default function SideMenu() {
const {
currentModel,
@@ -237,6 +239,7 @@ export default function SideMenu() {
.slice(3)
.forEach((node) => {
node.childNodes[1].style.display = "none";
+ //
node.childNodes[1].innerHTML = "🗑️";
});
}
diff --git a/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx b/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx
index dcc322fcd..3b5c84271 100644
--- a/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx
+++ b/lab/webapp/src/components/Datasets/components/DatasetCard/index.jsx
@@ -34,6 +34,7 @@ import * as actions from "data/datasets/dataset/actions";
import DatasetActions from "./components/DatasetActions";
import BestResult from "./components/BestResult";
import ExperimentStatus from "./components/ExperimentStatus";
+
import {
Grid,
Segment,
@@ -41,6 +42,7 @@ import {
Button,
Popup,
Message,
+ Icon,
} from "semantic-ui-react";
import { formatDataset, formatDatasetOuter } from "../../../../utils/formatter";
@@ -55,13 +57,6 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => {
icon_type = "line graph";
}
- // const [showGrid, setShowGrid] = useState(false);
-
- // const handleGridClick = () => {
- // console.log("handleGridClick");
- // setShowGrid(false);
- // };
-
function clickDatasetCardDelButton(e) {
let parent = e.target.closest(".dataset-card");
// console.log(parent);
@@ -278,11 +273,12 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => {
- 🗑
+ {/* use trash icon from sementic ui */}
+
@@ -435,11 +431,11 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => {
- 🗑
+ {
);
}
-
- // return (
- //
-
- //
- //
- // }
- // />
- //
- //
- //
- //
-
- //
- //
- //
-
- //
- // );
};
export { DatasetCard };
export default connect(null, actions)(DatasetCard);
-// get aiTooglePopup id
-// if aiTooglePopup is not null, then hide it
-// wait until document.getElementById("aiTooglePopup") loaded
-
setTimeout(function () {
if (document.getElementById("aiTooglePopup") != null) {
console.log("aiTooglePopup is not null");
@@ -538,11 +481,5 @@ setTimeout(function () {
// length of aiTooglePopups
var len = aiTooglePopups.length;
console.log(len);
-
- // if (aiTooglePopups != null) {
- // for (var i = 1; i < aiTooglePopups.length; i++) {
- // aiTooglePopups[i].style.cssText += ';display:none !important;';
- // }
- // }
}
}, 100);
From 59dd2fe428b77d4492bb4a75e09cea1ef869ee2e Mon Sep 17 00:00:00 2001
From: choi
Date: Tue, 28 Nov 2023 11:03:42 -0800
Subject: [PATCH 2/6] replace Aliro with AliroEd. Update footer text "Developed
by the Center for AI Research and Education (CAIRE) in the Department of
Computational Biomedicine at Cedars-Sinai Medical Center in Los Angeles,
California, USA."
---
raspberrypi/intropage/index.html | 22 ++-----------------
raspberrypi/intropage/infAndDownloadpage.html | 8 +++++--
raspberrypi/intropage/int_ml_01.html | 4 +++-
raspberrypi/intropage/int_ml_02.html | 5 +++--
.../intropage/int_ml_03_decision_tree.html | 4 +++-
5 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/raspberrypi/intropage/index.html b/raspberrypi/intropage/index.html
index 7bccc0da7..2955bd33b 100644
--- a/raspberrypi/intropage/index.html
+++ b/raspberrypi/intropage/index.html
@@ -251,14 +251,14 @@
-
Are you ready to run Aliro?
+
Are you ready to run AliroEd?
When Raspberry Pi is ready to run AliroEd, the below button shows
- "Alio is ready to run". Please click the button to run Aliro On
+ "Alio is ready to run". Please click the button to run AliroEd On
Raspberry Pi 4
Developed by AI Research Center at the Computational Biomedicine Department, Cedars-Sinai Medical Center, Los Angeles, CA, USA.
+
Developed by the Center for AI Research and Education (CAIRE) in the
+ Department of Computational Biomedicine at Cedars-Sinai Medical Center
+ in Los Angeles, California, USA.
- Developed by AI Research Center at the Computational Biomedicine
- Department, Cedars-Sinai Medical Center, Los Angeles, CA, USA.
+ Developed by the Center for AI Research and Education (CAIRE) in the
+ Department of Computational Biomedicine at Cedars-Sinai Medical Center
+ in Los Angeles, California, USA.
Developed by AI Research Center at the Computational Biomedicine Department, Cedars-Sinai Medical Center, Los Angeles, CA, USA.
+
Developed by the Center for AI Research and Education (CAIRE) in the
+ Department of Computational Biomedicine at Cedars-Sinai Medical Center
+ in Los Angeles, California, USA.
Welcome to the AliroEd. AliroEd is for users who are not familiar with machine learning. Users can experience machine learning tasks on Raspberry Pi 4 with AliroEd. If internet is available, Users can download the raspberry pi image from the AliroEd website.
Users can easily install and run AliroEd on Raspberry Pi 4 using this image. AliroEd and the Raspberry Pi image provided in this website, are developed by the Center for AI Research and Education (CAIRE) in the
Department of Computational Biomedicine at Cedars-Sinai Medical Center
in Los Angeles, California, USA.
diff --git a/raspberrypi/intropage/int_ml_02.html b/raspberrypi/intropage/int_ml_02.html
index f9e630326..435549dde 100644
--- a/raspberrypi/intropage/int_ml_02.html
+++ b/raspberrypi/intropage/int_ml_02.html
@@ -209,10 +209,7 @@
>
has the highest average of sepal-length.
-
- Please click the Y axis. It will show an example to put
- boundaries
-
+
Please click the Y axis. It will show an example to put
boundaries to distinguish classes of iris flowers. Then please
From 8f63ff5d6a1d25e8dd7fc830966bbb92d2f19c48 Mon Sep 17 00:00:00 2001
From: choi
Date: Fri, 8 Mar 2024 20:00:56 -0800
Subject: [PATCH 4/6] Temporary fix to handle NaN values
---
.../src/components/Results/index-twoside.jsx | 416 ++---
lab/webapp/src/components/Results/index.jsx | 2 +-
.../ResultsV2/components/Score/index.jsx | 2 +
lab/webapp/src/components/ResultsV2/index.jsx | 1645 +++++++++--------
machine/learn/skl_utils.py | 138 +-
5 files changed, 1172 insertions(+), 1031 deletions(-)
diff --git a/lab/webapp/src/components/Results/index-twoside.jsx b/lab/webapp/src/components/Results/index-twoside.jsx
index 6c31c04be..99ab33729 100644
--- a/lab/webapp/src/components/Results/index-twoside.jsx
+++ b/lab/webapp/src/components/Results/index-twoside.jsx
@@ -28,34 +28,34 @@ along with this program. If not, see .
(Autogenerated header, do not modify)
*/
-import React, { Component } from 'react';
-import { connect } from 'react-redux';
-import * as actions from 'data/experiments/selected/actions';
-import SceneHeader from '../SceneHeader';
-import FetchError from '../FetchError';
-import AlgorithmDetails from './components/AlgorithmDetails';
-import RunDetails from './components/RunDetails'
-import MSEMAEDetails from './components/MSEMAEDetails';;
-import ConfusionMatrix from './components/ConfusionMatrix';
-import ConfusionMatrixJSON from './components/ConfusionMatrixJSON';
-import ROCCurve from './components/ROCCurve';
-import ShapSummaryCurve from './components/ShapSummaryCurve';
-import ImportanceScore from './components/ImportanceScore';
-import ImportanceScoreJSON from './components/ImportanceScoreJSON';
-import LearningCurve from './components/LearningCurve';
-import LearningCurveJSON from './components/LearningCurveJSON';
-import TestChart from './components/TestChart';
-import PCA from './components/PCA';
-import PCAJSON from './components/PCAJSON';
-import TSNE from './components/TSNE';
-import TSNEJSON from './components/TSNEJSON';
-import RegFigure from './components/RegFigure';
-import Score from './components/Score';
-import NoScore from './components/NoScore';
-import { Header, Grid, Loader, Dropdown, Menu} from 'semantic-ui-react';
-import { formatDataset } from 'utils/formatter';
-import ClassRate from './components/ClassRate';
-import ChatGPT from '../ChatGPT';
+import React, { Component } from "react";
+import { connect } from "react-redux";
+import * as actions from "data/experiments/selected/actions";
+import SceneHeader from "../SceneHeader";
+import FetchError from "../FetchError";
+import AlgorithmDetails from "./components/AlgorithmDetails";
+import RunDetails from "./components/RunDetails";
+import MSEMAEDetails from "./components/MSEMAEDetails";
+import ConfusionMatrix from "./components/ConfusionMatrix";
+import ConfusionMatrixJSON from "./components/ConfusionMatrixJSON";
+import ROCCurve from "./components/ROCCurve";
+import ShapSummaryCurve from "./components/ShapSummaryCurve";
+import ImportanceScore from "./components/ImportanceScore";
+import ImportanceScoreJSON from "./components/ImportanceScoreJSON";
+import LearningCurve from "./components/LearningCurve";
+import LearningCurveJSON from "./components/LearningCurveJSON";
+import TestChart from "./components/TestChart";
+import PCA from "./components/PCA";
+import PCAJSON from "./components/PCAJSON";
+import TSNE from "./components/TSNE";
+import TSNEJSON from "./components/TSNEJSON";
+import RegFigure from "./components/RegFigure";
+import Score from "./components/Score";
+import NoScore from "./components/NoScore";
+import { Header, Grid, Loader, Dropdown, Menu } from "semantic-ui-react";
+import { formatDataset } from "utils/formatter";
+import ClassRate from "./components/ClassRate";
+import ChatGPT from "../ChatGPT";
class Results extends Component {
constructor(props) {
@@ -72,11 +72,11 @@ class Results extends Component {
}
/**
- * Basic helped method to create array containing [key,val] entries where
- * key - name of given score
- * value - actual score
- * passed to Score component which uses javascript library C3 to create graphic
- */
+ * Basic helped method to create array containing [key,val] entries where
+ * key - name of given score
+ * value - actual score
+ * passed to Score component which uses javascript library C3 to create graphic
+ */
// async getData(filename){
// const res = await fetch(filename);
@@ -90,22 +90,23 @@ class Results extends Component {
let expScores = experiment.data.scores;
// console.log("experiment.data")
- console.log("experiment.data",experiment.data)
+ console.log("experiment-777.data", experiment.data);
// console.log(experiment.data['class_1'][0])
// console.log(experiment.data['class_-1'][0])
- if(typeof(expScores) === 'object'){
- keyList.forEach(scoreKey => {
- if(expScores[scoreKey] && typeof expScores[scoreKey].toFixed === 'function'){
+ if (typeof expScores === "object") {
+ keyList.forEach((scoreKey) => {
+ if (
+ expScores[scoreKey] &&
+ typeof expScores[scoreKey].toFixed === "function"
+ ) {
let tempLabel;
- scoreKey.includes('train')
- ? tempLabel = 'Train (' + expScores[scoreKey].toFixed(2) + ')'
- : tempLabel = 'Test (' + expScores[scoreKey].toFixed(2) + ')';
- testList.push(
- [tempLabel, expScores[scoreKey]]
- );
+ scoreKey.includes("train")
+ ? (tempLabel = "Train (" + expScores[scoreKey].toFixed(2) + ")")
+ : (tempLabel = "Test (" + expScores[scoreKey].toFixed(2) + ")");
+ testList.push([tempLabel, expScores[scoreKey]]);
}
- });
+ });
}
return testList;
@@ -114,19 +115,15 @@ class Results extends Component {
render() {
const { experiment, fetchExperiment } = this.props;
- if(experiment.isFetching || !experiment.data) {
+ if (experiment.isFetching || !experiment.data) {
return (
);
}
- if(experiment.error === 'Failed to fetch') {
- return (
-
- );
- } else if(experiment.error) {
+ if (experiment.error === "Failed to fetch") {
+ return ;
+ } else if (experiment.error) {
return (
{
fetch(`/api/v1/experiments/${id}/model`)
- .then(response => {
- if(response.status >= 400) {
+ .then((response) => {
+ if (response.status >= 400) {
throw new Error(`${response.status}: ${response.statusText}`);
}
return response.json();
})
- .then(json => {
+ .then((json) => {
window.location = `/api/v1/files/${json._id}`;
});
};
const downloadScript = (id) => {
fetch(`/api/v1/experiments/${id}/script`)
- .then(response => {
- if(response.status >= 400) {
+ .then((response) => {
+ if (response.status >= 400) {
throw new Error(`${response.status}: ${response.statusText}`);
}
return response.json();
})
- .then(json => {
+ .then((json) => {
window.location = `/api/v1/files/${json._id}`;
});
};
// console.log(experiment.data.prediction_type)
// --- get lists of scores ---
- if(experiment.data.prediction_type == "classification") { // classification
+ if (experiment.data.prediction_type == "classification") {
+ // classification
- console.log("experiment.data", experiment.data)
+ console.log("experiment.data", experiment.data);
// console.log("X_pca", experiment.data.X_pca)
// console.log("y_pca", experiment.data.y_pca)
- let confusionMatrix, rocCurve, importanceScore, learningCurve, pca, pca_json, tsne, tsne_json, shap_explainer, shap_num_samples;
-
+ let confusionMatrix,
+ rocCurve,
+ importanceScore,
+ learningCurve,
+ pca,
+ pca_json,
+ tsne,
+ tsne_json,
+ shap_explainer,
+ shap_num_samples;
+
let shapSummaryCurveDict = {};
-
- experiment.data.experiment_files.forEach(file => {
+ experiment.data.experiment_files.forEach((file) => {
const filename = file.filename;
- console.log('filename',filename);
- if(filename.includes('confusion_matrix')) {
+ console.log("filename", filename);
+ if (filename.includes("confusion_matrix")) {
confusionMatrix = file;
- } else if(filename.includes('roc_curve')) {
+ } else if (filename.includes("roc_curve")) {
rocCurve = file;
- } else if(filename.includes('imp_score')) {
+ } else if (filename.includes("imp_score")) {
importanceScore = file;
- } else if(filename.includes('learning_curve')) {
+ } else if (filename.includes("learning_curve")) {
learningCurve = file;
-
-
- } else if(filename.includes('pca') && filename.includes('png')) {
+ } else if (filename.includes("pca") && filename.includes("png")) {
pca = file;
- console.log("pca", pca)
- } else if (filename.includes('pca-json')) {
- console.log("pca_json")
+ console.log("pca", pca);
+ } else if (filename.includes("pca-json")) {
+ console.log("pca_json");
pca_json = file;
- console.log("pca_json: ", pca_json)
- }
-
- else if(filename.includes('tsne') && filename.includes('png')) {
+ console.log("pca_json: ", pca_json);
+ } else if (filename.includes("tsne") && filename.includes("png")) {
tsne = file;
- console.log("tsne", tsne)
-
- }
- else if (filename.includes('tsne-json')) {
- console.log("tsne_json")
+ console.log("tsne", tsne);
+ } else if (filename.includes("tsne-json")) {
+ console.log("tsne_json");
tsne_json = file;
- console.log("tsne_json: ", tsne_json)
- }
-
- else if(filename.includes('shap_summary_curve')) {
- console.log("shap_summary_curve")
- let class_name = filename.split('_').slice(-2,-1);
+ console.log("tsne_json: ", tsne_json);
+ } else if (filename.includes("shap_summary_curve")) {
+ console.log("shap_summary_curve");
+ let class_name = filename.split("_").slice(-2, -1);
shapSummaryCurveDict[class_name] = file;
- shap_explainer=experiment.data.shap_explainer;
- shap_num_samples=experiment.data.shap_num_samples;
- }
- else if (filename.includes('shap_summary_json')) {
- console.log("shap_summary_json")
+ shap_explainer = experiment.data.shap_explainer;
+ shap_num_samples = experiment.data.shap_num_samples;
+ } else if (filename.includes("shap_summary_json")) {
+ console.log("shap_summary_json");
// shap_json = file;
// console.log("shap_json: ", shap_json)
}
-
});
// balanced accuracy
- let balancedAccKeys = ['train_balanced_accuracy_score', 'balanced_accuracy_score'];
+ let balancedAccKeys = [
+ "train_balanced_accuracy_score",
+ "balanced_accuracy_score",
+ ];
// precision scores
- let precisionKeys = ['train_precision_score', 'precision_score']
+ let precisionKeys = ["train_precision_score", "precision_score"];
// AUC
- let aucKeys = ['train_roc_auc_score', 'roc_auc_score'];
+ let aucKeys = ["train_roc_auc_score", "roc_auc_score"];
// f1 score
- let f1Keys = ['train_f1_score', 'f1_score'];
+ let f1Keys = ["train_f1_score", "f1_score"];
// recall
- let recallKeys = ['train_recall_score', 'recall_score'];
+ let recallKeys = ["train_recall_score", "recall_score"];
let balancedAccList = this.getGaugeArray(balancedAccKeys);
let precisionList = this.getGaugeArray(precisionKeys);
@@ -240,67 +239,62 @@ class Results extends Component {
let class_percentage = [];
// let pca_data = [];
-
-
-
- experiment.data.class_names.forEach(eachclass => {
-
- console.log('eachclass.toString()', eachclass.toString())
+ experiment.data.class_names.forEach((eachclass) => {
+ console.log("eachclass.toString()", eachclass.toString());
// if type of experiment.data['class_' + eachclass.toString()] === 'object'
- if ((typeof experiment.data['class_' + eachclass.toString()]) === 'object')
- {
- class_percentage.push(
- [eachclass.toString(), experiment.data['class_' + eachclass.toString()][0]]
- );
- console.log("experiment.data['class_1']", experiment.data['class_1'])
+ if (
+ typeof experiment.data["class_" + eachclass.toString()] === "object"
+ ) {
+ class_percentage.push([
+ eachclass.toString(),
+ experiment.data["class_" + eachclass.toString()][0],
+ ]);
+ console.log("experiment.data['class_1']", experiment.data["class_1"]);
+ } else {
+ class_percentage.push([
+ eachclass.toString(),
+ experiment.data["class_" + eachclass.toString()],
+ ]);
+ console.log("experiment.data['class_1']", experiment.data["class_1"]);
}
- else
- {
- class_percentage.push(
- [eachclass.toString(), experiment.data['class_' + eachclass.toString()]]
- );
- console.log("experiment.data['class_1']", experiment.data['class_1'])
- }
-
-
-
});
-
-
-
return (
-
-
-
-
-
@@ -332,7 +324,8 @@ class Results extends Component {
type="classification"
/>
{/* */}
-
-
-
-
-
{/* */}
-
{/* */}
{/* This TestChart is for interactive and responsive confusion matrix */}
-
-
+
{/* https://en.wikipedia.org/wiki/Confusion_matrix */}
-
-
+
{/* GPT Space */}
-
+
-
@@ -454,74 +445,75 @@ class Results extends Component {
*/}
-
{/* GPT Space */}
-
-
-
-
+
-
-
-
);
- } else if(experiment.data.prediction_type == "regression") { // regression
+ } else if (experiment.data.prediction_type == "regression") {
+ // regression
let importanceScore, reg_cv_pred, reg_cv_resi, reg_cv_qq;
- experiment.data.experiment_files.forEach(file => {
+ experiment.data.experiment_files.forEach((file) => {
const filename = file.filename;
- if(filename.includes('imp_score')) {
+ if (filename.includes("imp_score")) {
importanceScore = file;
- } else if(filename.includes('reg_cv_pred')) {
+ } else if (filename.includes("reg_cv_pred")) {
reg_cv_pred = file;
- } else if(filename.includes('reg_cv_resi')) {
+ } else if (filename.includes("reg_cv_resi")) {
reg_cv_resi = file;
- } else if(filename.includes('reg_cv_qq')) {
+ } else if (filename.includes("reg_cv_qq")) {
reg_cv_qq = file;
}
-
});
// r2
- let R2Keys = ['train_r2_score', 'r2_score'];
+ let R2Keys = ["train_r2_score", "r2_score"];
// r
- let RKeys = ['train_pearsonr_score', 'pearsonr_score'];
+ let RKeys = ["train_pearsonr_score", "pearsonr_score"];
// r2
- let VAFKeys = ['train_explained_variance_score', 'explained_variance_score'];
+ let VAFKeys = [
+ "train_explained_variance_score",
+ "explained_variance_score",
+ ];
let R2List = this.getGaugeArray(R2Keys);
let RList = this.getGaugeArray(RKeys);
let VAFList = this.getGaugeArray(VAFKeys);
-
return (