function generateDataSets() {
const points = [];
for (let x = 0; x < 10; x += 1) {
points.push(
{
x1: Math.random(),
x2: Math.random(),
y1: Math.random(),
y2: Math.random()
}
)
}
return points;
const xTrain = [];
const yTrain = [];
for (let x = 0; x < 10; x += 1) {
const y = celsiusToFahrenheit(x);
xTrain.push(x);
yTrain.push(y);
}
const xTest = [];
const yTest = [];
for (let x = 0.5; x < 10; x += 1) {
const y = celsiusToFahrenheit(x);
xTest.push(x);
yTest.push(y);
}
return [xTrain, yTrain, xTest, yTest];
}