proto

package
v0.0.0-...-d1695c4 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

tensorflow/contrib/tensor_forest/proto/fertile_stats.proto
tensorflow/contrib/tensor_forest/proto/tensor_forest_params.proto

It has these top-level messages:

FertileStats
GiniStats
LeafStat
FertileSlot
SplitCandidate
SplitPruningConfig
SplitFinishConfig
LinearParam
ExponentialParam
ThresholdParam
DepthDependentParam
TensorForestParams

Index

Constants

This section is empty.

Variables

View Source
var LeafModelType_name = map[int32]string{
	0: "MODEL_DENSE_CLASSIFICATION",
	1: "MODEL_SPARSE_CLASSIFICATION",
	2: "MODEL_REGRESSION",
	3: "MODEL_SPARSE_OR_DENSE_CLASSIFICATION",
}
View Source
var LeafModelType_value = map[string]int32{
	"MODEL_DENSE_CLASSIFICATION":           0,
	"MODEL_SPARSE_CLASSIFICATION":          1,
	"MODEL_REGRESSION":                     2,
	"MODEL_SPARSE_OR_DENSE_CLASSIFICATION": 3,
}
View Source
var SplitCollectionType_name = map[int32]string{
	0: "COLLECTION_BASIC",
	1: "GRAPH_RUNNER_COLLECTION",
}
View Source
var SplitCollectionType_value = map[string]int32{
	"COLLECTION_BASIC":        0,
	"GRAPH_RUNNER_COLLECTION": 1,
}
View Source
var SplitFinishStrategyType_name = map[int32]string{
	0: "SPLIT_FINISH_BASIC",
	2: "SPLIT_FINISH_DOMINATE_HOEFFDING",
	3: "SPLIT_FINISH_DOMINATE_BOOTSTRAP",
}
View Source
var SplitFinishStrategyType_value = map[string]int32{
	"SPLIT_FINISH_BASIC":              0,
	"SPLIT_FINISH_DOMINATE_HOEFFDING": 2,
	"SPLIT_FINISH_DOMINATE_BOOTSTRAP": 3,
}
View Source
var SplitPruningStrategyType_name = map[int32]string{
	0: "SPLIT_PRUNE_NONE",
	1: "SPLIT_PRUNE_HALF",
	2: "SPLIT_PRUNE_QUARTER",
	3: "SPLIT_PRUNE_10_PERCENT",
	4: "SPLIT_PRUNE_HOEFFDING",
}
View Source
var SplitPruningStrategyType_value = map[string]int32{
	"SPLIT_PRUNE_NONE":       0,
	"SPLIT_PRUNE_HALF":       1,
	"SPLIT_PRUNE_QUARTER":    2,
	"SPLIT_PRUNE_10_PERCENT": 3,
	"SPLIT_PRUNE_HOEFFDING":  4,
}
View Source
var StatsModelType_name = map[int32]string{
	0: "STATS_DENSE_GINI",
	1: "STATS_SPARSE_GINI",
	2: "STATS_LEAST_SQUARES_REGRESSION",
	3: "STATS_SPARSE_THEN_DENSE_GINI",
}
View Source
var StatsModelType_value = map[string]int32{
	"STATS_DENSE_GINI":               0,
	"STATS_SPARSE_GINI":              1,
	"STATS_LEAST_SQUARES_REGRESSION": 2,
	"STATS_SPARSE_THEN_DENSE_GINI":   3,
}

Functions

This section is empty.

Types

type DepthDependentParam

type DepthDependentParam struct {
	// Types that are valid to be assigned to ParamType:
	//	*DepthDependentParam_ConstantValue
	//	*DepthDependentParam_Linear
	//	*DepthDependentParam_Exponential
	//	*DepthDependentParam_Threshold
	ParamType isDepthDependentParam_ParamType `protobuf_oneof:"ParamType"`
}

A parameter that may change with node depth.

func (*DepthDependentParam) Descriptor

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

func (*DepthDependentParam) GetConstantValue

func (m *DepthDependentParam) GetConstantValue() float32

