Questions tagged [matching]

For questions related to pattern matching, using character sequences or tree structures. In contrast to pattern recognition, the match described here usually has to be exact.

2735 questions
0
votes
0 answers

Indexing a 6x6 matrix with 2 lists so that each element can be accessed with an input

Im having problems indexing a 6x6 matrix in which i created through nested lists. The program is for a flipping tiles game if that helps for visualization. The matrix looks something like…
0
votes
0 answers

Matching for a dynamic variable in R

I have a dataset with a large number of individuals with an exposure at an individual event and was provided with a control group of similar sex distribution and similar date of birth. The observation covers a period of multiple years, e.g. 10…
raphael
  • 1
  • 1
0
votes
0 answers

Trying to make a group composition algorithm with weighted parametres, but need inspiration for a weighted matchmaking algorithm

We want to make an ideal project group based on a few parametres/factors that we have researched (the ideal here is a balanced group). The program should distribute the users into a fixed size group based on parametres that they fill out in a…
0
votes
0 answers

Powershell merge two tables with good performance

I have two tables each originating from seperate SQL-queries. The first one E has 7 columns and the second S has 3. The first column is the identifier. I want to include the values from S into E so that I can run an alogrithm for each row and export…
0
votes
1 answer

In R, replace rowvalues based on colname matching rowname in another column

I want R to replace rows with NA values if the column name matches the row name of another column. For instance, if individual 123 was last registered in array 6 (Very.last=Last.6), it will replace the time in Last.6 with NAs. E.g.…
Lene
  • 23
  • 4
0
votes
0 answers

Obtain table after inverse probability treatment weighting

I'm conducting a statistical analysis and I need to use the IPTW calculated from the ps function of the twang package. However, in most papers after calculation of the ps and IPTW they recalculate the baseline characteristics of the patients based…
0
votes
1 answer

How to loop through each row within a dataframe that contains a string, and match such string to each item in a list?

Dear Stackoverflow community- I have a dataframe df, that has a row 'name' which contains different names in it: print(df) name tom jerry steven Zeo Then I have a list with names in it: print(list) ['tom', 'zeo'] How do I create a new column in…
Tom Shang
  • 3
  • 1
0
votes
1 answer

How can I best construct data structures to retrieve similar values for demographic matching?

The job is person demographic matching/consolidation. I have incoming person demographic information which I need to determine if it is a match against an existing person in the a dataset. I get the following data; NAME_LAST VARCHAR2(40),…
Paul Stearns
  • 856
  • 9
  • 30
0
votes
0 answers

1:1 exact matching of cases and controls in R on multiple variables, NOT propensity score matching

Is there a way to do 1:1 paired matching of cases and controls in R on multiple variables? I've tried MatchIt function, but even specifying variables as "exact" only results in frequency matching (the final dataset will have exactly equal…
agillespie
  • 11
  • 3
0
votes
0 answers

My own SIFT keypoints matching function cannot match keypoints

I wanna make a function that match keypoints of two of images by use Python. And here is important thing: I don't wanna use built-in function except what's included in mine. I used two of same images, but second one is rotated 90 degree. ... def…
0
votes
2 answers

How to implement the Jacccard macro in a data step for a matching problem?

I tried implementing a solution into my sas code but with no luck. I'm trying to add a jaccard distance column. to my dataset. I keep getting errors : variable name & is not valid invalid value for the keep option The idea is to solve a matching…
sarah99
  • 5
  • 2
0
votes
2 answers

Count all the elements larger than x in a list

I'm doing some exercise in "List" and "Match-With" but I'm a little stuck. The exercise tell me Program the upper l x function that counts all the elements larger than x in the list Example : upper [10;20;30;40;50] 35; the results is 2. I did this…
SeveN
  • 107
  • 6
0
votes
1 answer

Compare all the lists contained in a nested list to get only the strings that match

I want to compare all the lists contained in a nested list to have at the end the pair word who corresponding. I manage this with 2 different lists to get the strings that match in each list. In this way : listA = [['Test1','Test2','Test3'],…
0
votes
2 answers

Optimizing Several True/False Functions in Python

While the provided code I created works, it is non-scalable and slow. I need a way to determine if a token (t) is the same as any element in several arrays. However, it cannot match more than one array, as one list might supersede the other. Is…
0
votes
2 answers

String matching algorithm with more weight given to more unique words?

I've been looking into Python and using the record.linkage toolkit for address matching. I've found the string matching algorithms such as levenshtein are returning false matches for very common addresses. Ideally an address with one very unique…