mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 09:11:51 +02:00
(v1.3.0.9023) optimalisation
This commit is contained in:
@ -136,10 +136,10 @@ With ambiguous user input, the returned results are chosen based on their matchi
|
||||
\item The \href{https://en.wikipedia.org/wiki/Levenshtein_distance}{Levenshtein distance} \eqn{L} is the distance between the user input and all taxonomic full names, with the text length of the user input being the maximum distance. A modified version of the Levenshtein distance \eqn{L'} based on the text length of the full name \eqn{F} is calculated as:
|
||||
}
|
||||
|
||||
\deqn{L' = F - \frac{0.5 \times L}{F}}{L' = F - (0.5 * L) / F}
|
||||
\deqn{L' = F - \frac{0.5L}{F}}{L' = (F - 0.5L) / F}
|
||||
|
||||
The final matching score \eqn{M} is calculated as:
|
||||
\deqn{M = L' \times \frac{1}{P \times K} * \frac{1}{U}}{M = L' * (1 / (P * K)) * (1 / U)}
|
||||
\deqn{M = L' \times \frac{1}{P K U} = \frac{F - 0.5L}{F P K U}}{M = L' * (1 / (P * K * U)) = (F - 0.5L) / (F * P * K * U)}
|
||||
|
||||
All matches are sorted descending on their matching score and for all user input values, the top match will be returned.
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ The matching score is based on four parameters:
|
||||
\item The \href{https://en.wikipedia.org/wiki/Levenshtein_distance}{Levenshtein distance} \eqn{L} is the distance between the user input and all taxonomic full names, with the text length of the user input being the maximum distance. A modified version of the Levenshtein distance \eqn{L'} based on the text length of the full name \eqn{F} is calculated as:
|
||||
}
|
||||
|
||||
\deqn{L' = F - \frac{0.5 \times L}{F}}{L' = F - (0.5 * L) / F}
|
||||
\deqn{L' = F - \frac{0.5L}{F}}{L' = (F - 0.5L) / F}
|
||||
|
||||
The final matching score \eqn{M} is calculated as:
|
||||
\deqn{M = L' \times \frac{1}{P \times K} * \frac{1}{U}}{M = L' * (1 / (P * K)) * (1 / U)}
|
||||
\deqn{M = L' \times \frac{1}{P K U} = \frac{F - 0.5L}{F P K U}}{M = L' * (1 / (P * K * U)) = (F - 0.5L) / (F * P * K * U)}
|
||||
}
|
||||
\examples{
|
||||
as.mo("E. coli")
|
||||
|
Reference in New Issue
Block a user