func (*DepthDependentParam) GetExponential

func (m *DepthDependentParam) GetExponential() *ExponentialParam

func (*DepthDependentParam) GetLinear

func (m *DepthDependentParam) GetLinear() *LinearParam

func (*DepthDependentParam) GetParamType

func (m *DepthDependentParam) GetParamType() isDepthDependentParam_ParamType

func (*DepthDependentParam) GetThreshold

func (m *DepthDependentParam) GetThreshold() *ThresholdParam

func (*DepthDependentParam) ProtoMessage

func (*DepthDependentParam) ProtoMessage()

func (*DepthDependentParam) Reset

func (m *DepthDependentParam) Reset()

func (*DepthDependentParam) String

func (m *DepthDependentParam) String() string

func (*DepthDependentParam) XXX_OneofFuncs

func (*DepthDependentParam) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type DepthDependentParam_ConstantValue

type DepthDependentParam_ConstantValue struct {
	ConstantValue float32 `protobuf:"fixed32,1,opt,name=constant_value,json=constantValue,oneof"`
}

type DepthDependentParam_Exponential

type DepthDependentParam_Exponential struct {
	Exponential *ExponentialParam `protobuf:"bytes,3,opt,name=exponential,oneof"`
}

type DepthDependentParam_Linear

type DepthDependentParam_Linear struct {
	Linear *LinearParam `protobuf:"bytes,2,opt,name=linear,oneof"`
}

type DepthDependentParam_Threshold

type DepthDependentParam_Threshold struct {
	Threshold *ThresholdParam `protobuf:"bytes,4,opt,name=threshold,oneof"`
}

type ExponentialParam

type ExponentialParam struct {
	Bias            float32 `protobuf:"fixed32,1,opt,name=bias" json:"bias,omitempty"`
	Base            float32 `protobuf:"fixed32,2,opt,name=base" json:"base,omitempty"`
	Multiplier      float32 `protobuf:"fixed32,3,opt,name=multiplier" json:"multiplier,omitempty"`
	DepthMultiplier float32 `protobuf:"fixed32,4,opt,name=depth_multiplier,json=depthMultiplier" json:"depth_multiplier,omitempty"`
}

A parameter that changes expoentially with the form

f = c + mb^(k*d)

where:

c: constant bias
b: base
m: multiplier
k: depth multiplier
d: depth

func (*ExponentialParam) Descriptor

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

func (*ExponentialParam) GetBase

func (m *ExponentialParam) GetBase() float32

func (*ExponentialParam) GetBias

func (m *ExponentialParam) GetBias() float32

func (*ExponentialParam) GetDepthMultiplier

func (m *ExponentialParam) GetDepthMultiplier() float32

func (*ExponentialParam) GetMultiplier

func (m *ExponentialParam) GetMultiplier() float32

func (*ExponentialParam) ProtoMessage

func (*ExponentialParam) ProtoMessage()

func (*ExponentialParam) Reset

func (m *ExponentialParam) Reset()

func (*ExponentialParam) String

func (m *ExponentialParam) String() string

type FertileSlot

type FertileSlot struct {
	// The statistics for *all* the examples seen at this leaf.
	LeafStats  *LeafStat         `protobuf:"bytes,4,opt,name=leaf_stats,json=leafStats" json:"leaf_stats,omitempty"`
	Candidates []*SplitCandidate `protobuf:"bytes,1,rep,name=candidates" json:"candidates,omitempty"`
	// The statistics for the examples seen at this leaf after all the
	// splits have been initialized.  If post_init_leaf_stats.weight_sum
	// is > 0, then all candidates have been initialized.  We need to track
	// both leaf_stats and post_init_leaf_stats because the first is used
	// to create the decision_tree::Leaf and the second is used to infer
	// the statistics for the right side of a split (given the leaf side
	// stats).
	PostInitLeafStats *LeafStat `protobuf:"bytes,6,opt,name=post_init_leaf_stats,json=postInitLeafStats" json:"post_init_leaf_stats,omitempty"`
	NodeId            int32     `protobuf:"varint,5,opt,name=node_id,json=nodeId" json:"node_id,omitempty"`
	Depth             int32     `protobuf:"varint,7,opt,name=depth" json:"depth,omitempty"`
}

