All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hex.genmodel.easy.EigenEncoderColumnMapper Maven / Gradle / Ivy

There is a newer version: 3.46.0.5
Show newest version
package hex.genmodel.easy;

import hex.genmodel.GenModel;

import java.util.HashMap;
import java.util.Map;

public class EigenEncoderColumnMapper {

  protected final GenModel _m;

  public EigenEncoderColumnMapper(GenModel m) {
    _m = m;
  }

  public String[] getModelColumnNames() {
    return _m.getOrigNames();
  }
  
  public Map create() {
    String[] modelColumnNames = getModelColumnNames();
    Map modelColumnNameToIndexMap = new HashMap<>(modelColumnNames.length);
    for (int i = 0; i < modelColumnNames.length; i++) {
      modelColumnNameToIndexMap.put(modelColumnNames[i], i);
    }
    return modelColumnNameToIndexMap;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy