github.com/weaviate/weaviate@v1.24.6/entities/models/reference_meta_classification.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  // Code generated by go-swagger; DO NOT EDIT.
    13  
    14  package models
    15  
    16  // This file was generated by the swagger tool.
    17  // Editing this file might prove futile when you re-run the swagger generate command
    18  
    19  import (
    20  	"context"
    21  
    22  	"github.com/go-openapi/strfmt"
    23  	"github.com/go-openapi/swag"
    24  )
    25  
    26  // ReferenceMetaClassification This meta field contains additional info about the classified reference property
    27  //
    28  // swagger:model ReferenceMetaClassification
    29  type ReferenceMetaClassification struct {
    30  
    31  	// The lowest distance of a neighbor in the losing group. Optional. If k equals the size of the winning group, there is no losing group
    32  	ClosestLosingDistance *float64 `json:"closestLosingDistance,omitempty"`
    33  
    34  	// The lowest distance of any neighbor, regardless of whether they were in the winning or losing group
    35  	ClosestOverallDistance float64 `json:"closestOverallDistance,omitempty"`
    36  
    37  	// Closest distance of a neighbor from the winning group
    38  	ClosestWinningDistance float64 `json:"closestWinningDistance,omitempty"`
    39  
    40  	// size of the losing group, can be 0 if the winning group size equals k
    41  	LosingCount int64 `json:"losingCount,omitempty"`
    42  
    43  	// deprecated - do not use, to be removed in 0.23.0
    44  	LosingDistance *float64 `json:"losingDistance,omitempty"`
    45  
    46  	// Mean distance of all neighbors from the losing group. Optional. If k equals the size of the winning group, there is no losing group.
    47  	MeanLosingDistance *float64 `json:"meanLosingDistance,omitempty"`
    48  
    49  	// Mean distance of all neighbors from the winning group
    50  	MeanWinningDistance float64 `json:"meanWinningDistance,omitempty"`
    51  
    52  	// overall neighbors checked as part of the classification. In most cases this will equal k, but could be lower than k - for example if not enough data was present
    53  	OverallCount int64 `json:"overallCount,omitempty"`
    54  
    55  	// size of the winning group, a number between 1..k
    56  	WinningCount int64 `json:"winningCount,omitempty"`
    57  
    58  	// deprecated - do not use, to be removed in 0.23.0
    59  	WinningDistance float64 `json:"winningDistance,omitempty"`
    60  }
    61  
    62  // Validate validates this reference meta classification
    63  func (m *ReferenceMetaClassification) Validate(formats strfmt.Registry) error {
    64  	return nil
    65  }
    66  
    67  // ContextValidate validates this reference meta classification based on context it is used
    68  func (m *ReferenceMetaClassification) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    69  	return nil
    70  }
    71  
    72  // MarshalBinary interface implementation
    73  func (m *ReferenceMetaClassification) MarshalBinary() ([]byte, error) {
    74  	if m == nil {
    75  		return nil, nil
    76  	}
    77  	return swag.WriteJSON(m)
    78  }
    79  
    80  // UnmarshalBinary interface implementation
    81  func (m *ReferenceMetaClassification) UnmarshalBinary(b []byte) error {
    82  	var res ReferenceMetaClassification
    83  	if err := swag.ReadJSON(b, &res); err != nil {
    84  		return err
    85  	}
    86  	*m = res
    87  	return nil
    88  }