|
[Date Index]
[Thread Index]
[Author Index]
Re: Globally limiting precision or accuracy
- To: mathgroup at smc.vnet.net
- Subject: [mg61033] Re: [mg61010] Globally limiting precision or accuracy
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Sat, 8 Oct 2005 02:48:41 -0400 (EDT)
- References: <200510070737.DAA03251@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On Oct 7, 2005, at 3:37 AM, Lee Newman wrote:
> Dear Group,
>
> Situation
> - I have a large neural network model (my own code, not Wolfram's
> toolbox) that currently has a run time of about 20hours.
> - I am in the process of trying to profile and optimize the code
> (mostly matrix computations) to reduce the run time.
> - All of the computationas that I do are numerical.
>
> Questions
> (1) If I am not concerned about numerical accuracy beyond 3 decimal
> places for any of the computations in the model, can I improve
> performance by telling mathematica to globally restrict its
> accuracy (or
> precision) for all computations?
The most efficient method is to use machine precision, anything else
will have to use multiple CPU instructions to emulate arithmetic of
the required precision. There is no benefit to specifying a
precision of less than the machine precision unless you are computing
the values of functions such as sin and log.
> (2) If so, how do I do this? Is it as simple as setting
> $MachinePrecision=3? Is there a global way (rather than local use of
> N[]) to ensure that all computations are done numerically, and with
> machine precision?
If your inputs are all expressed with machine precision numbers they
will be used throughout. If your inputs are matrices or vectors just
make sure there's a . after every integer eg. 1., 2. etc.
Regards,
Ssezi
Prev by Date:
Re: Globally limiting precision or accuracy
Next by Date:
Re: Globally limiting precision or accuracy
Previous by thread:
Globally limiting precision or accuracy
Next by thread:
Re: Globally limiting precision or accuracy
|