SpreadsheetApp.getUi(); var ss = SpreadsheetApp.getActiveSpreadsheet(); var dataSheet = ss.getActiveSheet(); var firstRow = 2; var firstColumn = 1; var numRow = dataSheet.getLastRow() - firstRow + 1; var numColumn = dataSheet.getLastColumn() - firstRow + 1; var dataRange = dataSheet.getRange(firstRow, firstColumn, numR var dataset = U.loadDataset(dataRange.getValues()); var model = new LinearRegression(); model.train(dataset.training.x, dataset.training.y, 100, var predictionY = model.predict(dataset.prediction.x); var trainingY_ = model.predict(dataset.training.x); var resultSheet = ss.insertSheet(dataSheet.getName() + "_resul resultSheet.getRange(1, 1).setValue(dataSheet.getRange(1, var values = U.mergeValues(predictionY, dataset.prediction.idx