xy-scale 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/datasets.js +9 -7
package/package.json
CHANGED
package/src/datasets.js
CHANGED
|
@@ -12,7 +12,8 @@ export const parseTrainingXY = ({
|
|
|
12
12
|
groups,
|
|
13
13
|
shuffle = false,
|
|
14
14
|
minmaxRange,
|
|
15
|
-
balancing = ''
|
|
15
|
+
balancing = '',
|
|
16
|
+
state = {}
|
|
16
17
|
}) => {
|
|
17
18
|
let X = [];
|
|
18
19
|
let Y = [];
|
|
@@ -22,12 +23,12 @@ export const parseTrainingXY = ({
|
|
|
22
23
|
|
|
23
24
|
if(!validateRows(arrObj[x])) continue
|
|
24
25
|
|
|
25
|
-
const parsedX = xCallbackFunc({ objRow: arrObj, index: x })
|
|
26
|
-
const parsedY = yCallbackFunc({ objRow: arrObj, index: x })
|
|
26
|
+
const parsedX = xCallbackFunc({ objRow: arrObj, index: x, state})
|
|
27
|
+
const parsedY = yCallbackFunc({ objRow: arrObj, index: x, state})
|
|
27
28
|
|
|
28
29
|
if (parsedX !== undefined && parsedX !== null && parsedY !== undefined && parsedY !== null) {
|
|
29
|
-
X.push(parsedX)
|
|
30
|
-
Y.push(parsedY)
|
|
30
|
+
X.push(parsedX)
|
|
31
|
+
Y.push(parsedY)
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -108,7 +109,8 @@ export const parseProductionX = ({
|
|
|
108
109
|
validateRows = row => row,
|
|
109
110
|
groups,
|
|
110
111
|
shuffle = false,
|
|
111
|
-
minmaxRange
|
|
112
|
+
minmaxRange,
|
|
113
|
+
state = {}
|
|
112
114
|
}) => {
|
|
113
115
|
let X = [];
|
|
114
116
|
|
|
@@ -116,7 +118,7 @@ export const parseProductionX = ({
|
|
|
116
118
|
|
|
117
119
|
if(!validateRows(arrObj[x])) continue
|
|
118
120
|
|
|
119
|
-
const parsedX = xCallbackFunc({ objRow: arrObj, index: x})
|
|
121
|
+
const parsedX = xCallbackFunc({ objRow: arrObj, index: x, state})
|
|
120
122
|
|
|
121
123
|
if (parsedX) {
|
|
122
124
|
X.push(parsedX)
|