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
1
vote
1 answer

Android development, how to get approximate coordinates?

Ok, so I am making a simple app on a surfaceView where I have a bitmap of a ball that goes from the top of the screen to the bottom. Once it gets to the bottom it appears at the top again where it starts to fall back down again. Next I tried to…
alexward1230
  • 579
  • 3
  • 8
  • 25
1
vote
1 answer

Compare List Similarity Python

S = ['hom'] L = ['home','honda','Hammer','Elephant'] I want to get output to show similarity hom = home and print home How I can do this? I want to use approximate matching to change "hom" to "home".
1
vote
1 answer

Teradata SQL join with approximate match by nearest Neighbor

I have two tables table1 and table2 I need to join these tables with keys that are not exactly matched, they could differ in the last 3 or 4 digits there is no fixed pattern, the joining will have two conditions: 1st Condition: table2.Key_2 must be…
1
vote
0 answers

Find numpy array in bigger array, testing for approximate equality

I often need to find a smaller array xs in a larger array X. However, since these arrays are the result of floating point arithmetic, exact comparison fails miserably. How can I fix this? MRE: import numpy as np np.random.seed(2021) X =…
DeltaIV
  • 4,773
  • 12
  • 39
  • 86
1
vote
1 answer

python match value within tolerance

I'm trying to match values from a column in a dataframe using values from a different column within the tolerance value. I have 2 dataframes: Dp y_escape_ave(m) 0 [Series 1 at injection 12 1] -0.015850 1 …
user2882635
  • 133
  • 2
  • 19
1
vote
1 answer

Identify process with powershell -Query option satisfying CommandLine like '%pattern%'

Recently I discovered that one can issue sql queries to WmiObject like this: Get-WmiObject -Query "SELECT * FROM Win32_Process WHERE Name='java.exe'" I would like to further limit the output containing the CommandLine arguments, something…
arthur
  • 1,034
  • 2
  • 17
  • 31
1
vote
2 answers

Filter a vector based on approximate multiple values

Suppose I want to filter vector x based on which values appear approximately in vector y: x <- c(1.123456789, 2.123456789, 3.123456789) y <- c(1.12345, 2.12345) If I didn't want approximate comparison, I'd use %in%: x %in% y [1] FALSE FALSE…
Giora Simchoni
  • 3,487
  • 3
  • 34
  • 72
1
vote
0 answers

How to find the weighted edit distance between two strings with Agrepl

I am having difficult time understanding how the edit distance is calculated in the agrepl function. I am trying to output the distance that agrepl calculates between two strings. I used the "adist" and "stringdist" function but it gives the total #…
Samarth
  • 11
  • 1
1
vote
2 answers

Join two data frames by nearest match

I have two large datasets with the only shared feature being a numerical timestamp. I'd like to merge the data frames by this timestamp, but the frequency of data collection doesn't match exactly so I need to allow it to merge with the nearest…
celow
  • 75
  • 1
  • 6
1
vote
1 answer

Fuzzy-match and extract words repeated across turns in conversation

I'm working on speech in conversational speaking turns and want to extract words that are repeated across turns. The task I'm grappling with is to extract words that inexactly repeated. Data: X <- data.frame( speaker = c("A","B","A","B"), speech…
Chris Ruehlemann
  • 20,321
  • 4
  • 12
  • 34
1
vote
1 answer

What does finding the limits of a truncated value mean?

X_hat is an approximation of X. It is given by the X_t, the truncation of X using t bits. Find the limits of X_t / X. X_hat and X_t are represented in floating-point binary. From my understand: If t = 3 and X_hat = 1, X_t = 1.01 1/1 = 1 is the…
Roo
  • 427
  • 1
  • 7
  • 16
1
vote
1 answer

How to optimise pyspark approxSimilarityJoin for 2 very large data frames

I want to join two huge data frame based on their similarity. I tried using approxsimilarityjoin. However the task gets stuck after some time and eventually fails.
Dan
  • 26
  • 1
1
vote
0 answers

What approximate median filter is all about?

What is approximate median filter and how it differs from median filter in image processing? My professor ask me to report about approximate median filter and show an example program in java. I do not have any idea about what is approximate median…
1
vote
1 answer

Cheap approximate integer division on a GPU

So, I want to divide me some 32-bit unsigned integers on a GPU, and I don't care about getting an exact result. In fact, let's be lenient and suppose I'm willing to accept a multiplicative error factor of upto 2, i.e. if q = x/y I'm willing to…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

Finding indexes of closest values

I have two sets of coordinates and trying to find closest matches of coordinates. Given that one dataset consists of 1 million records and the other is nearly half a million records, looking for a better way to get this task done and requires…
syebill
  • 543
  • 6
  • 23