Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
Signed-off-by: Kaituo Li <[email protected]>
  • Loading branch information
kaituo committed May 17, 2022
1 parent 4e441b3 commit f78e767
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/opensearch/ad/ml/EntityColdStarter.java
Original file line number Diff line number Diff line change
Expand Up @@ -694,17 +694,17 @@ public void trainModelFromExistingSamples(ModelState<EntityModel> modelState, in
*
* @param coldstartDatapoints training data generated from cold start
* @param modelId model Id
* @param entityState entity State
* @param modelState entity State
*/
private void extractTrainSamples(List<double[][]> coldstartDatapoints, String modelId, ModelState<EntityModel> entityState) {
if (coldstartDatapoints == null || coldstartDatapoints.size() == 0 || entityState == null) {
private void extractTrainSamples(List<double[][]> coldstartDatapoints, String modelId, ModelState<EntityModel> modelState) {
if (coldstartDatapoints == null || coldstartDatapoints.size() == 0 || modelState == null) {
return;
}

EntityModel model = entityState.getModel();
EntityModel model = modelState.getModel();
if (model == null) {
model = new EntityModel(null, new ArrayDeque<>(), null);
entityState.setModel(model);
modelState.setModel(model);
}

Queue<double[]> newSamples = new ArrayDeque<>();
Expand Down

0 comments on commit f78e767

Please sign in to comment.