MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / getTrainData

Method getTrainData

website-phishing/data.js:68–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66 }
67
68 getTrainData() {
69 const dataShape = [this.trainSize, this.NUM_FEATURES];
70
71 const trainData = Float32Array.from([].concat.apply([], this.dataset[0]));
72 const trainTarget = Float32Array.from([].concat.apply([], this.dataset[1]));
73
74 return {
75 data: tf.tensor2d(trainData, dataShape),
76 target: tf.tensor1d(trainTarget)
77 };
78 }
79
80 getTestData() {
81 const dataShape = [this.testSize, this.NUM_FEATURES];

Callers 1

index.jsFile · 0.45

Calls 1

applyMethod · 0.45

Tested by

no test coverage detected