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

water.bindings.proxies.retrofit.Predictions Maven / Gradle / Ivy

There is a newer version: 3.46.0.5
Show newest version
/*
 * This file is auto-generated by h2o-3/h2o-bindings/bin/gen_java.py
 * Copyright 2016 H2O.ai;  Apache License Version 2.0 (see LICENSE for details)
 */
package water.bindings.proxies.retrofit;

import water.bindings.pojos.*;
import retrofit2.*;
import retrofit2.http.*;

public interface Predictions {

  /** 
   * Score (generate predictions) for the specified Frame with the specified Model.  Both the Frame of predictions and
   * the metrics will be returned.
   *   @param model Key of Model of interest (optional)
   *   @param frame Key of Frame of interest (optional)
   *   @param predictions_frame Key of predictions frame, if predictions are requested (optional)
   *   @param deviances_frame Key for the frame containing per-observation deviances (optional)
   *   @param reconstruction_error Compute reconstruction error (optional, only for Deep Learning AutoEncoder models)
   *   @param reconstruction_error_per_feature Compute reconstruction error per feature (optional, only for Deep
   *                                           Learning AutoEncoder models)
   *   @param deep_features_hidden_layer Extract Deep Features for given hidden layer (optional, only for Deep Learning
   *                                     models)
   *   @param deep_features_hidden_layer_name Extract Deep Features for given hidden layer by name (optional, only for
   *                                          Deep Water models)
   *   @param reconstruct_train Reconstruct original training frame (optional, only for GLRM models)
   *   @param project_archetypes Project GLRM archetypes back into original feature space (optional, only for GLRM
   *                             models)
   *   @param reverse_transform Reverse transformation applied during training to model output (optional, only for GLRM
   *                            models)
   *   @param leaf_node_assignment Return the leaf node assignment (optional, only for DRF/GBM models)
   *   @param leaf_node_assignment_type Type of the leaf node assignment (optional, only for DRF/GBM models)
   *   @param predict_staged_proba Predict the class probabilities at each stage (optional, only for GBM models)
   *   @param predict_contributions Predict the feature contributions - Shapley values (optional, only for DRF, GBM and
   *                                XGBoost models)
   *   @param row_to_tree_assignment Return which row is used in which tree (optional, only for GBM models)
   *   @param predict_contributions_output_format Specify how to output feature contributions in XGBoost - XGBoost by
   *                                              default outputs contributions for 1-hot encoded features, specifying a
   *                                              Compact output format will produce a per-feature contribution
   *   @param top_n Only for predict_contributions function - sort Shapley values and return top_n highest (optional)
   *   @param bottom_n Only for predict_contributions function - sort Shapley values and return bottom_n lowest
   *                   (optional)
   *   @param compare_abs Only for predict_contributions function - sort absolute Shapley values (optional)
   *   @param feature_frequencies Retrieve the feature frequencies on paths in trees in tree-based models (optional,
   *                              only for GBM, DRF and Isolation Forest)
   *   @param exemplar_index Retrieve all members for a given exemplar (optional, only for Aggregator models)
   *   @param deviances Compute the deviances per row (optional, only for classification or regression models)
   *   @param custom_metric_func Reference to custom evaluation function, format: `language:keyName=funcName`
   *   @param auc_type Set default multinomial AUC type. Must be one of: "AUTO", "NONE", "MACRO_OVR", "WEIGHTED_OVR",
   *                   "MACRO_OVO", "WEIGHTED_OVO". Default is "NONE" (optional, only for multinomial classification).
   *   @param auuc_type Set default AUUC type for uplift binomial classification. Must be one of: "AUTO", "qini",
   *                    "lift", "gain". Default is "AUTO" (optional, only for uplift binomial classification).
   *   @param custom_auuc_thresholds Custom AUUC thresholds (for uplift binomial classification).
   *   @param auuc_nbins Set number of bins to calculate AUUC. Must be -1 or higher than 0. Default is -1 which means
   *                     1000 (optional, only for uplift binomial classification).
   *   @param background_frame Specify background frame used as a reference for calculating SHAP.
   *   @param output_space If true, transform contributions so that they sum up to the difference in the output space
   *                       (applicable iff contributions are in link space). Note that this transformation is an
   *                       approximation and the contributions won't be exact SHAP values.
   *   @param output_per_reference If true, return contributions against each background sample (aka reference), i.e.
   *                               phi(feature, x, bg), otherwise return contributions averaged over the background
   *                               sample (phi(feature, x) = E_{bg} phi(feature, x, bg))
   *   @param _exclude_fields Comma-separated list of JSON field paths to exclude from the result, used like:
   *                          "/3/Frames?_exclude_fields=frames/frame_id/URL,__meta"
   */
  @FormUrlEncoded
  @POST("/3/Predictions/models/{model}/frames/{frame}")
  Call predict(
    @Path("model") String model,
    @Path("frame") String frame,
    @Field("predictions_frame") String predictions_frame,
    @Field("deviances_frame") String deviances_frame,
    @Field("reconstruction_error") boolean reconstruction_error,
    @Field("reconstruction_error_per_feature") boolean reconstruction_error_per_feature,
    @Field("deep_features_hidden_layer") int deep_features_hidden_layer,
    @Field("deep_features_hidden_layer_name") String deep_features_hidden_layer_name,
    @Field("reconstruct_train") boolean reconstruct_train,
    @Field("project_archetypes") boolean project_archetypes,
    @Field("reverse_transform") boolean reverse_transform,
    @Field("leaf_node_assignment") boolean leaf_node_assignment,
    @Field("leaf_node_assignment_type") ModelLeafNodeAssignmentLeafNodeAssignmentType leaf_node_assignment_type,
    @Field("predict_staged_proba") boolean predict_staged_proba,
    @Field("predict_contributions") boolean predict_contributions,
    @Field("row_to_tree_assignment") boolean row_to_tree_assignment,
    @Field("predict_contributions_output_format") ModelContributionsContributionsOutputFormat predict_contributions_output_format,
    @Field("top_n") int top_n,
    @Field("bottom_n") int bottom_n,
    @Field("compare_abs") boolean compare_abs,
    @Field("feature_frequencies") boolean feature_frequencies,
    @Field("exemplar_index") int exemplar_index,
    @Field("deviances") boolean deviances,
    @Field("custom_metric_func") String custom_metric_func,
    @Field("auc_type") String auc_type,
    @Field("auuc_type") String auuc_type,
    @Field("custom_auuc_thresholds") double[] custom_auuc_thresholds,
    @Field("auuc_nbins") int auuc_nbins,
    @Field("background_frame") String background_frame,
    @Field("output_space") boolean output_space,
    @Field("output_per_reference") boolean output_per_reference,
    @Field("_exclude_fields") String _exclude_fields
  );

