Hi All, I am using LinearRegression and have a question about the details on model.predict method. Basically it is predicting variable y given an input vector x. However, can someone point me to the documentation about what is the threshold used in the predict method? Can that be changed ? I am assuming that i/p vector essentially gets mapped to a number and is compared against a threshold value and then y is either set to 0 or 1 based on those two numbers. Another question I have is if I want to save the model to hdfs for later reuse is there a recommended way for doing that? // Building the model val numIterations = 100 val model = LinearRegressionWithSGD.train(parsedData, numIterations)
// Evaluate model on training examples and compute training error val valuesAndPreds = parsedData.map { point => val prediction = model.predict(point.features) (point.label, prediction) }