func (*FertileSlot) Descriptor

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

func (*FertileSlot) GetCandidates

func (m *FertileSlot) GetCandidates() []*SplitCandidate

func (*FertileSlot) GetDepth

func (m *FertileSlot) GetDepth() int32

func (*FertileSlot) GetLeafStats

func (m *FertileSlot) GetLeafStats() *LeafStat

func (*FertileSlot) GetNodeId

func (m *FertileSlot) GetNodeId() int32

func (*FertileSlot) GetPostInitLeafStats

func (m *FertileSlot) GetPostInitLeafStats() *LeafStat

func (*FertileSlot) ProtoMessage

func (*FertileSlot) ProtoMessage()

func (*FertileSlot) Reset

func (m *FertileSlot) Reset()

func (*FertileSlot) String

func (m *FertileSlot) String() string

type FertileStats

type FertileStats struct {
	// Tracks stats for each node.  node_to_slot[i] is the FertileSlot for node i.
	// This may be sized to max_nodes initially, or grow dynamically as needed.
	NodeToSlot []*FertileSlot `protobuf:"bytes,1,rep,name=node_to_slot,json=nodeToSlot" json:"node_to_slot,omitempty"`
}

func (*FertileStats) Descriptor

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

func (*FertileStats) GetNodeToSlot

func (m *FertileStats) GetNodeToSlot() []*FertileSlot

func (*FertileStats) ProtoMessage

func (*FertileStats) ProtoMessage()

func (*FertileStats) Reset

func (m *FertileStats) Reset()

func (*FertileStats) String

func (m *FertileStats) String() string

type GiniStats

type GiniStats struct {
	// This allows us to quickly track and calculate impurity (classification)
	//  by storing the sum of input weights and the sum of the squares of the
	// input weights.  Weighted gini is then: 1 - (square / sum * sum).
	// Updates to these numbers are:
	//   old_i = leaf->value(label)
	//   new_i = old_i + incoming_weight
	//   sum -> sum + incoming_weight
	//   square -> square - (old_i ^ 2) + (new_i ^ 2)
	//   total_left_sum -> total_left_sum - old_left_i * old_total_i +
	//                                      new_left_i * new_total_i
	Square float32 `protobuf:"fixed32,2,opt,name=square" json:"square,omitempty"`
}

func (*GiniStats) Descriptor

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

func (*GiniStats) GetSquare

func (m *GiniStats) GetSquare() float32

func (*GiniStats) ProtoMessage

func (*GiniStats) ProtoMessage()

func (*GiniStats) Reset

func (m *GiniStats) Reset()

func (*GiniStats) String

func (m *GiniStats) String() string

type LeafModelType

type LeafModelType int32

Leaf models specify what is returned at inference time, and how it is stored in the decision_trees.Leaf protos.

const (
	LeafModelType_MODEL_DENSE_CLASSIFICATION           LeafModelType = 0
	LeafModelType_MODEL_SPARSE_CLASSIFICATION          LeafModelType = 1
	LeafModelType_MODEL_REGRESSION                     LeafModelType = 2
	LeafModelType_MODEL_SPARSE_OR_DENSE_CLASSIFICATION LeafModelType = 3
)

func (LeafModelType) EnumDescriptor

func (LeafModelType) EnumDescriptor() ([]byte, []int)

func (LeafModelType) String

func (x LeafModelType) String() string

type LeafStat

type LeafStat struct {
	// The sum of the weights of the training examples that we have seen.
	// This is here, outside of the leaf_stat oneof, because almost all
	// types will want it.
	WeightSum float32 `protobuf:"fixed32,3,opt,name=weight_sum,json=weightSum" json:"weight_sum,omitempty"`
	// Types that are valid to be assigned to LeafStat:
	//	*LeafStat_Classification
	//	*LeafStat_Regression
	LeafStat isLeafStat_LeafStat `protobuf_oneof:"leaf_stat"`
}