  @FormUrlEncoded
  @POST("/3/Predictions/models/{model}/frames/{frame}")
  Call predict(
    @Path("model") String model,
    @Path("frame") String frame
  );

  /** 
   * Score (generate predictions) for the specified Frame with the specified Model.  Both the Frame of predictions and
   * the metrics will be returned.
   *   @param model Key of Model of interest (optional)
   *   @param frame Key of Frame of interest (optional)
   *   @param predictions_frame Key of predictions frame, if predictions are requested (optional)
   *   @param deviances_frame Key for the frame containing per-observation deviances (optional)
   *   @param reconstruction_error Compute reconstruction error (optional, only for Deep Learning AutoEncoder models)
   *   @param reconstruction_error_per_feature Compute reconstruction error per feature (optional, only for Deep
   *                                           Learning AutoEncoder models)
   *   @param deep_features_hidden_layer Extract Deep Features for given hidden layer (optional, only for Deep Learning
   *                                     models)
   *   @param deep_features_hidden_layer_name Extract Deep Features for given hidden layer by name (optional, only for
   *                                          Deep Water models)
   *   @param reconstruct_train Reconstruct original training frame (optional, only for GLRM models)
   *   @param project_archetypes Project GLRM archetypes back into original feature space (optional, only for GLRM
   *                             models)
   *   @param reverse_transform Reverse transformation applied during training to model output (optional, only for GLRM
   *                            models)
   *   @param leaf_node_assignment Return the leaf node assignment (optional, only for DRF/GBM models)
   *   @param leaf_node_assignment_type Type of the leaf node assignment (optional, only for DRF/GBM models)
   *   @param predict_staged_proba Predict the class probabilities at each stage (optional, only for GBM models)
   *   @param predict_contributions Predict the feature contributions - Shapley values (optional, only for DRF, GBM and
   *                                XGBoost models)
   *   @param row_to_tree_assignment Return which row is used in which tree (optional, only for GBM models)
   *   @param predict_contributions_output_format Specify how to output feature contributions in XGBoost - XGBoost by
   *                                              default outputs contributions for 1-hot encoded features, specifying a
   *                                              Compact output format will produce a per-feature contribution
   *   @param top_n Only for predict_contributions function - sort Shapley values and return top_n highest (optional)
   *   @param bottom_n Only for predict_contributions function - sort Shapley values and return bottom_n lowest
   *                   (optional)
   *   @param compare_abs Only for predict_contributions function - sort absolute Shapley values (optional)
   *   @param feature_frequencies Retrieve the feature frequencies on paths in trees in tree-based models (optional,
   *                              only for GBM, DRF and Isolation Forest)
   *   @param exemplar_index Retrieve all members for a given exemplar (optional, only for Aggregator models)
   *   @param deviances Compute the deviances per row (optional, only for classification or regression models)
   *   @param custom_metric_func Reference to custom evaluation function, format: `language:keyName=funcName`
   *   @param auc_type Set default multinomial AUC type. Must be one of: "AUTO", "NONE", "MACRO_OVR", "WEIGHTED_OVR",
   *                   "MACRO_OVO", "WEIGHTED_OVO". Default is "NONE" (optional, only for multinomial classification).
   *   @param auuc_type Set default AUUC type for uplift binomial classification. Must be one of: "AUTO", "qini",
   *                    "lift", "gain". Default is "AUTO" (optional, only for uplift binomial classification).
   *   @param custom_auuc_thresholds Custom AUUC thresholds (for uplift binomial classification).
   *   @param auuc_nbins Set number of bins to calculate AUUC. Must be -1 or higher than 0. Default is -1 which means
   *                     1000 (optional, only for uplift binomial classification).
   *   @param background_frame Specify background frame used as a reference for calculating SHAP.
   *   @param output_space If true, transform contributions so that they sum up to the difference in the output space
   *                       (applicable iff contributions are in link space). Note that this transformation is an
   *                       approximation and the contributions won't be exact SHAP values.
   *   @param output_per_reference If true, return contributions against each background sample (aka reference), i.e.
   *                               phi(feature, x, bg), otherwise return contributions averaged over the background
   *                               sample (phi(feature, x) = E_{bg} phi(feature, x, bg))
   *   @param _exclude_fields Comma-separated list of JSON field paths to exclude from the result, used like:
   *                          "/3/Frames?_exclude_fields=frames/frame_id/URL,__meta"
   */
  @FormUrlEncoded
  @POST("/4/Predictions/models/{model}/frames/{frame}")
  Call predictAsync(
    @Path("model") String model,
    @Path("frame") String frame,
    @Field("predictions_frame") String predictions_frame,
    @Field("deviances_frame") String deviances_frame,
    @Field("reconstruction_error") boolean reconstruction_error,
    @Field("reconstruction_error_per_feature") boolean reconstruction_error_per_feature,
    @Field("deep_features_hidden_layer") int deep_features_hidden_layer,
    @Field("deep_features_hidden_layer_name") String deep_features_hidden_layer_name,
    @Field("reconstruct_train") boolean reconstruct_train,
    @Field("project_archetypes") boolean project_archetypes,
    @Field("reverse_transform") boolean reverse_transform,
    @Field("leaf_node_assignment") boolean leaf_node_assignment,
    @Field("leaf_node_assignment_type") ModelLeafNodeAssignmentLeafNodeAssignmentType leaf_node_assignment_type,
    @Field("predict_staged_proba") boolean predict_staged_proba,
    @Field("predict_contributions") boolean predict_contributions,
    @Field("row_to_tree_assignment") boolean row_to_tree_assignment,
    @Field("predict_contributions_output_format") ModelContributionsContributionsOutputFormat predict_contributions_output_format,
    @Field("top_n") int top_n,
    @Field("bottom_n") int bottom_n,
    @Field("compare_abs") boolean compare_abs,
    @Field("feature_frequencies") boolean feature_frequencies,
    @Field("exemplar_index") int exemplar_index,
    @Field("deviances") boolean deviances,
    @Field("custom_metric_func") String custom_metric_func,
    @Field("auc_type") String auc_type,
    @Field("auuc_type") String auuc_type,
    @Field("custom_auuc_thresholds") double[] custom_auuc_thresholds,
    @Field("auuc_nbins") int auuc_nbins,
    @Field("background_frame") String background_frame,
    @Field("output_space") boolean output_space,
    @Field("output_per_reference") boolean output_per_reference,
    @Field("_exclude_fields") String _exclude_fields
  );

  @FormUrlEncoded
  @POST("/4/Predictions/models/{model}/frames/{frame}")
  Call predictAsync(
    @Path("model") String model,
    @Path("frame") String frame
  );

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy