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
2 answers

Approximate pattern matching in a sequence of integer data and extraction using R

I have a pattern of integers as c(1,2,3,4,5) that needs to be approximately matched in a data as c(1,10,1,6,3,4,5,1,2,3,4,5,9,10,1,2,3,4,6) I have tried: pmatch() all.equal() grepl() but they don't seem to support this scenario. pattern <-…
Nasir
  • 167
  • 6
1
vote
0 answers

Approximate function following interpolation

How do you approximate a function for interpolated points? I use the natural cubic spline to interpolate points as follows for n = 500 points: t=[0; 3; 6; 9] z=[0; 6; 6; 0] plot(t,z,'ro') ti=linspace(0,9,500) zn = natcubicspline(t,z,ti) yn =…
kathystehl
  • 831
  • 1
  • 9
  • 26
1
vote
2 answers

Approximate regular expression library for Java?

I have just written some code for approximate string matching. I would like to benchmark my naive algorithm against a more mature implementation running on the JVM. Any suggestions?
Gabriel Mitchell
  • 979
  • 5
  • 17
1
vote
2 answers

Approximate a R2 line by a set of points

I'm working on an application with statistic analysis, and I need some help. Given a set of n points, how can I approximate a line by them. I'm sure there is an algorithm but I couldn't find it. Thanks!
Alex
  • 737
  • 1
  • 9
  • 19
1
vote
2 answers

Programming e^x infinite series

I have to find the value of 1+x/1!+x^2/2!+..... Here is my code: void main() { long int a, i = 0; double p, e, x, sum = 1, t = 1; printf("Enter desired number of decimal places\n"); scanf("%d", &a); printf("Enter x\n"); scanf("%d",…
Diya
  • 133
  • 6
1
vote
1 answer

PowerPivot multiple columns approximate match

I want to find out the Member_Status on the date that a Product was purchased. Table A contains 3 fields: Member_Name, Member_Status, Change_Date (this is the date the member started to have this status). Table B contains 3 fields: Member_Name,…
Kerry
  • 131
  • 4
  • 15
1
vote
3 answers

SQL: Match Set of Approximate values

In my data set there are a set of numeric values to match to another equal sized set of values from another table where the "closest match" (without going over is desired: Left Right A M B N C O D P So the goal is to join Left…
HerbM
  • 521
  • 6
  • 14
1
vote
2 answers

How do I limit results to only those data frame rows and columns that contain 0s?

I am doing approximate string matching in R. I am rather inexperienced with this technique, but because I want to find instances where my x strings match parts of my y strings exactly, I am only interested in Levenshtein scores of 0 (is this the…
1
vote
0 answers

approximate algorithm for top-k query in hive?

everyone,in hive ,we use select word,count(*) as cnt from table group by word order by cnt limit N for top-N query. As we kown the speed is not fast,i learn about some approximate algorithm for top-k query ,such as countsketch algorithm or another…
1
vote
0 answers

Does RSpec support recursive approximate matching?

In RSpec I can do something like this: [1, 2, 3].should =~ [2, 3, 1] Is there a built-in way to make this recursively approximate? For example: x = [ [1, 2], [3, 4] ] y = [ [4, 3], [2, 1] ] x.should =~ y If there's no built-in way, I…
Dan Tao
  • 125,917
  • 54
  • 300
  • 447
0
votes
0 answers

Trying to verify fixed point having lower latency than float point

I assumed that fixed point having lower latency and higher energy efficience than float point. So i try to verify that in my pc. I have Ubuntu 12.04,clang version 14.0.0-1ubuntu1.1, Target: x86_64-pc-linux-gnu. I compile following c++ code with…
0
votes
0 answers

Calculating coordinates from several other coordinates

I use trilateration to determine the coordinates of a mobile anchor with other fixed anchors. (2D) Here is the algorithm I use and it works very well. The problem is that I have several possible coordinates, here is an example : P (red) is the…
0
votes
2 answers

Python - Compare how close two float values are the same, and return the approximate value for the parts where the values are the same

So I am trying to create a function that compares how closely two float values are the same, then the program should return the approximate value for the parts where the values are the same. For example, when the function is given the…
TasH
  • 11
  • 1
0
votes
0 answers

Elastic search running in docker container does not return nearest neighbour results as expected following an ANN query

I am following the approximate nearest neighbour (ANN) task found at: https://www.elastic.co/guide/en/elasticsearch/reference/current/knn-search.html#approximate-knn and I am running Elastic Search using the insecure mode via docker compose, but the…
0
votes
1 answer

Binary Fuse Filter adding and deleting keys

Reading the paper for binary fuse filters, I realized that there are no sections for adding or removing keys. I was looking at this as a potential upgrade for Cuckoo filters but adding and deleting keys are important for the business logic. Looking…
Baiqing
  • 1,223
  • 2
  • 9
  • 21