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

hex.grep.GrepModel Maven / Gradle / Ivy

There is a newer version: 3.46.0.6
Show newest version
package hex.grep;

import hex.Model;
import hex.ModelCategory;
import hex.ModelMetrics;
import water.H2O;
import water.Key;

public class GrepModel extends Model {

  public static class GrepParameters extends Model.Parameters {
    public String algoName() { return "Grep"; }
    public String fullName() { return "Grep"; }
    public String javaName() { return GrepModel.class.getName(); }
    @Override public long progressUnits() { return train() != null ? train().numRows() : 1; }
    public String _regex;       // The regex
  }

  public static class GrepOutput extends Model.Output {
    // Iterations executed
    public String[] _matches;
    public long[] _offsets;
    public GrepOutput( Grep b ) { super(b); }
    @Override public ModelCategory getModelCategory() { return ModelCategory.Unknown; }
  }

  GrepModel( Key selfKey, GrepParameters parms, GrepOutput output) { super(selfKey,parms,output); }

  @Override
  public ModelMetrics.MetricBuilder makeMetricBuilder(String[] domain) {
    throw H2O.unimpl("GrepModel does not have Model Metrics.");
  }

  @Override protected double[] score0(double data[/*ncols*/], double preds[/*nclasses+1*/]) {
    throw H2O.unimpl();
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy