I know about map/reduce alghoritm and its use. It’s using functions that are called Mappers and Reducers, but I also find people use the word Filters.
Are Filters same as Mappers or is there some significant difference?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A filter is like a map for which the passed function is always a “characteristic function”, that is a function that returns either “yes” or “no” to the question “does this belong here?”
In other words, think of a set defined as {x | x ∈ X and P(x) }. Filter takes the base set, tests to see if P(x) is true, and returns only those members for which it is true.
So { x | x is a natural number and odd(x) } is {1,3,5,7…}.
A map applies an arbitrary function, so you can think of that as a set like { y | x ∈ X and y = f(x) }.
So { y | x is a natural number and y = x² } is {1,4,9,16,…}.