]> granicus.if.org Git - liblinear/commitdiff
print more digits of model parameter: %.16g to %.17g
authorChou Hung-Yi <s1243221@gmail.com>
Wed, 23 May 2018 14:51:51 +0000 (22:51 +0800)
committerChou Hung-Yi <s1243221@gmail.com>
Wed, 23 May 2018 14:51:51 +0000 (22:51 +0800)
linear.cpp

index 746192b8c4a4c6247746664bb2a78146e6a8ae49..1f04a607da8d8a59700e3a395e49efb16c1a9475 100644 (file)
@@ -2792,14 +2792,14 @@ int save_model(const char *model_file_name, const struct model *model_)
 
        fprintf(fp, "nr_feature %d\n", nr_feature);
 
-       fprintf(fp, "bias %.16g\n", model_->bias);
+       fprintf(fp, "bias %.17g\n", model_->bias);
 
        fprintf(fp, "w\n");
        for(i=0; i<w_size; i++)
        {
                int j;
                for(j=0; j<nr_w; j++)
-                       fprintf(fp, "%.16g ", model_->w[i*nr_w+j]);
+                       fprintf(fp, "%.17g ", model_->w[i*nr_w+j]);
                fprintf(fp, "\n");
        }