From: Chou Hung-Yi Date: Wed, 23 May 2018 14:51:51 +0000 (+0800) Subject: print more digits of model parameter: %.16g to %.17g X-Git-Tag: v221~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07dc766ad4552b1f10cf4640c7ac4e6a64de3f1f;p=liblinear print more digits of model parameter: %.16g to %.17g --- diff --git a/linear.cpp b/linear.cpp index 746192b..1f04a60 100644 --- a/linear.cpp +++ b/linear.cpp @@ -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; iw[i*nr_w+j]); + fprintf(fp, "%.17g ", model_->w[i*nr_w+j]); fprintf(fp, "\n"); }