1
나는 LinearRegressionWithSGD
을 사용하고 있으며 모델 가중치와 절편을 저장합니다. 나는이 순간을 위해 무시 될 수 있도록 절편을 설정하지 않는 기차를 사용하고 있기 때문에MLLIb : 모델 저장 및로드
1.20455
0.1356
0.000456
절편이 0 : 가중치를 포함
파일이 형식을 가지고있다. 이제 새 모델 객체를 초기화하고 위의 파일에서 저장된 가중치를 사용하려고합니다. 우리는이 라인을 따라 CDH 5.1을
뭔가를 사용 :
// Here is the code the load data and train the model on it.
val weights = sc.textFile("linear-weights");
val model = new LinearRegressionWithSGD(weights);
후 사용
은이다 : 나는 그렇게 할 방법// Here is where I want to use the trained model to predict on new data.
val valuesAndPreds = testData.map { point =>
// Predicting on new data.
val prediction = model.predict(point.features)
(point.label, prediction)
}
모든 포인터?