pat-s / measures

5 stars 2 forks source link

begin the measure functions with measure? #1

Open PhilippPro opened 6 years ago

PhilippPro commented 6 years ago

For example measureACC or better ACC or better accuracy?

giuseppec commented 6 years ago

Not sure about the naming. We probably want to avoid name clashes. Maybe ACC uppercase is a good choice?

jakob-r commented 6 years ago

I prefer a unified prefix which makes it easier to go through measures and this also avoids name clashes with any other package.

PhilippPro commented 6 years ago

But if we begin with "measure" we have the name clash with mlr.

jakob-r commented 6 years ago

Some ideas:

or err for everything that we minimize and perf for everything we maximize?

giuseppec commented 6 years ago

I don't like errRMSE because it then stands for error Root Mean Square Error. But I think I like the idea to have a naming that already makes a clear distinction between measures that should be minimized and measures that should be maximized. Maybe loss and gain are more appropiate then err and perf as loss function / gain function are well-established terms (and both terms have the same length, i.e. 4 characters)?

mllg commented 6 years ago

You could also put all measures in a dictionary-like object (like we do in mlrng) and implement a function

measure(y, yhat, [measure])

with [measure] being either a string or an actual (parametrized) measure.

Pros:

Cons:

jakob-r commented 6 years ago

Can't we do mmce = measures$get("mmce") automatically for the most common ones?

mllg commented 6 years ago

Sure, that would work. But the problem with the name clashes persists.