func (*LeafStat) Descriptor

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

func (*LeafStat) GetClassification

func (m *LeafStat) GetClassification() *LeafStat_GiniImpurityClassificationStats

func (*LeafStat) GetLeafStat

func (m *LeafStat) GetLeafStat() isLeafStat_LeafStat

func (*LeafStat) GetRegression

func (m *LeafStat) GetRegression() *LeafStat_LeastSquaresRegressionStats

func (*LeafStat) GetWeightSum

func (m *LeafStat) GetWeightSum() float32

func (*LeafStat) ProtoMessage

func (*LeafStat) ProtoMessage()

func (*LeafStat) Reset

func (m *LeafStat) Reset()

func (*LeafStat) String

func (m *LeafStat) String() string

func (*LeafStat) XXX_OneofFuncs

func (*LeafStat) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type LeafStat_Classification

type LeafStat_Classification struct {
	Classification *LeafStat_GiniImpurityClassificationStats `protobuf:"bytes,1,opt,name=classification,oneof"`
}

type LeafStat_GiniImpurityClassificationStats

type LeafStat_GiniImpurityClassificationStats struct {
	// Types that are valid to be assigned to Counts:
	//	*LeafStat_GiniImpurityClassificationStats_DenseCounts
	//	*LeafStat_GiniImpurityClassificationStats_SparseCounts
	Counts isLeafStat_GiniImpurityClassificationStats_Counts `protobuf_oneof:"counts"`
	Gini   *GiniStats                                        `protobuf:"bytes,3,opt,name=gini" json:"gini,omitempty"`
}

TODO(thomaswc): Move the GiniStats out of LeafStats and into something that only tracks them for splits.

func (*LeafStat_GiniImpurityClassificationStats) Descriptor

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

func (*LeafStat_GiniImpurityClassificationStats) GetCounts

func (m *LeafStat_GiniImpurityClassificationStats) GetCounts() isLeafStat_GiniImpurityClassificationStats_Counts

func (*LeafStat_GiniImpurityClassificationStats) GetDenseCounts

func (*LeafStat_GiniImpurityClassificationStats) GetGini

func (*LeafStat_GiniImpurityClassificationStats) GetSparseCounts

func (*LeafStat_GiniImpurityClassificationStats) ProtoMessage

func (*LeafStat_GiniImpurityClassificationStats) Reset

func (*LeafStat_GiniImpurityClassificationStats) String

func (*LeafStat_GiniImpurityClassificationStats) XXX_OneofFuncs

func (*LeafStat_GiniImpurityClassificationStats) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type LeafStat_GiniImpurityClassificationStats_DenseCounts

type LeafStat_GiniImpurityClassificationStats_DenseCounts struct {
	DenseCounts *tensorflow_decision_trees.Vector `protobuf:"bytes,1,opt,name=dense_counts,json=denseCounts,oneof"`
}

type LeafStat_GiniImpurityClassificationStats_SparseCounts

type LeafStat_GiniImpurityClassificationStats_SparseCounts struct {
	SparseCounts *tensorflow_decision_trees.SparseVector `protobuf:"bytes,2,opt,name=sparse_counts,json=sparseCounts,oneof"`
}

type LeafStat_LeastSquaresRegressionStats

type LeafStat_LeastSquaresRegressionStats struct {
	MeanOutput        *tensorflow_decision_trees.Vector `protobuf:"bytes,1,opt,name=mean_output,json=meanOutput" json:"mean_output,omitempty"`
	MeanOutputSquares *tensorflow_decision_trees.Vector `protobuf:"bytes,2,opt,name=mean_output_squares,json=meanOutputSquares" json:"mean_output_squares,omitempty"`
}

This is the info needed for calculating variance for regression. Variance will still have to be summed over every output, but the number of outputs in regression problems is almost always 1.

func (*LeafStat_LeastSquaresRegressionStats) Descriptor

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

func (*LeafStat_LeastSquaresRegressionStats) GetMeanOutput

func (*LeafStat_LeastSquaresRegressionStats) GetMeanOutputSquares

