Package hex

Examples of hex.ModelBuilder


    if (null != m.model_builders) {
      this.model_builders = new IcedHashMap<>();

      int i = 0;
      for (Map.Entry<String, ModelBuilder> entry: m.model_builders.entrySet()) {
        ModelBuilder model_builder = entry.getValue();
        String algo = entry.getKey();
        this.model_builders.put(algo, model_builder.schema().fillFromImpl(entry.getValue()));
      }
    }
    return this;
  }
View Full Code Here


        Type[] handler_type_parms = ((ParameterizedType)(clz.getGenericSuperclass())).getActualTypeArguments();
        // [0] is the Model type; [1] is the Model.Parameters type; [2] is the Model.Output type.
        Class<? extends Model.Parameters> pclz = (Class<? extends Model.Parameters>)handler_type_parms[1];

        ModelBuilder modelbuilder = clz.getDeclaredConstructor(new Class[] { (Class)handler_type_parms[1] }).newInstance(pclz.newInstance());
        m.model_builders.put(algo, modelbuilder);
      }
      catch (Exception e) {
        throw H2O.fail("Exception when trying to instantiate ModelBuilder for: " + entry.getKey() + ": " + e);
      }
View Full Code Here

      Type[] handler_type_parms = ((ParameterizedType)(clz.getGenericSuperclass())).getActualTypeArguments();
      // [0] is the Model type; [1] is the Model.Parameters type; [2] is the Model.Output type.
      Class<? extends Model.Parameters> pclz = (Class<? extends Model.Parameters>)handler_type_parms[1];

      ModelBuilder modelbuilder = clz.getDeclaredConstructor(new Class[] { (Class)handler_type_parms[1] }).newInstance(pclz.newInstance());

      m.model_builders = new IcedHashMap<>();
      m.model_builders.put(m.algo, modelbuilder);
    }
    catch (Exception e) {
View Full Code Here

TOP

Related Classes of hex.ModelBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.