A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://reference.wolfram.com/language/ref/comparisonmethod/Vector.html below:

Vector—Wolfram Documentation

WOLFRAM Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

WolframConsulting.com

"Vector" (Comparison Method) COMPARISON METHOD "Vector" (Comparison Method) Compare vectors based on distances. Details Examplesopen all close all Basic Examples  (3)

Create an AssessmentFunction for a vector comparison with a nonzero tolerance:

Answers within the tolerance range are marked as correct:

Use zero tolerance:

During assessment, equivalence is tested by default at machine precision level:

Define an assessment for a problem with multiple correct answers:

Assess an answer and see the score:

Scope  (2)

Define assessment for a symbolic vector and numeric tolerance:

Answers within the tolerance range are correct:

The tolerance is applied at the vector level, not at the components level. By default, the tolerance corresponds to the norm of the difference between the compared vectors:

Use "ListAssessment""AllElementsOrdered" to create an assessment function for an ordered list of vectors, where all values must be included in the answer:

Evaluate multiple answers:

Options  (1)

Any other distance metric can be used instead of the Euclidean default one:

This answer gives zero distance in a Dot product with the answer key:

Any nonzero distance is marked as incorrect:

Properties & Relations  (2)

Define an assessment for a problem with multiple correct answers within the tolerance of each other:

The closest vector in the answer key within the tolerance is used to determine the score:

Create a vector assessment:

The tolerance is applied to the distance between the vectors:

The incorrect mark is expected because the distance is larger than the tolerance:

Create a second assessment for the same vectors, comparing each element independently as a number:

Each component is compared separately to the elements in the answer keys. The first correct answer is selected with the corresponding score

Manually compute the distances to see that each is less than the tolerance:

Possible Issues  (4)

In AssessmentFunction[{a,b,c}] the values a, b and c are treated as three distinct answers instead of a single vector:

Always give vectors in a list:

When no comparison method is specified, the "Vector" comparison method is used for numeric vectors:

Symbolic expressions are not automatically treated as vectors:

With the setting "ListAssessment" set to either "AllElementsOrderless" or "AllElementsOrdered", each element in each value of the answer key must be a vector, resulting in nested lists:

The submitted answer should be a list of vectors in any order:

When a score is specified for a single vector, the outer list is not necessary:

Interactive Examples  (1)

Create a geometry problem:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4