47
votes
What are some common issues with fitting functions to data?
First, let's enumerate some of the functions:
Fit[] is the simplest of fitting functions. It has been introduced in v5, and hasn't been updated since v6 (as of v11)...
46
votes
Is manual adjustment of AccuracyGoal and PrecisionGoal useless?
Introduction
The first section below can be found in standard numerical analysis textbooks. Most current textbooks seem to assume a working environment such as MATLAB or a programming language such C, ...
21
votes
Accepted
Custom atomic expressions - modern tutorial
I have a new package for speeding up the construction of things like these which I discuss at the end
Atomic vs Valid
These are two related but distinct concepts. The former indicates that we can't ...
18
votes
Unexpected behaviors in built-in functions
...Q functions that can return something else than True or False
TL;DR;
Those exceptions ...
Community wiki
15
votes
How to use the Testing Notebook to test a package without shadowing?
What R.M. answer means is that Get as a part of the test will not help. The reason is that the content is parsed before Get is ...
14
votes
What are the most common pitfalls awaiting new users?
How to work always in WYSIWYG mode?
How to get in PDF format exactly what I see in my Notebook?
It is counterintuitive and undocumented, but Mathematica by default prints to PostScript printers and ...
Community wiki
13
votes
What are some common issues with fitting functions to data?
@Feyre's answer is excellent. I would add the following two items:
1. Overparameterizing a model.
When a model has parameters that are not estimable, errors and convergence problems arise. For ...
12
votes
What are the most common pitfalls awaiting new users?
Omitting ; can cause unexpected results in functions
A missing ; somewhere inside a function is my number one reason for time-consuming debugging because there are no error messages indicating that ...
Community wiki
12
votes
Accepted
How are Accuracy and Precision related Mathematica for a given operation?
Precision is the principal representation of numerical error
Except for numbers that are equal to zero, error in arbitrary-precision numbers is stored internally as its precision. For numbers equal ...
11
votes
Q&A Mathematica v.11 Neural Networks: A comprehensive look at Layers, Net Functions, and pioneering into this [[experimental]] code
Since DeconvolutionLayer did not receive much attention in the previous answers I'd like to present an application for it that maybe illustrates what it does.
Take ...
11
votes
Is manual adjustment of AccuracyGoal and PrecisionGoal useless?
Though AccuracyGoal and PrecisionGoal are subtle, there do exist cases in which manual adjustment of them is not useless:
https:/...
11
votes
Is building an event-based parser possible/reasonable in Mathematica (WL)?
Note:
If you want this type of parser added for JSON, I think WRI could do it easily. They already have Developer`ReadRawJSONStream so I think adding some event-...
10
votes
What are the most common pitfalls awaiting new users?
In symbolic algebra, x[1] is quite different from x1. This one-liner avoids problems and gets nice subscript formatting.
...
Community wiki
10
votes
Different strategies to get a clean Kernel. Quit, Exit, ClearAll, Remove, CleanSlate?
PREVENTION
This is a Community Wiki answer, experienced users are welcome to add to it and correct mistakes.
Best practice is to avoid the need to clean the kernel at all, by avoiding the creation ...
10
votes
Different strategies to get a clean Kernel. Quit, Exit, ClearAll, Remove, CleanSlate?
NEW KERNEL
This is a Community Wiki answer, experienced users are welcome to add to it and correct mistakes.
To get a fresh kernel for the current notebook, one can either kill the current kernel ...
Community wiki
9
votes
How are Accuracy and Precision related Mathematica for a given operation?
Accuracy and Precision are related though RealExponent
The relation between ...
9
votes
Clean package update for API/FormFunctions on Wolfram Cloud
Edit:
For more on this Context trick see this: Importing an mx file into a context
And just as full disclosure here's a note on it circumventing ...
9
votes
Custom atomic expressions - modern tutorial
I recently had to do something just like this, but chose not to make my object AtomQ. I'm not a fan of making things AtomQ ...
8
votes
Any manual on cell grouping management?
You've got a voluminous question, so maybe this is contained in it (I did check, but I'm also dumb), but here's what I've found:
"TitleGrouping"
...
8
votes
Accepted
Begin["`Private`"] vs Module
Reading How symbol lookup actually works will teach you that your code produces such definitions:
...
8
votes
Unexpected behaviors in built-in functions
Support for Directory[]
This was always puzzling me but I'm happy to delete this answer if I'm alone in this.
TL;DR;
Functions that do NOT respect ...
8
votes
Accepted
Renaming options of custom functions while preserving backwards compatibility
You can try the following:
...
7
votes
Impact of Linkage and DistanceFunction on Agglomerate clustering
(Not an answer, but more of an advice how to build confidence in the clustering results.)
For simplicity, I am not using Agglomerate but ...
7
votes
Is manual adjustment of AccuracyGoal and PrecisionGoal useless?
PrecisionGoal/AccuracyGoal should be thought of as convergence
criteria and can have different meaning (usually documented) ...
Community wiki
7
votes
What are the most common pitfalls awaiting new users?
PerformanceGoal -> "Speed" can yield irreproducible results.
For example, the procedure doPlot below
computes a ...
Community wiki
7
votes
Mathematica style guide?
In the excellent responses above, I find that one of my favourite guidelines is missing. It concerns the case when one has to apply one function after another.
Instead of writing
...
7
votes
Impact of Linkage and DistanceFunction on Agglomerate clustering
In the spirit of Anton's answer, I'd like to present another method that can be used to evaluate clusters. This one works well also for large datasets.
The basic idea is to pick a random sample of a ...
7
votes
Renaming options of custom functions while preserving backwards compatibility
This is my new approach. It is minimally invasive in the sense that it has to redefine OptionValue to handle only the new option ...
7
votes
Renaming options of custom functions while preserving backwards compatibility
This may be more work than OP was asking to do, so in that respect it might not be an answer to the question. I think that if you are trying to do something that requires adding definitions to ...
7
votes
Hold attributes vs performance
I don't understand why you think there will be a difference in timing for your example. In both cases the head is evaluated, the data variable is evaluated, the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
guidelines × 73front-end × 10
packages × 9
functions × 7
function-construction × 7
programming × 7
dynamic × 5
gui-construction × 5
options × 5
coding-style × 5
function-comparison × 5
machine-learning × 4
functional-style × 4
documentation × 4
performance-tuning × 3
syntax × 3
scoping × 3
variable-definitions × 3
wolfram-cloud × 3
stylesheet × 3
symbols × 3
reference-request × 3
clear × 3
development × 3
graphics × 2