Questions tagged [approximate]

Finding or verifying that a value is 'close enough' to some target value.

The tag is used both for questions relating to determining an approximate value (i.e. calculating a value to withing a certain tolerance) and the act of verifying or determining the 'closeness' of a value to a another (e.g. approximate string matching).

See also: .

99 questions
0
votes
0 answers

Approximate regular expression with a constraint on percentage of errors

The approximate regular expression such as the one at https://pypi.org/project/regex/ allows the use of a threshold on the total number of errors (insertions, deletions, substitutions). For example (?:foo){e<=2} allows matches with at most two…
huang
  • 93
  • 1
  • 5
0
votes
1 answer

fuzzy search / approximate string matching with standard unix tools

I'm working with prokka annotation files who give me the protein product of a gene found in the uniprot database. Unfortunately, many genes are linked with multiple, very similar product names, e.g. 1%2C2-phenylacetyl-CoA epoxidase%2C subunit…
crazysantaclaus
  • 613
  • 5
  • 19
0
votes
2 answers

Presto's support for approx_distinct

I am evaluating distributed query engines for analytical queries (both interactive as well as batch) on large scale data (~100GB). One of the requirements is low latency (<= 1s) for count-distinct queries, where approximate results (with up to 5%…
Ameya
  • 83
  • 1
  • 9
0
votes
1 answer

approximating a list with point of interests

I want this list to get approximated into 6 values, as you see the values are spread throught with some varianace. I plotted in matplotlib, I get this. Now I have 6 points of interests with multiple values how can I aprroximate it to only 6…
Perseus784
  • 104
  • 2
  • 9
0
votes
2 answers

php strpos and approximate match with 1 character difference

I searched the system but couldn't find any help I could understand on this, so here goes... I need to find an approximate match for a string in php. Essentially I'm checking that all the $names are in the $cv string and if not it sets a flag to…
arathra
  • 155
  • 1
  • 11
0
votes
2 answers

Request a better way to limit milli second digits

I was attempting to limit the number of milliseconds displayed in an Android UI, and I came up with this: Long milli = TimeUnit.NANOSECONDS.toSeconds(nanos); String partB = milli.toString().substring(0,2); String partA = String.format("%d:%d:%d.", …
MrMagoo
  • 67
  • 1
  • 12
0
votes
2 answers

sample java code for approximate string matching or boyer-moore extended for approximate string matching

I need to find 1.mismatch(incorrectly played notes), 2.insertion(additional played), & 3.deletion (missed notes), in a music piece (e.g. note pitches [string values] stored in a table) against a reference music piece. This is either possible through…
0
votes
1 answer

How to see if an object is more approximately equal

I have the method: > T moreApproxEqual(T object, T less, T greater) { //TODO: return less or greater, depending on which is closer to object return null; } I have a list of T and from that I found the variables…
DeadEli
  • 983
  • 2
  • 13
  • 28
0
votes
4 answers

The formula P(n) = (n!)(6^n) in C produces a large value

I'm trying to represent the following mathematical expression in C: P(n) = (n!)(6^n) The program should compute the answer to expression when n = 156. I have attempted to create the program in C and it fails to produce an answer. The answer is…
0
votes
1 answer

Extract similar words from a corpus

I want to extract similar words from a corpus. The similarity is based on string. Namely, when the string of two words are highly similar, two words extract as similar words. For example, If the corpus contains: Aras, bahro, arasis, adkpo, bah, aras…
SahelSoft
  • 615
  • 2
  • 9
  • 22
0
votes
1 answer

Using MPFR And Adding - How many Digits are Correct?

I have a pretty easy question (I think). As much as I've tried, I can not find an answer to this question. I am creating a function, for which I want the user to enter two numbers. The first is the the number of terms of a certain infinite series…
Rick Farr
  • 3
  • 1
0
votes
1 answer

Retrieving the closest matching string from database containing strings;

I have a database where there is a column "Fruits" of type TEXT; for example if i have two strings 1. Apple %d Mango %d Banana %d Guava %d Peach %d 2. Grapes %d Plum %d Pomegranate %d Apple %d I want to return string 1 first and then string 2.…
Rick
  • 361
  • 5
  • 17
0
votes
1 answer

Drupal Views Exposed Filters with approximate matches

I've got a view with exposed filters to help find matches out of thousands of entries. What I'm looking for is exact matches up top (this is done and working) followed by "approximate" matches underneath. The approximate matches may have one or two…
Tim Wasson
  • 3,606
  • 16
  • 16
0
votes
1 answer

LevenshteinSim() Approximate string matching

I am using levenshteinSim() to do the approximate string matching. I am facing a problem here is what my data look like string = "Mitchell" stringvector = c("Ray Mitchell", "Mitchell Dough","Juila Mitch") . I want the algorithm to match only…
Kothavari
  • 11
  • 3
0
votes
1 answer

Mathematica - I want to approximate a root of this equation

I have f[x__]:=(Sqrt[2] Sqrt[-E^(-2 p x) g R (-2-14 p^2-E^(2 p x) Cos[x]+ 2 E^(2 p x) p^2 Cos[x]+3 E^(2 p x) p Sin[x])])/Sqrt[1+4 p^2] g = 10 R = 2 p = 0.3 And I want to find a root for: f[x]^2 == - g R Cos[x] When I try Solve, I get:…