proto

package
v0.0.0-...-7d47eef Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package proto includes all proto definitions used in the golang package in one large package.

It uses go generate tools to generate it from the source code, but we include the generated files in github, so one doesn't need to install anything.

Index

Constants

View Source
const (
	Default_NodeCondition_SplitScore = float32(0)
)

Default values for NodeCondition fields.

Variables

View Source
var File_yggdrasil_decision_forests_model_decision_tree_decision_tree_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Condition

type Condition struct {

	// Type of condition.
	//
	// Types that are assignable to Type:
	//	*Condition_NaCondition
	//	*Condition_HigherCondition
	//	*Condition_TrueValueCondition
	//	*Condition_ContainsCondition
	//	*Condition_ContainsBitmapCondition
	//	*Condition_DiscretizedHigherCondition
	//	*Condition_ObliqueCondition
	Type isCondition_Type `protobuf_oneof:"type"`
	// contains filtered or unexported fields
}

The sub-messages of "ConditionParams" are the different types of condition that can be attached to a node.

func (*Condition) Descriptor deprecated

func (*Condition) Descriptor() ([]byte, []int)

Deprecated: Use Condition.ProtoReflect.Descriptor instead.

func (*Condition) GetContainsBitmapCondition

func (x *Condition) GetContainsBitmapCondition() *Condition_ContainsBitmap

func (*Condition) GetContainsCondition

func (x *Condition) GetContainsCondition() *Condition_ContainsVector

func (*Condition) GetDiscretizedHigherCondition

func (x *Condition) GetDiscretizedHigherCondition() *Condition_DiscretizedHigher

func (*Condition) GetHigherCondition

func (x *Condition) GetHigherCondition() *Condition_Higher

func (*Condition) GetNaCondition

func (x *Condition) GetNaCondition() *Condition_NA

func (*Condition) GetObliqueCondition

func (x *Condition) GetObliqueCondition() *Condition_Oblique

func (*Condition) GetTrueValueCondition

func (x *Condition) GetTrueValueCondition() *Condition_TrueValue

func (*Condition) GetType

func (m *Condition) GetType() isCondition_Type

func (*Condition) ProtoMessage

func (*Condition) ProtoMessage()

func (*Condition) ProtoReflect

func (x *Condition) ProtoReflect() protoreflect.Message

func (*Condition) Reset

func (x *Condition) Reset()

func (*Condition) String

func (x *Condition) String() string

type Condition_ContainsBitmap

type Condition_ContainsBitmap struct {

	// Next ID: 2
	// [Required]
	ElementsBitmap []byte `protobuf:"bytes,1,opt,name=elements_bitmap,json=elementsBitmap" json:"elements_bitmap,omitempty"`
	// contains filtered or unexported fields
}

Condition of the type: (value \intersect elements) != empty_set where elements is stored as a bitmap over the possible values.

func (*Condition_ContainsBitmap) Descriptor deprecated

func (*Condition_ContainsBitmap) Descriptor() ([]byte, []int)

Deprecated: Use Condition_ContainsBitmap.ProtoReflect.Descriptor instead.

func (*Condition_ContainsBitmap) GetElementsBitmap

func (x *Condition_ContainsBitmap) GetElementsBitmap() []byte

func (*Condition_ContainsBitmap) ProtoMessage

func (*Condition_ContainsBitmap) ProtoMessage()

func (*Condition_ContainsBitmap) ProtoReflect

func (x *Condition_ContainsBitmap) ProtoReflect() protoreflect.Message

func (*Condition_ContainsBitmap) Reset

func (x *Condition_ContainsBitmap) Reset()

func (*Condition_ContainsBitmap) String

func (x *Condition_ContainsBitmap) String() string

type Condition_ContainsBitmapCondition

type Condition_ContainsBitmapCondition struct {
	ContainsBitmapCondition *Condition_ContainsBitmap `protobuf:"bytes,5,opt,name=contains_bitmap_condition,json=containsBitmapCondition,oneof"`
}

type Condition_ContainsCondition

type Condition_ContainsCondition struct {
	ContainsCondition *Condition_ContainsVector `protobuf:"bytes,4,opt,name=contains_condition,json=containsCondition,oneof"`
}

type Condition_ContainsVector