func (*LeafStat_LeastSquaresRegressionStats) ProtoMessage

func (*LeafStat_LeastSquaresRegressionStats) ProtoMessage()

func (*LeafStat_LeastSquaresRegressionStats) Reset

func (*LeafStat_LeastSquaresRegressionStats) String

type LeafStat_Regression

type LeafStat_Regression struct {
	Regression *LeafStat_LeastSquaresRegressionStats `protobuf:"bytes,2,opt,name=regression,oneof"`
}

type LinearParam

type LinearParam struct {
	Slope      float32 `protobuf:"fixed32,1,opt,name=slope" json:"slope,omitempty"`
	YIntercept float32 `protobuf:"fixed32,2,opt,name=y_intercept,json=yIntercept" json:"y_intercept,omitempty"`
	MinVal     float32 `protobuf:"fixed32,3,opt,name=min_val,json=minVal" json:"min_val,omitempty"`
	MaxVal     float32 `protobuf:"fixed32,4,opt,name=max_val,json=maxVal" json:"max_val,omitempty"`
}

A parameter that changes linearly with depth, with upper and lower bounds.

func (*LinearParam) Descriptor

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

func (*LinearParam) GetMaxVal

func (m *LinearParam) GetMaxVal() float32

func (*LinearParam) GetMinVal

func (m *LinearParam) GetMinVal() float32

func (*LinearParam) GetSlope

func (m *LinearParam) GetSlope() float32

func (*LinearParam) GetYIntercept

func (m *LinearParam) GetYIntercept() float32

func (*LinearParam) ProtoMessage

func (*LinearParam) ProtoMessage()

func (*LinearParam) Reset

func (m *LinearParam) Reset()

func (*LinearParam) String

func (m *LinearParam) String() string

type SplitCandidate

type SplitCandidate struct {
	// proto representing the potential node.
	Split *tensorflow_decision_trees.BinaryNode `protobuf:"bytes,1,opt,name=split" json:"split,omitempty"`
	// Right counts are inferred from FertileSlot.leaf_stats and left.
	LeftStats *LeafStat `protobuf:"bytes,4,opt,name=left_stats,json=leftStats" json:"left_stats,omitempty"`
	// Right stats (not full counts) are kept here.
	RightStats *LeafStat `protobuf:"bytes,5,opt,name=right_stats,json=rightStats" json:"right_stats,omitempty"`
	// Fields used when training with a graph runner.
	UniqueId string `protobuf:"bytes,6,opt,name=unique_id,json=uniqueId" json:"unique_id,omitempty"`
}

func (*SplitCandidate) Descriptor

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

func (*SplitCandidate) GetLeftStats

func (m *SplitCandidate) GetLeftStats() *LeafStat

func (*SplitCandidate) GetRightStats

func (m *SplitCandidate) GetRightStats() *LeafStat

func (*SplitCandidate) GetSplit

func (*SplitCandidate) GetUniqueId

func (m *SplitCandidate) GetUniqueId() string

func (*SplitCandidate) ProtoMessage

func (*SplitCandidate) ProtoMessage()

func (*SplitCandidate) Reset

func (m *SplitCandidate) Reset()

func (*SplitCandidate) String

func (m *SplitCandidate) String() string

type SplitCollectionType

type SplitCollectionType int32

Allows selection of operations on the collection of split candidates. Basic infers right split stats from the leaf stats and each candidate's left stats.

const (
	SplitCollectionType_COLLECTION_BASIC        SplitCollectionType = 0
	SplitCollectionType_GRAPH_RUNNER_COLLECTION SplitCollectionType = 1
)

func (SplitCollectionType) EnumDescriptor

func (SplitCollectionType) EnumDescriptor() ([]byte, []int)

func (SplitCollectionType) String

func (x SplitCollectionType) String() string

type SplitFinishConfig

type SplitFinishConfig struct {
	// Configure how often we check for finish, because some finish methods
	// are expensive to perform.
	CheckEverySteps *DepthDependentParam    `protobuf:"bytes,1,opt,name=check_every_steps,json=checkEverySteps" json:"check_every_steps,omitempty"`
	Type            SplitFinishStrategyType `protobuf:"varint,2,opt,name=type,enum=tensorflow.tensorforest.SplitFinishStrategyType" json:"type,omitempty"`
}

