package hex.schemas;

import hex.tree.isofor.IsolationForest;
import hex.tree.isofor.IsolationForestModel;
import water.api.API;

public class IsolationForestV3 extends SharedTreeV3<IsolationForest, IsolationForestV3, IsolationForestV3.IsolationForestParametersV3> {

    public static final class IsolationForestParametersV3 extends SharedTreeV3.SharedTreeParametersV3<IsolationForestModel.IsolationForestParameters, IsolationForestParametersV3> {
        static public String[] fields = new String[]{
                "model_id",
                "training_frame",
                "score_each_iteration",
                "score_tree_interval",
                "ignored_columns",
                "ignore_const_cols",
                "ntrees",
                "max_depth",
                "min_rows",
                "max_runtime_secs",
                "seed",
                "build_tree_one_node",
                "mtries",
                "sample_size",
                "sample_rate",
                "col_sample_rate_change_per_level",
                "col_sample_rate_per_tree",
                "categorical_encoding",
                "stopping_rounds",
                "stopping_metric",
                "stopping_tolerance",
                "export_checkpoints_dir",
                "contamination",
                "response_column"
        };

        // Input fields
        @API(help = "Number of randomly sampled observations used to train each Isolation Forest tree. Only one of parameters sample_size and sample_rate should be defined. If sample_rate is defined, sample_size will be ignored.", gridable = true)
        public long sample_size;

        @API(help = "Rate of randomly sampled observations used to train each Isolation Forest tree. Needs to be in range from 0.0 to 1.0. If set to -1, sample_rate is disabled and sample_size will be used instead.", gridable = true)
        public double sample_rate;

        @API(help = "Number of variables randomly sampled as candidates at each split. If set to -1, defaults (number of predictors)/3.", gridable = true)
        public int mtries;

        @API(help = "Contamination ratio - the proportion of anomalies in the input dataset. If undefined (-1) the predict function will not mark observations as anomalies and only anomaly score will be returned. Defaults to -1 (undefined).")
        public double contamination;

    }
}

@@ -117,15 +117,193 @@
 ter.
-api.API
+DKV;%0Aimport water.Key;%0Aimport water.Value;%0Aimport water.api.API;%0Aimport water.api.schemas3.FrameV3;%0Aimport water.api.schemas3.KeyV3;%0Aimport water.fvec.Frame;%0Aimport water.util.PojoUtils
 ;%0A%0Ap
@@ -1493,16 +1493,27 @@
        %22
+validation_
 response
@@ -2535,16 +2535,16 @@
 ned).%22)%0A
-
         
@@ -2573,16 +2573,1288 @@
 ation;%0A%0A
+        @API(level = API.Level.secondary, direction = API.Direction.INOUT,%0A                is_member_of_frames = %7B%22validation_frame%22%7D,%0A                is_mutually_exclusive_with = %7B%22ignored_columns%22%7D,%0A                help = %22(experimental) Name of the response column in the validation frame. %22 +%0A                        %22Response column should be binary and indicate not anomaly/anomaly.%22)%0A        public FrameV3.ColSpecifierV3 validation_response_column;%0A        %0A        @Override%0A        public IsolationForestParametersV3 fillFromImpl(IsolationForestModel.IsolationForestParameters impl) %7B%0A            IsolationForestParametersV3 pv3 = super.fillFromImpl(impl);%0A            if (impl._response_column != null) %7B%0A                pv3.validation_response_column = new FrameV3.ColSpecifierV3(impl._response_column);%0A            %7D%0A            return pv3;%0A        %7D%0A%0A        @Override%0A        public IsolationForestModel.IsolationForestParameters fillImpl(IsolationForestModel.IsolationForestParameters impl) %7B%0A            IsolationForestModel.IsolationForestParameters p = super.fillImpl(impl);%0A            if (validation_response_column != null) %7B%0A                p._response_column = validation_response_column.column_name;%0A            %7D%0A            return p;%0A        %7D%0A%0A
     %7D%0A%7D%0A

Use validation_response_column instead of response_column based on core review