Skip to main content
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)...
Feyre's user avatar
  • 8,667
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, ...
Michael E2's user avatar
  • 245k
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 ...
b3m2a1's user avatar
  • 47.1k
18 votes

Unexpected behaviors in built-in functions

...Q functions that can return something else than True or False TL;DR; Those exceptions ...
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 ...
Kuba's user avatar
  • 138k
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 ...
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 ...
JimB's user avatar
  • 42.9k
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 ...
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 ...
Michael E2's user avatar
  • 245k
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 ...
Sascha's user avatar
  • 8,529
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-...
b3m2a1's user avatar
  • 47.1k
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. ...
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 ...
9 votes

How are Accuracy and Precision related Mathematica for a given operation?

Accuracy and Precision are related though RealExponent The relation between ...
rhermans's user avatar
  • 37.4k
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 ...
b3m2a1's user avatar
  • 47.1k
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 ...
Jason B.'s user avatar
  • 70.2k
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" ...
b3m2a1's user avatar
  • 47.1k
8 votes
Accepted

Begin["`Private`"] vs Module

Reading How symbol lookup actually works will teach you that your code produces such definitions: ...
Kuba's user avatar
  • 138k
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: ...
Lukas Lang's user avatar
  • 34.4k
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 ...
Anton Antonov's user avatar
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) ...
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 ...
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 ...
Shredderroy's user avatar
  • 5,371
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 ...
C. E.'s user avatar
  • 71.2k
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 ...
Henrik Schumacher's user avatar
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 ...
Jason B.'s user avatar
  • 70.2k
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 ...
Carl Woll's user avatar
  • 132k

Only top scored, non community-wiki answers of a minimum length are eligible