Questions tagged [evaluation]

Anything related to evaluation of expressions, i.e. the process used to determine the value of expressions in a running program.

What is it?

Evaluation is about rules, algorithms and strategies used for the evaluation of expressions or the computation of evaluation functions.

Related tags

  • The tag may be used more specifically for the execution or invocation of evaluations.
  • For more specific questions use tags such as for example

See also:

1334 questions
27
votes
2 answers

Contradictory Behaviour of Lambda Functions

Using the following definitions: lenDigits n = length (show n) factorial n = product [1..n] I evaluate the following Prelude> ((lenDigits . factorial) 199) <= 199 False Prelude> (\i -> ((lenDigits . factorial) i) <= i) 199 True What is the reason…
24
votes
17 answers

Evaluating software estimates: sure signs of unrealistic figures?

Whilst answering “Dealing with awful estimates” posted by Ash I shared a few tips that I learned and personally use to spot weak estimates. But I am certain there must be many more! What heuristics to use in the scenario when one needs to make a…
Vlad Gudim
  • 23,397
  • 16
  • 69
  • 92
23
votes
1 answer

What is the difference between "evaluate" and "return $!"?

Here's an extract from the documentation of evaluate: Control.Exception.Base.evaluate :: a -> IO a evaluate x is not the same as return $! x A correct definition is evaluate x = (return $! x) >>= return (source) These seem to have the same…
HNoob
  • 591
  • 4
  • 13
23
votes
1 answer

Recall, Recall rate@k and precision in top-k recommendation

According to authors in 1, 2, and 3, Recall is the percentage of relevant items selected out of all the relevant items in the repository, while Precision is the percentage of relevant items out of those items selected by the query. Therefore,…
22
votes
1 answer

How to evaluate a classifier with PySpark 2.4.5

I'm wondering what the best way is to evaluate a fitted binary classification model using Apache Spark 2.4.5 and PySpark (Python). I want to consider different metrics such as accuracy, precision, recall, auc and f1 score. Let us assume that the…
Jannik
  • 965
  • 2
  • 12
  • 21
21
votes
5 answers

Call by need vs call by name

I didn't understand the diffrence between Call-by-name and Call-by-need. As I understood, Call-by-need method restores the answer returned. But how It helps us, and Is there any fundamental difference between the results ? For example, begin integer…
Adam Sh
  • 8,137
  • 22
  • 60
  • 75
21
votes
4 answers

What is call-by-need?

I want to know what is call-by-need. Though I searched in wikipedia and found it here: http://en.wikipedia.org/wiki/Evaluation_strategy, but could not understand properly. If anyone can explain with an example and point out the difference with…
21
votes
3 answers

Null-conditional operator and !=

With the introduction of Null-Conditional Operators in C#, for the following evaluation, if (instance != null && instance.Val != 0) If I rewrite it this way, if (instance?.Val != 0) it will be evaluated to true if instance is a null reference;…
kennyzx
  • 12,845
  • 6
  • 39
  • 83
21
votes
3 answers

What is "Call By Name"?

I'm working on a homework assignment where we are asked to implement an evaluation strategy called "call by name" in a certain language that we developed (using Scheme). We were given an example in Scala, but I don't understand how "call by name"…
forellana
  • 937
  • 1
  • 8
  • 19
21
votes
3 answers

Printing out Haskell's evaluation (rewriting) steps for educational/learning purposes. Is it possible?

I describe this question by using an example from a book. In Simon Thompson's book "HASKELL the craft of functional programming" on page 82 (see images below) are shown the evaluation steps for fac 4. QUESTION: Is it possible to use some tool or…
jhegedus
  • 20,244
  • 16
  • 99
  • 167
20
votes
2 answers

R: passing expression to an inner function

Further delving into the mysteries of R evaluation...This is closely related to my previous question ( How to write an R function that evaluates an expression within a data-frame ). Let's say I want to write a function topfn that takes a data-frame…
Prasad Chalasani
  • 19,912
  • 7
  • 51
  • 73
19
votes
2 answers

How much effort needed to deliver a solution based on Apache Ofbiz?

I was trying to get some info from documentation, but it seems that it is one of those projects that you have to check out and play with it to figure the answers out ... I noticed of hight activity on mailing list and quite a lot of commits, it's a…
lisak
  • 21,611
  • 40
  • 152
  • 243
19
votes
3 answers

Evaluation of Haskell Statements/Expressions using GHC API

For a tool I'm writing ( http://hackage.haskell.org/package/explore ) I need a way to read haskell function definitions at run-time, apply them to values from my tool and retrieve the results of their application. Can anyone give me a very basic…
Cetin Sert
  • 4,497
  • 5
  • 38
  • 76
19
votes
1 answer

Difference between Gradle's terms evaluation and execution

I am new to Gradle build tool and now I am reading the User Guide, but can't understand fully the difference between evaluation and execution phases. In configuration phase project objects are configured and DAG is created, but we have…
Xelian
  • 16,680
  • 25
  • 99
  • 152
18
votes
7 answers

evaluation of assignment in php

I have a kind of 'basics' question about php. In the example code for fgets, it has this snippet as an example of reading through a file's contents: while (($buffer = fgets($handle, 4096)) !== false) { echo $buffer; } How is it that the…
user151841
  • 17,377
  • 29
  • 109
  • 171
1 2
3
88 89