
target.apidocs.com.google.api.services.bigquery.model.TrainingOptions.html Maven / Gradle / Ivy
TrainingOptions (BigQuery API v2-rev20190423-1.28.0)
com.google.api.services.bigquery.model
Class TrainingOptions
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.bigquery.model.TrainingOptions
-
public final class TrainingOptions
extends com.google.api.client.json.GenericJson
Model definition for TrainingOptions.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the BigQuery API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
TrainingOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
TrainingOptions
clone()
String
getDataSplitColumn()
The column to split data with.
Double
getDataSplitEvalFraction()
The fraction of evaluation data over the whole input data.
String
getDataSplitMethod()
The data split type for training and evaluation, e.g.
String
getDistanceType()
[Beta] Distance type for clustering models.
Boolean
getEarlyStop()
Whether to stop early when the loss doesn't improve significantly any more (compared to
min_relative_progress).
Double
getInitialLearnRate()
Specifies the initial learning rate for line search to start at.
List<String>
getInputLabelColumns()
Name of input label columns in training data.
Double
getL1Regularization()
L1 regularization coefficient.
Double
getL2Regularization()
L2 regularization coefficient.
Map<String,Double>
getLabelClassWeights()
Weights associated with each label class, for rebalancing the training data.
Double
getLearnRate()
Learning rate in training.
String
getLearnRateStrategy()
The strategy to determine learning rate.
String
getLossType()
Type of loss function used during training run.
Long
getMaxIterations()
The maximum number of iterations in training.
Double
getMinRelativeProgress()
When early_stop is true, stops training when accuracy improvement is less than
'min_relative_progress'.
Long
getNumClusters()
[Beta] Number of clusters for clustering models.
Boolean
getWarmStart()
Whether to train a model from the last checkpoint.
TrainingOptions
set(String fieldName,
Object value)
TrainingOptions
setDataSplitColumn(String dataSplitColumn)
The column to split data with.
TrainingOptions
setDataSplitEvalFraction(Double dataSplitEvalFraction)
The fraction of evaluation data over the whole input data.
TrainingOptions
setDataSplitMethod(String dataSplitMethod)
The data split type for training and evaluation, e.g.
TrainingOptions
setDistanceType(String distanceType)
[Beta] Distance type for clustering models.
TrainingOptions
setEarlyStop(Boolean earlyStop)
Whether to stop early when the loss doesn't improve significantly any more (compared to
min_relative_progress).
TrainingOptions
setInitialLearnRate(Double initialLearnRate)
Specifies the initial learning rate for line search to start at.
TrainingOptions
setInputLabelColumns(List<String> inputLabelColumns)
Name of input label columns in training data.
TrainingOptions
setL1Regularization(Double l1Regularization)
L1 regularization coefficient.
TrainingOptions
setL2Regularization(Double l2Regularization)
L2 regularization coefficient.
TrainingOptions
setLabelClassWeights(Map<String,Double> labelClassWeights)
Weights associated with each label class, for rebalancing the training data.
TrainingOptions
setLearnRate(Double learnRate)
Learning rate in training.
TrainingOptions
setLearnRateStrategy(String learnRateStrategy)
The strategy to determine learning rate.
TrainingOptions
setLossType(String lossType)
Type of loss function used during training run.
TrainingOptions
setMaxIterations(Long maxIterations)
The maximum number of iterations in training.
TrainingOptions
setMinRelativeProgress(Double minRelativeProgress)
When early_stop is true, stops training when accuracy improvement is less than
'min_relative_progress'.
TrainingOptions
setNumClusters(Long numClusters)
[Beta] Number of clusters for clustering models.
TrainingOptions
setWarmStart(Boolean warmStart)
Whether to train a model from the last checkpoint.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getDataSplitColumn
public String getDataSplitColumn()
The column to split data with. This column won't be used as a feature. 1. When
data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true
value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the
first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are
used as training data, and the rest are eval data. It respects the order in Orderable data
types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-
properties
- Returns:
- value or
null
for none
-
setDataSplitColumn
public TrainingOptions setDataSplitColumn(String dataSplitColumn)
The column to split data with. This column won't be used as a feature. 1. When
data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true
value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the
first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are
used as training data, and the rest are eval data. It respects the order in Orderable data
types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-
properties
- Parameters:
dataSplitColumn
- dataSplitColumn or null
for none
-
getDataSplitEvalFraction
public Double getDataSplitEvalFraction()
The fraction of evaluation data over the whole input data. The rest of data will be used as
training data. The format should be double. Accurate to two decimal places. Default value is
0.2.
- Returns:
- value or
null
for none
-
setDataSplitEvalFraction
public TrainingOptions setDataSplitEvalFraction(Double dataSplitEvalFraction)
The fraction of evaluation data over the whole input data. The rest of data will be used as
training data. The format should be double. Accurate to two decimal places. Default value is
0.2.
- Parameters:
dataSplitEvalFraction
- dataSplitEvalFraction or null
for none
-
getDataSplitMethod
public String getDataSplitMethod()
The data split type for training and evaluation, e.g. RANDOM.
- Returns:
- value or
null
for none
-
setDataSplitMethod
public TrainingOptions setDataSplitMethod(String dataSplitMethod)
The data split type for training and evaluation, e.g. RANDOM.
- Parameters:
dataSplitMethod
- dataSplitMethod or null
for none
-
getDistanceType
public String getDistanceType()
[Beta] Distance type for clustering models.
- Returns:
- value or
null
for none
-
setDistanceType
public TrainingOptions setDistanceType(String distanceType)
[Beta] Distance type for clustering models.
- Parameters:
distanceType
- distanceType or null
for none
-
getEarlyStop
public Boolean getEarlyStop()
Whether to stop early when the loss doesn't improve significantly any more (compared to
min_relative_progress).
- Returns:
- value or
null
for none
-
setEarlyStop
public TrainingOptions setEarlyStop(Boolean earlyStop)
Whether to stop early when the loss doesn't improve significantly any more (compared to
min_relative_progress).
- Parameters:
earlyStop
- earlyStop or null
for none
-
getInitialLearnRate
public Double getInitialLearnRate()
Specifies the initial learning rate for line search to start at.
- Returns:
- value or
null
for none
-
setInitialLearnRate
public TrainingOptions setInitialLearnRate(Double initialLearnRate)
Specifies the initial learning rate for line search to start at.
- Parameters:
initialLearnRate
- initialLearnRate or null
for none
-
getInputLabelColumns
public List<String> getInputLabelColumns()
Name of input label columns in training data.
- Returns:
- value or
null
for none
-
setInputLabelColumns
public TrainingOptions setInputLabelColumns(List<String> inputLabelColumns)
Name of input label columns in training data.
- Parameters:
inputLabelColumns
- inputLabelColumns or null
for none
-
getL1Regularization
public Double getL1Regularization()
L1 regularization coefficient.
- Returns:
- value or
null
for none
-
setL1Regularization
public TrainingOptions setL1Regularization(Double l1Regularization)
L1 regularization coefficient.
- Parameters:
l1Regularization
- l1Regularization or null
for none
-
getL2Regularization
public Double getL2Regularization()
L2 regularization coefficient.
- Returns:
- value or
null
for none
-
setL2Regularization
public TrainingOptions setL2Regularization(Double l2Regularization)
L2 regularization coefficient.
- Parameters:
l2Regularization
- l2Regularization or null
for none
-
getLabelClassWeights
public Map<String,Double> getLabelClassWeights()
Weights associated with each label class, for rebalancing the training data.
- Returns:
- value or
null
for none
-
setLabelClassWeights
public TrainingOptions setLabelClassWeights(Map<String,Double> labelClassWeights)
Weights associated with each label class, for rebalancing the training data.
- Parameters:
labelClassWeights
- labelClassWeights or null
for none
-
getLearnRate
public Double getLearnRate()
Learning rate in training.
- Returns:
- value or
null
for none
-
setLearnRate
public TrainingOptions setLearnRate(Double learnRate)
Learning rate in training.
- Parameters:
learnRate
- learnRate or null
for none
-
getLearnRateStrategy
public String getLearnRateStrategy()
The strategy to determine learning rate.
- Returns:
- value or
null
for none
-
setLearnRateStrategy
public TrainingOptions setLearnRateStrategy(String learnRateStrategy)
The strategy to determine learning rate.
- Parameters:
learnRateStrategy
- learnRateStrategy or null
for none
-
getLossType
public String getLossType()
Type of loss function used during training run.
- Returns:
- value or
null
for none
-
setLossType
public TrainingOptions setLossType(String lossType)
Type of loss function used during training run.
- Parameters:
lossType
- lossType or null
for none
-
getMaxIterations
public Long getMaxIterations()
The maximum number of iterations in training.
- Returns:
- value or
null
for none
-
setMaxIterations
public TrainingOptions setMaxIterations(Long maxIterations)
The maximum number of iterations in training.
- Parameters:
maxIterations
- maxIterations or null
for none
-
getMinRelativeProgress
public Double getMinRelativeProgress()
When early_stop is true, stops training when accuracy improvement is less than
'min_relative_progress'.
- Returns:
- value or
null
for none
-
setMinRelativeProgress
public TrainingOptions setMinRelativeProgress(Double minRelativeProgress)
When early_stop is true, stops training when accuracy improvement is less than
'min_relative_progress'.
- Parameters:
minRelativeProgress
- minRelativeProgress or null
for none
-
getNumClusters
public Long getNumClusters()
[Beta] Number of clusters for clustering models.
- Returns:
- value or
null
for none
-
setNumClusters
public TrainingOptions setNumClusters(Long numClusters)
[Beta] Number of clusters for clustering models.
- Parameters:
numClusters
- numClusters or null
for none
-
getWarmStart
public Boolean getWarmStart()
Whether to train a model from the last checkpoint.
- Returns:
- value or
null
for none
-
setWarmStart
public TrainingOptions setWarmStart(Boolean warmStart)
Whether to train a model from the last checkpoint.
- Parameters:
warmStart
- warmStart or null
for none
-
set
public TrainingOptions set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public TrainingOptions clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2019 Google. All rights reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy