is an option for various functions that specifies how long to spend doing a particular operation.
TimeGoal
is an option for various functions that specifies how long to spend doing a particular operation.
Details
- TimeGoalt specifies that around t seconds of CPU time should be spent doing a particular operation.
- TimeGoalQuantity[n,"unit"] specifies the time goal using a quantity. Possible forms for "unit" include "Seconds", "Minutes", "Hours".
- Since different computer systems run at different speeds, the same setting for TimeGoal can lead to different results on different systems.
Examples
Basic Examples (2)
Train a classifier while specifying a total training time of 5 seconds:
Classify[{1, 2, 3, 4} -> {"A", "A", "B", "B"}, TimeGoal -> 5] // AbsoluteTimingTrain a predictor while specifying a total training time of 3 seconds:
Predict[{1, 2, 3, 4} -> {1, 2, 3, 4}, TimeGoal -> Quantity[3, "Seconds"]] // AbsoluteTimingRelated Guides
History
Text
Wolfram Research (2017), TimeGoal, Wolfram Language function, https://reference.wolfram.com/language/ref/TimeGoal.html.
CMS
Wolfram Language. 2017. "TimeGoal." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/TimeGoal.html.
APA
Wolfram Language. (2017). TimeGoal. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TimeGoal.html
BibTeX
@misc{reference.wolfram_2026_timegoal, author="Wolfram Research", title="{TimeGoal}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/TimeGoal.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_timegoal, organization={Wolfram Research}, title={TimeGoal}, year={2017}, url={https://reference.wolfram.com/language/ref/TimeGoal.html}, note=[Accessed: 13-June-2026]}