type Condition_ContainsVector struct {

	// Next ID: 2
	Elements []int32 `protobuf:"varint,1,rep,packed,name=elements" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

Condition of the type: (value \intersect elements) != empty_set.

func (*Condition_ContainsVector) Descriptor deprecated

func (*Condition_ContainsVector) Descriptor() ([]byte, []int)

Deprecated: Use Condition_ContainsVector.ProtoReflect.Descriptor instead.

func (*Condition_ContainsVector) GetElements

func (x *Condition_ContainsVector) GetElements() []int32

func (*Condition_ContainsVector) ProtoMessage

func (*Condition_ContainsVector) ProtoMessage()

func (*Condition_ContainsVector) ProtoReflect

func (x *Condition_ContainsVector) ProtoReflect() protoreflect.Message

func (*Condition_ContainsVector) Reset

func (x *Condition_ContainsVector) Reset()

func (*Condition_ContainsVector) String

func (x *Condition_ContainsVector) String() string

type Condition_DiscretizedHigher

type Condition_DiscretizedHigher struct {

	// [Required]
	Threshold *int32 `protobuf:"varint,1,opt,name=threshold" json:"threshold,omitempty"`
	// contains filtered or unexported fields
}

Condition of the type: indexed_value >= indexed_threshold.

func (*Condition_DiscretizedHigher) Descriptor deprecated

func (*Condition_DiscretizedHigher) Descriptor() ([]byte, []int)

Deprecated: Use Condition_DiscretizedHigher.ProtoReflect.Descriptor instead.

func (*Condition_DiscretizedHigher) GetThreshold

func (x *Condition_DiscretizedHigher) GetThreshold() int32

func (*Condition_DiscretizedHigher) ProtoMessage

func (*Condition_DiscretizedHigher) ProtoMessage()

func (*Condition_DiscretizedHigher) ProtoReflect

func (*Condition_DiscretizedHigher) Reset

func (x *Condition_DiscretizedHigher) Reset()

func (*Condition_DiscretizedHigher) String

func (x *Condition_DiscretizedHigher) String() string

type Condition_DiscretizedHigherCondition

type Condition_DiscretizedHigherCondition struct {
	DiscretizedHigherCondition *Condition_DiscretizedHigher `protobuf:"bytes,6,opt,name=discretized_higher_condition,json=discretizedHigherCondition,oneof"`
}

type Condition_Higher

type Condition_Higher struct {

	// [Required]
	Threshold *float32 `protobuf:"fixed32,1,opt,name=threshold" json:"threshold,omitempty"`
	// contains filtered or unexported fields
}

Condition of the type: value >= threshold.

func (*Condition_Higher) Descriptor deprecated

func (*Condition_Higher) Descriptor() ([]byte, []int)

Deprecated: Use Condition_Higher.ProtoReflect.Descriptor instead.

func (*Condition_Higher) GetThreshold

func (x *Condition_Higher) GetThreshold() float32

func (*Condition_Higher) ProtoMessage

func (*Condition_Higher) ProtoMessage()

func (*Condition_Higher) ProtoReflect

func (x *Condition_Higher) ProtoReflect() protoreflect.Message

func (*Condition_Higher) Reset

func (x *Condition_Higher) Reset()

func (*Condition_Higher) String

func (x *Condition_Higher) String() string

type Condition_HigherCondition

type Condition_HigherCondition struct {
	HigherCondition *Condition_Higher `protobuf:"bytes,2,opt,name=higher_condition,json=higherCondition,oneof"`
}

type Condition_NA

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

Next ID: 6 Condition of the type: value == NA (i.e. missing).

func (*Condition_NA) Descriptor deprecated

func (*Condition_NA) Descriptor() ([]byte, []int)

Deprecated: Use Condition_NA.ProtoReflect.Descriptor instead.

func (*Condition_NA) ProtoMessage

func (*Condition_NA) ProtoMessage()

func (*Condition_NA) ProtoReflect

func (x *Condition_NA) ProtoReflect() protoreflect.Message

func (*Condition_NA) Reset

func (x *Condition_NA) Reset()

func (*Condition_NA) String

func (x *Condition_NA) String() string

type Condition_NaCondition

type Condition_NaCondition struct {
	NaCondition *Condition_NA `protobuf:"bytes,1,opt,name=na_condition,json=naCondition,oneof"`
}

type Condition_Oblique

type Condition_Oblique struct {

	// True iff. \sum_i examples[attribute_i] * weight_i >= threshold.
	// The "attribute" field in "NodeCondition" should be one of the
	// "attributes" in this message. If any of the attributes is missing, the
	// conditions evaluates to missing and returns "na_value".
	Attributes []int32   `protobuf:"varint,1,rep,packed,name=attributes" json:"attributes,omitempty"`
	Weights    []float32 `protobuf:"fixed32,2,rep,packed,name=weights" json:"weights,omitempty"`
	Threshold  *float32  `protobuf:"fixed32,3,opt,name=threshold" json:"threshold,omitempty"`
	// contains filtered or unexported fields
}

func (*Condition_Oblique) Descriptor deprecated

func (*Condition_Oblique) Descriptor() ([]byte, []int)

Deprecated: Use Condition_Oblique.ProtoReflect.Descriptor instead.

func (*Condition_Oblique) GetAttributes

func (x *Condition_Oblique) GetAttributes() []int32

func (*Condition_Oblique) GetThreshold

func (x *Condition_Oblique) GetThreshold() float32

func (*Condition_Oblique) GetWeights

func (x *Condition_Oblique) GetWeights() []float32

func (*Condition_Oblique) ProtoMessage

func (*Condition_Oblique) ProtoMessage()

func (*Condition_Oblique) ProtoReflect

func (x *Condition_Oblique) ProtoReflect() protoreflect.Message

func (*Condition_Oblique) Reset

func (x *Condition_Oblique) Reset()

func (*Condition_Oblique) String

func (x *Condition_Oblique) String() string

type Condition_ObliqueCondition

type Condition_ObliqueCondition struct {
	ObliqueCondition *Condition_Oblique `protobuf:"bytes,7,opt,name=oblique_condition,json=obliqueCondition,oneof"`
}

type Condition_TrueValue

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

Condition of the type: value == True.

func (*Condition_TrueValue) Descriptor deprecated

func (*Condition_TrueValue) Descriptor() ([]byte, []int)

Deprecated: Use Condition_TrueValue.ProtoReflect.Descriptor instead.

func (*Condition_TrueValue) ProtoMessage

func (*Condition_TrueValue) ProtoMessage()

func (*Condition_TrueValue) ProtoReflect

func (x *Condition_TrueValue) ProtoReflect() protoreflect.Message

func (*Condition_TrueValue) Reset

func (x *Condition_TrueValue) Reset()

func (*Condition_TrueValue) String

func (x *Condition_TrueValue) String() string

type Condition_TrueValueCondition

type Condition_TrueValueCondition struct {
	TrueValueCondition *Condition_TrueValue `protobuf:"bytes,3,opt,name=true_value_condition,json=trueValueCondition,oneof"`
}

type Node

type Node struct {

	// Next ID: 6
	// Label value. Might be unspecified for non-leaf nodes.
	//
	// Types that are assignable to Output:
	//	*Node_Classifier
	//	*Node_Regressor
	//	*Node_Uplift
	Output isNode_Output `protobuf_oneof:"output"`
	// Branching condition to the children. If not specified, this node is a leaf.
	Condition *NodeCondition `protobuf:"bytes,3,opt,name=condition" json:"condition,omitempty"`
	// Number of positive examples (non-weighted) that reached this node during
	// training.
	NumPosTrainingExamplesWithoutWeight *int64 `` /* 168-byte string literal not displayed */
	// contains filtered or unexported fields
}

Node in a decision tree (without the information about the children).

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetClassifier

func (x *Node) GetClassifier() *NodeClassifierOutput

func (*Node) GetCondition

func (x *Node) GetCondition() *NodeCondition

func (*Node) GetNumPosTrainingExamplesWithoutWeight

func (x *Node) GetNumPosTrainingExamplesWithoutWeight() int64

func (*Node) GetOutput

func (m *Node) GetOutput() isNode_Output

func (*Node) GetRegressor

func (x *Node) GetRegressor() *NodeRegressorOutput

func (*Node) GetUplift

func (x *Node) GetUplift() *NodeUpliftOutput

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

func (x *Node) ProtoReflect() protoreflect.Message

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type NodeClassifierOutput

type NodeClassifierOutput struct {

	// Next ID: 3
	// Label value.
	TopValue *int32 `protobuf:"varint,1,opt,name=top_value,json=topValue" json:"top_value,omitempty"`
	// Distribution of label values. The most frequent value is "top_value".
	Distribution *proto.IntegerDistributionDouble `protobuf:"bytes,2,opt,name=distribution" json:"distribution,omitempty"`
	// contains filtered or unexported fields
}

Output of a node in a classification tree.

func (*NodeClassifierOutput) Descriptor deprecated

func (*NodeClassifierOutput) Descriptor() ([]byte, []int)

Deprecated: Use NodeClassifierOutput.ProtoReflect.Descriptor instead.

func (*NodeClassifierOutput) GetDistribution

func (*NodeClassifierOutput) GetTopValue

func (x *NodeClassifierOutput) GetTopValue() int32

func (*NodeClassifierOutput) ProtoMessage

func (*NodeClassifierOutput) ProtoMessage()

func (*NodeClassifierOutput) ProtoReflect

func (x *NodeClassifierOutput) ProtoReflect() protoreflect.Message

func (*NodeClassifierOutput) Reset

func (x *NodeClassifierOutput) Reset()

func (*NodeClassifierOutput) String

func (x *NodeClassifierOutput) String() string

type NodeCondition

type NodeCondition struct {

	// Next ID: 9
	// Evaluation value of this condition in case of a NA (i.e. missing) value.
	NaValue *bool `protobuf:"varint,1,opt,name=na_value,json=naValue" json:"na_value,omitempty"`
	// Attribute on which the condition applies.
	Attribute *int32 `protobuf:"varint,2,opt,name=attribute" json:"attribute,omitempty"`
	// If the condition is not set, this node is a leaf node.
	Condition *Condition `protobuf:"bytes,3,opt,name=condition" json:"condition,omitempty"`
	// Number of examples (non-weighted) that reached this node during training.
	NumTrainingExamplesWithoutWeight *int64 `` /* 157-byte string literal not displayed */
	// Number of examples (weighted) that reached this node during training.
	NumTrainingExamplesWithWeight *float64 `` /* 149-byte string literal not displayed */
	// Score attached to the split.
	SplitScore *float32 `protobuf:"fixed32,6,opt,name=split_score,json=splitScore,def=0" json:"split_score,omitempty"`
	// Number of positive examples (non-weighted) that reached this node during
	// training.
	NumPosTrainingExamplesWithoutWeight *int64 `` /* 168-byte string literal not displayed */
	// Number of positive examples (weighted) that reached this node during
	// training.
	NumPosTrainingExamplesWithWeight *float64 `` /* 160-byte string literal not displayed */
	// contains filtered or unexported fields
}

Binary condition attached to a non-leaf node.

func (*NodeCondition) Descriptor deprecated

func (*NodeCondition) Descriptor() ([]byte, []int)

Deprecated: Use NodeCondition.ProtoReflect.Descriptor instead.

func (*NodeCondition) GetAttribute

func (x *NodeCondition) GetAttribute() int32

func (*NodeCondition) GetCondition

func (x *NodeCondition) GetCondition() *Condition

func (*NodeCondition) GetNaValue

func (x *NodeCondition) GetNaValue() bool

func (*NodeCondition) GetNumPosTrainingExamplesWithWeight

func (x *NodeCondition) GetNumPosTrainingExamplesWithWeight() float64

func (*NodeCondition) GetNumPosTrainingExamplesWithoutWeight

func (x *NodeCondition) GetNumPosTrainingExamplesWithoutWeight() int64

func (*NodeCondition) GetNumTrainingExamplesWithWeight

func (x *NodeCondition) GetNumTrainingExamplesWithWeight() float64

func (*NodeCondition) GetNumTrainingExamplesWithoutWeight

func (x *NodeCondition) GetNumTrainingExamplesWithoutWeight() int64

func (*NodeCondition) GetSplitScore

func (x *NodeCondition) GetSplitScore() float32

func (*NodeCondition) ProtoMessage

func (*NodeCondition) ProtoMessage()

func (*NodeCondition) ProtoReflect

func (x *NodeCondition) ProtoReflect() protoreflect.Message

func (*NodeCondition) Reset

func (x *NodeCondition) Reset()

func (*NodeCondition) String

func (x *NodeCondition) String() string

type NodeRegressorOutput

type NodeRegressorOutput struct {

	// Next ID: 6
	// Label value.
	TopValue *float32 `protobuf:"fixed32,1,opt,name=top_value,json=topValue" json:"top_value,omitempty"`
	// Distribution of label values. The mean is "top_value".
	Distribution *proto.NormalDistributionDouble `protobuf:"bytes,2,opt,name=distribution" json:"distribution,omitempty"`
	// Statistics of hessian splits.
	SumGradients *float64 `protobuf:"fixed64,3,opt,name=sum_gradients,json=sumGradients" json:"sum_gradients,omitempty"`
	SumHessians  *float64 `protobuf:"fixed64,4,opt,name=sum_hessians,json=sumHessians" json:"sum_hessians,omitempty"`
	SumWeights   *float64 `protobuf:"fixed64,5,opt,name=sum_weights,json=sumWeights" json:"sum_weights,omitempty"`
	// contains filtered or unexported fields
}

Output of a node in a regression tree.

func (*NodeRegressorOutput) Descriptor deprecated

func (*NodeRegressorOutput) Descriptor() ([]byte, []int)

Deprecated: Use NodeRegressorOutput.ProtoReflect.Descriptor instead.

func (*NodeRegressorOutput) GetDistribution

func (x *NodeRegressorOutput) GetDistribution() *proto.NormalDistributionDouble

func (*NodeRegressorOutput) GetSumGradients

func (x *NodeRegressorOutput) GetSumGradients() float64

func (*NodeRegressorOutput) GetSumHessians

func (x *NodeRegressorOutput) GetSumHessians() float64

func (*NodeRegressorOutput) GetSumWeights

func (x *NodeRegressorOutput) GetSumWeights() float64

func (*NodeRegressorOutput) GetTopValue

func (x *NodeRegressorOutput) GetTopValue() float32

func (*NodeRegressorOutput) ProtoMessage

func (*NodeRegressorOutput) ProtoMessage()

func (*NodeRegressorOutput) ProtoReflect

func (x *NodeRegressorOutput) ProtoReflect() protoreflect.Message

func (*NodeRegressorOutput) Reset

func (x *NodeRegressorOutput) Reset()

func (*NodeRegressorOutput) String

func (x *NodeRegressorOutput) String() string

type NodeUpliftOutput

type NodeUpliftOutput struct {

	// Weighted number of examples.
	SumWeights *float64 `protobuf:"fixed64,1,opt,name=sum_weights,json=sumWeights" json:"sum_weights,omitempty"`
	// Currently, the code only support binary categorical or regressive outcomes.
	SumWeightsPerTreatment []float64 `` /* 133-byte string literal not displayed */
	// Number of examples for each outcome (major) and each treatment (minor).
	// In the case of categorical outcome, exclude the zero outcome. For example,
	// in case of binary treatment, "sum_weights_per_treatment_and_outcome"
	// contains one value for each treatment. In the case of numerical outcome,
	// "sum_weights_per_treatment_and_outcome" is the weighted sum of the
	// outcomes.
	//
	// Currently, the code only supports binary categorical or regressive outcome.
	SumWeightsPerTreatmentAndOutcome []float64 `` /* 167-byte string literal not displayed */
	// treatment_effect[i] is the effect of the "i+1"-th treatment (categorical
	// value i+2) compared to the control group (0-th treatment; categorical
	// value = 1). The treatment out-of-vocabulary item (value = 0) is not taken
	// into account.
	TreatmentEffect []float32 `protobuf:"fixed32,4,rep,packed,name=treatment_effect,json=treatmentEffect" json:"treatment_effect,omitempty"`
	// Number of examples in each treatment. Not weighted.
	NumExamplesPerTreatment []int64 `` /* 135-byte string literal not displayed */
	// contains filtered or unexported fields
}

Output of a node in an uplift tree with either binary categorical or numerical outcome.

The fields have the same definition as the fields in the message "UpliftCategoricalLabelDistribution".

func (*NodeUpliftOutput) Descriptor deprecated

func (*NodeUpliftOutput) Descriptor() ([]byte, []int)

Deprecated: Use NodeUpliftOutput.ProtoReflect.Descriptor instead.

func (*NodeUpliftOutput) GetNumExamplesPerTreatment

func (x *NodeUpliftOutput) GetNumExamplesPerTreatment() []int64

func (*NodeUpliftOutput) GetSumWeights

func (x *NodeUpliftOutput) GetSumWeights() float64

func (*NodeUpliftOutput) GetSumWeightsPerTreatment

func (x *NodeUpliftOutput) GetSumWeightsPerTreatment() []float64

func (*NodeUpliftOutput) GetSumWeightsPerTreatmentAndOutcome

func (x *NodeUpliftOutput) GetSumWeightsPerTreatmentAndOutcome() []float64

func (*NodeUpliftOutput) GetTreatmentEffect

func (x *NodeUpliftOutput) GetTreatmentEffect() []float32

func (*NodeUpliftOutput) ProtoMessage

func (*NodeUpliftOutput) ProtoMessage()

func (*NodeUpliftOutput) ProtoReflect

func (x *NodeUpliftOutput) ProtoReflect() protoreflect.Message

func (*NodeUpliftOutput) Reset

func (x *NodeUpliftOutput) Reset()

func (*NodeUpliftOutput) String

func (x *NodeUpliftOutput) String() string

type Node_Classifier

type Node_Classifier struct {
	Classifier *NodeClassifierOutput `protobuf:"bytes,1,opt,name=classifier,oneof"`
}

type Node_Regressor

type Node_Regressor struct {
	Regressor *NodeRegressorOutput `protobuf:"bytes,2,opt,name=regressor,oneof"`
}

type Node_Uplift

type Node_Uplift struct {
	Uplift *NodeUpliftOutput `protobuf:"bytes,5,opt,name=uplift,oneof"`
}

Jump to

Keyboard shortcuts

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