func (*SplitFinishConfig) Descriptor

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

func (*SplitFinishConfig) GetCheckEverySteps

func (m *SplitFinishConfig) GetCheckEverySteps() *DepthDependentParam

func (*SplitFinishConfig) GetType

func (*SplitFinishConfig) ProtoMessage

func (*SplitFinishConfig) ProtoMessage()

func (*SplitFinishConfig) Reset

func (m *SplitFinishConfig) Reset()

func (*SplitFinishConfig) String

func (m *SplitFinishConfig) String() string

type SplitFinishStrategyType

type SplitFinishStrategyType int32

Finish strategies define when slots are considered finished. Basic requires at least split_after_samples, and doesn't allow slots to finish until the leaf has received more than one class. Hoeffding splits early after min_split_samples if one split is dominating the rest according to hoeffding bounds. Bootstrap does the same but compares gini's calculated with sampled smoothed counts.

const (
	SplitFinishStrategyType_SPLIT_FINISH_BASIC              SplitFinishStrategyType = 0
	SplitFinishStrategyType_SPLIT_FINISH_DOMINATE_HOEFFDING SplitFinishStrategyType = 2
	SplitFinishStrategyType_SPLIT_FINISH_DOMINATE_BOOTSTRAP SplitFinishStrategyType = 3
)

func (SplitFinishStrategyType) EnumDescriptor

func (SplitFinishStrategyType) EnumDescriptor() ([]byte, []int)

func (SplitFinishStrategyType) String

func (x SplitFinishStrategyType) String() string

type SplitPruningConfig

type SplitPruningConfig struct {
	PruneEverySamples *DepthDependentParam     `protobuf:"bytes,1,opt,name=prune_every_samples,json=pruneEverySamples" json:"prune_every_samples,omitempty"`
	Type              SplitPruningStrategyType `protobuf:"varint,2,opt,name=type,enum=tensorflow.tensorforest.SplitPruningStrategyType" json:"type,omitempty"`
}

func (*SplitPruningConfig) Descriptor

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

func (*SplitPruningConfig) GetPruneEverySamples

func (m *SplitPruningConfig) GetPruneEverySamples() *DepthDependentParam

func (*SplitPruningConfig) GetType

func (*SplitPruningConfig) ProtoMessage

func (*SplitPruningConfig) ProtoMessage()

func (*SplitPruningConfig) Reset

func (m *SplitPruningConfig) Reset()

func (*SplitPruningConfig) String

func (m *SplitPruningConfig) String() string

type SplitPruningStrategyType

type SplitPruningStrategyType int32

Pruning strategies define how candidates are pruned over time. SPLIT_PRUNE_HALF prunes the worst half of splits every prune_ever_samples, etc. Note that prune_every_samples plays against the depth-dependent split_after_samples, so they should be set together.

const (
	SplitPruningStrategyType_SPLIT_PRUNE_NONE       SplitPruningStrategyType = 0
	SplitPruningStrategyType_SPLIT_PRUNE_HALF       SplitPruningStrategyType = 1
	SplitPruningStrategyType_SPLIT_PRUNE_QUARTER    SplitPruningStrategyType = 2
	SplitPruningStrategyType_SPLIT_PRUNE_10_PERCENT SplitPruningStrategyType = 3
	// SPLIT_PRUNE_HOEFFDING prunes splits whose Gini impurity is worst than
	// the best split's by more than the Hoeffding bound.
	SplitPruningStrategyType_SPLIT_PRUNE_HOEFFDING SplitPruningStrategyType = 4
)

func (SplitPruningStrategyType) EnumDescriptor

func (SplitPruningStrategyType) EnumDescriptor() ([]byte, []int)

func (SplitPruningStrategyType) String

func (x SplitPruningStrategyType) String() string

type StatsModelType

type StatsModelType int32

