Refactor: Result 컬럼 추가 - S11P21S002-223

This commit is contained in:
kimtaesoo7 2024-09-27 16:06:19 +09:00
parent ffe79cc79b
commit 7d5def2d20
2 changed files with 12 additions and 4 deletions

View File

@ -19,4 +19,6 @@ public class TrainResponse {
private double mAP5095; private double mAP5095;
private double fitness; private double fitness;
private double accuracy;
} }

View File

@ -63,6 +63,9 @@ public class Result extends BaseEntity {
@Enumerated(EnumType.STRING) @Enumerated(EnumType.STRING)
private Optimizer optimizer; private Optimizer optimizer;
@Column(name = "accuracy", nullable = false)
private double accuracy;
public Result(final AiModel aiModel, public Result(final AiModel aiModel,
final double precision, final double precision,
final double recall, final double recall,
@ -74,7 +77,8 @@ public class Result extends BaseEntity {
final double batch, final double batch,
final double lr0, final double lr0,
final double lrf, final double lrf,
final Optimizer optimizer) { final Optimizer optimizer,
final double accuracy) {
this.aiModel = aiModel; this.aiModel = aiModel;
this.precision = precision; this.precision = precision;
this.recall = recall; this.recall = recall;
@ -87,6 +91,7 @@ public class Result extends BaseEntity {
this.lr0 = lr0; this.lr0 = lr0;
this.lrf = lrf; this.lrf = lrf;
this.optimizer = optimizer; this.optimizer = optimizer;
this.accuracy = accuracy;
} }
public static Result of(final AiModel aiModel, final TrainResponse trainResponse, final ModelTrainRequest trainRequest) { public static Result of(final AiModel aiModel, final TrainResponse trainResponse, final ModelTrainRequest trainRequest) {
@ -101,7 +106,8 @@ public class Result extends BaseEntity {
trainRequest.getBatch(), trainRequest.getBatch(),
trainRequest.getLr0(), trainRequest.getLr0(),
trainRequest.getLrf(), trainRequest.getLrf(),
trainRequest.getOptimizer() trainRequest.getOptimizer(),
trainResponse.getAccuracy()
); );
} }
} }