Following is the code Snippet

 

 

JavaRDD<Tuple2<Object, Object>> predictionAndLabels = data

                                                                .map(new
Function<LabeledPoint, Tuple2<Object, Object>>() {

 
public Tuple2<Object, Object> call(LabeledPoint p) {

 
Double prediction = sameModel.predict(p.features());

 
return new Tuple2<Object, Object>(prediction, p.label());

 
}

                                                                });

                                                                

The line "sameModel.predict(p.features());" gives me the prediction as
double value (eg 0.0 or 1.0) .

How can i get the prediction value with more digits after decimal point.eg
0.23443333 etc




===========================================================================================================================================================================================
DISCLAIMER:
The information contained in this message (including any attachments) is 
confidential and may be privileged. If you have received it by mistake please 
notify the sender by return e-mail and permanently delete this message and any 
attachments from your system. Any dissemination, use, review, distribution, 
printing or copying of this message in whole or in part is strictly prohibited. 
Please note that e-mails are susceptible to change. CitiusTech shall not be 
liable for the improper or incomplete transmission of the information contained 
in this communication nor for any delay in its receipt or damage to your 
system. CitiusTech does not guarantee that the integrity of this communication 
has been maintained or that this communication is free of viruses, 
interceptions or interferences. 
====================================================================================================================================================================

Reply via email to