Stats models generally specify information that is collected which is necessary to choose a split at a node. Specifically, they operate on a SplitCandidate::LeafStat proto.

const (
	StatsModelType_STATS_DENSE_GINI               StatsModelType = 0
	StatsModelType_STATS_SPARSE_GINI              StatsModelType = 1
	StatsModelType_STATS_LEAST_SQUARES_REGRESSION StatsModelType = 2
	StatsModelType_STATS_SPARSE_THEN_DENSE_GINI   StatsModelType = 3
)

func (StatsModelType) EnumDescriptor

func (StatsModelType) EnumDescriptor() ([]byte, []int)

func (StatsModelType) String

func (x StatsModelType) String() string

type TensorForestParams

type TensorForestParams struct {
	// ------------ Types that control training subsystems ------ //
	LeafType       LeafModelType       `protobuf:"varint,1,opt,name=leaf_type,json=leafType,enum=tensorflow.tensorforest.LeafModelType" json:"leaf_type,omitempty"`
	StatsType      StatsModelType      `` /* 126-byte string literal not displayed */
	CollectionType SplitCollectionType `` /* 146-byte string literal not displayed */
	PruningType    *SplitPruningConfig `protobuf:"bytes,4,opt,name=pruning_type,json=pruningType" json:"pruning_type,omitempty"`
	FinishType     *SplitFinishConfig  `protobuf:"bytes,5,opt,name=finish_type,json=finishType" json:"finish_type,omitempty"`
	// --------- Parameters that can't change by definition --------------- //
	NumTrees           int32                                         `protobuf:"varint,6,opt,name=num_trees,json=numTrees" json:"num_trees,omitempty"`
	MaxNodes           int32                                         `protobuf:"varint,7,opt,name=max_nodes,json=maxNodes" json:"max_nodes,omitempty"`
	NumFeatures        int32                                         `protobuf:"varint,21,opt,name=num_features,json=numFeatures" json:"num_features,omitempty"`
	InequalityTestType tensorflow_decision_trees.InequalityTest_Type `` /* 163-byte string literal not displayed */
	// Some booleans controlling execution
	IsRegression          bool `protobuf:"varint,8,opt,name=is_regression,json=isRegression" json:"is_regression,omitempty"`
	DropFinalClass        bool `protobuf:"varint,9,opt,name=drop_final_class,json=dropFinalClass" json:"drop_final_class,omitempty"`
	CollateExamples       bool `protobuf:"varint,10,opt,name=collate_examples,json=collateExamples" json:"collate_examples,omitempty"`
	CheckpointStats       bool `protobuf:"varint,11,opt,name=checkpoint_stats,json=checkpointStats" json:"checkpoint_stats,omitempty"`
	UseRunningStatsMethod bool `protobuf:"varint,20,opt,name=use_running_stats_method,json=useRunningStatsMethod" json:"use_running_stats_method,omitempty"`
	// Number of classes (classification) or targets (regression)
	NumOutputs int32 `protobuf:"varint,12,opt,name=num_outputs,json=numOutputs" json:"num_outputs,omitempty"`
	// --------- Parameters that could be depth-dependent --------------- //
	NumSplitsToConsider *DepthDependentParam `protobuf:"bytes,13,opt,name=num_splits_to_consider,json=numSplitsToConsider" json:"num_splits_to_consider,omitempty"`
	SplitAfterSamples   *DepthDependentParam `protobuf:"bytes,14,opt,name=split_after_samples,json=splitAfterSamples" json:"split_after_samples,omitempty"`
	DominateFraction    *DepthDependentParam `protobuf:"bytes,15,opt,name=dominate_fraction,json=dominateFraction" json:"dominate_fraction,omitempty"`
	MinSplitSamples     *DepthDependentParam `protobuf:"bytes,18,opt,name=min_split_samples,json=minSplitSamples" json:"min_split_samples,omitempty"`
	// --------- Parameters for experimental features ---------------------- //
	GraphDir          string `protobuf:"bytes,16,opt,name=graph_dir,json=graphDir" json:"graph_dir,omitempty"`
	NumSelectFeatures int32  `protobuf:"varint,17,opt,name=num_select_features,json=numSelectFeatures" json:"num_select_features,omitempty"`
}

