Skip to content

Commit ab55ee7

Browse files
authored
Merge pull request #2458 from entrylabs/develop
운영반영
2 parents 8f464d8 + db4ad0b commit ab55ee7

File tree

11 files changed

+310
-88
lines changed

11 files changed

+310
-88
lines changed

src/class/learning/Regression.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,20 @@ class Regression extends LearningBase {
8484
this.model = model;
8585
const { acc = [] } = trainHistory?.history || {};
8686
const accuracy = _max(acc) || 0;
87+
const graphPoints = (graphData.originalPoints || []).slice(0, 1000);
8788
if (inputs.length == 1) {
88-
graphData.predictedPoints.map(({ x, y }) => {
89-
const index = graphData.originalPoints.findIndex(
90-
(p) => _floor(p.x, 1) === _floor(x, 1)
91-
);
92-
if (graphData.originalPoints[index]) {
93-
graphData.originalPoints[index].equation = y;
89+
graphData.predictedPoints.map(({ x, y }, i) => {
90+
let index = graphPoints.sort((a, b) => a.x - b.x).findIndex((p) => p.x >= x);
91+
if (index < 0 && i > 0) {
92+
index = graphPoints.length - 1;
93+
}
94+
if (graphPoints[index]) {
95+
graphPoints[index].equation = y;
9496
}
9597
});
9698
}
9799
this.result = {
98-
graphData: (graphData.originalPoints || []).slice(0, 1000),
100+
graphData: graphPoints,
99101
accuracy,
100102
normResult,
101103
rsquared,

src/css/components/scene.less

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,23 @@ body {
3131
flex-direction: row-reverse;
3232
align-items: center;
3333

34+
.practical_course_mode & {
35+
background-color: @basePurple;
36+
}
37+
3438
.blockCountView {
3539
height: 24px;
3640
line-height: 24px;
3741
border-radius: 14px;
3842
margin-right: 12px;
3943
padding: 0 8px;
40-
background-color: #3064ec;
44+
background-color: @baseBluePoint;
4145
font-size: 12px;
4246
color: #ffffff;
47+
48+
.practical_course_mode & {
49+
background-color: @basePurplePoint;
50+
}
4351
}
4452
}
4553
}

src/css/static.less

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626

2727
@grayFont: #9e9e9f;
2828

29-
@lightHaneul: #42CAF4;
29+
@lightHaneul: #42caf4;
3030

3131
@lightBora: #6c5af2;
3232

3333
@blueHaneul: #5096f5;
3434

3535
//popup colors
36-
@titleBack: #2A7DEF;
36+
@titleBack: #2a7def;
3737

3838
@stepBack: #f4810f;
3939

@@ -59,4 +59,6 @@
5959

6060
// 개편 color
6161
@baseblue: #4f80ff;
62+
@baseBluePoint: #3064ec;
6263
@basePurple: #8274ff;
64+
@basePurplePoint: #5e4dee;

src/playground/block_view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ Entry.BlockView = class BlockView {
13731373
});
13741374

13751375
if (images.length) {
1376-
images.forEach((image) => {
1376+
Array.from(images).forEach((image) => {
13771377
const href = image.getAttribute('href');
13781378
image.setAttribute('href', `${location.protocol}//${location.host}${href}`);
13791379
});

0 commit comments

Comments
 (0)