Genetic Algorithm - Variable Tolerance

3 ビュー (過去 30 日間)
PJ
PJ 2013 年 7 月 25 日
Hello,
I was wondering if it is possible to define the precision of my optimization variables when using genetic algorithms. At the moment I get results with a lot more decimal places than I actually need.
Thanks.

採用された回答

Alan Weiss
Alan Weiss 2013 年 7 月 25 日
You can certainly set the TolFun tolerance to something larger than the default, perhaps 1e-4. But that would not necessarily get you different precision, it just allows the algorithm to stop earlier.
By default, ga uses double-precision floating point numbers. You are free to use any data type you like, but then you have to write your own creation, mutation, and crossover functions. See the genetic algorithm options.
Alan Weiss
MATLAB mathematical toolbox documentation

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGenetic Algorithm についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by