evaluatedataframe

package
v8.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Overview

Evaluates the data frame analytics for an annotated index.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type EvaluateDataFrame

type EvaluateDataFrame struct {
	// contains filtered or unexported fields
}

func (EvaluateDataFrame) Do

Do runs the request through the transport, handle the response and returns a evaluatedataframe.Response

func (*EvaluateDataFrame) Header

func (r *EvaluateDataFrame) Header(key, value string) *EvaluateDataFrame

Header set a key, value pair in the EvaluateDataFrame headers map.

func (*EvaluateDataFrame) HttpRequest

func (r *EvaluateDataFrame) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (EvaluateDataFrame) Perform added in v8.7.0

func (r EvaluateDataFrame) Perform(ctx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*EvaluateDataFrame) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*EvaluateDataFrame) Request

func (r *EvaluateDataFrame) Request(req *Request) *EvaluateDataFrame

Request allows to set the request property with the appropriate payload.

type NewEvaluateDataFrame

type NewEvaluateDataFrame func() *EvaluateDataFrame

NewEvaluateDataFrame type alias for index.

func NewEvaluateDataFrameFunc

func NewEvaluateDataFrameFunc(tp elastictransport.Interface) NewEvaluateDataFrame

NewEvaluateDataFrameFunc returns a new instance of EvaluateDataFrame with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Request

type Request struct {

	// Evaluation Defines the type of evaluation you want to perform.
	Evaluation types.DataframeEvaluationContainer `json:"evaluation"`
	// Index Defines the `index` in which the evaluation will be performed.
	Index string `json:"index"`
	// Query A query clause that retrieves a subset of data from the source index.
	Query *types.Query `json:"query,omitempty"`
}

Request holds the request body struct for the package evaluatedataframe

https://github.com/elastic/elasticsearch-specification/blob/363111664e81786557afe06e68221018847b3676/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L52

func NewRequest added in v8.5.0

func NewRequest() *Request

NewRequest returns a Request

func (*Request) FromJSON added in v8.5.0

func (r *Request) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

type Response added in v8.7.0

type Response struct {
	Classification   *types.DataframeClassificationSummary   `json:"classification,omitempty"`
	OutlierDetection *types.DataframeOutlierDetectionSummary `json:"outlier_detection,omitempty"`
	Regression       *types.DataframeRegressionSummary       `json:"regression,omitempty"`
}

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL