fun serializableInstance(): LogisticRegressionRunner? { val variables: MutableList<Node> = LinkedList() val var1 = ContinuousVariable("X") val var2 = ContinuousVariable("Y") variables.add(var1) variables.add(var2) val dataSet: DataSet = ColtDataSet(3, variables) val col1data = doubleArrayOf(0.0, 1.0, 2.0) val col2data = doubleArrayOf(2.3, 4.3, 2.5) for (i in 0..2) { dataSet.setDouble(i, 0, col1data[i]) dataSet.setDouble(i, 1, col2data[i]) } val dataWrapper = DataWrapper(dataSet) return LogisticRegressionRunner(dataWrapper, Parameters()) }
Generates a simple exemplar of this class to test serialization .