func (*TensorForestParams) Descriptor

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

func (*TensorForestParams) GetCheckpointStats

func (m *TensorForestParams) GetCheckpointStats() bool

func (*TensorForestParams) GetCollateExamples

func (m *TensorForestParams) GetCollateExamples() bool

func (*TensorForestParams) GetCollectionType

func (m *TensorForestParams) GetCollectionType() SplitCollectionType

func (*TensorForestParams) GetDominateFraction

func (m *TensorForestParams) GetDominateFraction() *DepthDependentParam

func (*TensorForestParams) GetDropFinalClass

func (m *TensorForestParams) GetDropFinalClass() bool

func (*TensorForestParams) GetFinishType

func (m *TensorForestParams) GetFinishType() *SplitFinishConfig

func (*TensorForestParams) GetGraphDir

func (m *TensorForestParams) GetGraphDir() string

func (*TensorForestParams) GetInequalityTestType

func (*TensorForestParams) GetIsRegression

func (m *TensorForestParams) GetIsRegression() bool

func (*TensorForestParams) GetLeafType

func (m *TensorForestParams) GetLeafType() LeafModelType

func (*TensorForestParams) GetMaxNodes

func (m *TensorForestParams) GetMaxNodes() int32

func (*TensorForestParams) GetMinSplitSamples

func (m *TensorForestParams) GetMinSplitSamples() *DepthDependentParam

func (*TensorForestParams) GetNumFeatures

func (m *TensorForestParams) GetNumFeatures() int32

func (*TensorForestParams) GetNumOutputs

func (m *TensorForestParams) GetNumOutputs() int32

func (*TensorForestParams) GetNumSelectFeatures

func (m *TensorForestParams) GetNumSelectFeatures() int32

func (*TensorForestParams) GetNumSplitsToConsider

func (m *TensorForestParams) GetNumSplitsToConsider() *DepthDependentParam

func (*TensorForestParams) GetNumTrees

func (m *TensorForestParams) GetNumTrees() int32

func (*TensorForestParams) GetPruningType

func (m *TensorForestParams) GetPruningType() *SplitPruningConfig

func (*TensorForestParams) GetSplitAfterSamples

func (m *TensorForestParams) GetSplitAfterSamples() *DepthDependentParam

func (*TensorForestParams) GetStatsType

func (m *TensorForestParams) GetStatsType() StatsModelType

func (*TensorForestParams) GetUseRunningStatsMethod

func (m *TensorForestParams) GetUseRunningStatsMethod() bool

func (*TensorForestParams) ProtoMessage

func (*TensorForestParams) ProtoMessage()

func (*TensorForestParams) Reset

func (m *TensorForestParams) Reset()

func (*TensorForestParams) String

func (m *TensorForestParams) String() string

type ThresholdParam

type ThresholdParam struct {
	OnValue   float32 `protobuf:"fixed32,1,opt,name=on_value,json=onValue" json:"on_value,omitempty"`
	OffValue  float32 `protobuf:"fixed32,2,opt,name=off_value,json=offValue" json:"off_value,omitempty"`
	Threshold float32 `protobuf:"fixed32,3,opt,name=threshold" json:"threshold,omitempty"`
}

A parameter that is 'off' until depth >= a threshold, then is 'on'.

func (*ThresholdParam) Descriptor

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

func (*ThresholdParam) GetOffValue

func (m *ThresholdParam) GetOffValue() float32

func (*ThresholdParam) GetOnValue

func (m *ThresholdParam) GetOnValue() float32

func (*ThresholdParam) GetThreshold

func (m *ThresholdParam) GetThreshold() float32

func (*ThresholdParam) ProtoMessage

func (*ThresholdParam) ProtoMessage()

func (*ThresholdParam) Reset

func (m *ThresholdParam) Reset()

func (*ThresholdParam) String

func (m *ThresholdParam) String() string

Jump to

Keyboard shortcuts

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