Sha256: 021df534f849b0e1c191a8d87fa4b87e58a61463e9cee81b83183456e638f7b2

Contents?: true

Size: 1.88 KB

Versions: 7

Compression:

Stored size: 1.88 KB

Contents

module Elasticsearch
  module XPack
    module API
      module MachineLearning
        module Actions

          # Retrieve job results for one or more influencers
          #
          # @option arguments [String] :job_id [TODO] (*Required*)
          # @option arguments [Hash] :body Influencer selection criteria
          # @option arguments [Boolean] :exclude_interim Exclude interim results
          # @option arguments [Int] :from skips a number of influencers
          # @option arguments [Int] :size specifies a max number of influencers to get
          # @option arguments [String] :start start timestamp for the requested influencers
          # @option arguments [String] :end end timestamp for the requested influencers
          # @option arguments [Double] :influencer_score influencer score threshold for the requested influencers
          # @option arguments [String] :sort sort field for the requested influencers
          # @option arguments [Boolean] :desc whether the results should be sorted in decending order
          #
          # @see http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html
          #
          def get_influencers(arguments={})
            raise ArgumentError, "Required argument 'job_id' missing" unless arguments[:job_id]
            valid_params = [
              :exclude_interim,
              :from,
              :size,
              :start,
              :end,
              :influencer_score,
              :sort,
              :desc ]
            method = Elasticsearch::API::HTTP_GET
            path   = "_xpack/ml/anomaly_detectors/#{arguments[:job_id]}/results/influencers"
            params = Elasticsearch::API::Utils.__validate_and_extract_params arguments, valid_params
            body   = arguments[:body]

            perform_request(method, path, params, body).body
          end
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
elasticsearch-xpack-6.8.1 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.8.0 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.3.1 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.3.0 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.2.0 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.1.0 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb
elasticsearch-xpack-6.0.0 lib/elasticsearch/xpack/api/actions/machine_learning/get_influencers.rb