Fuzzy Matching in R (Example) | Approximate String, Name & Text Search | adist(), agrep() & amatch()

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 26

  • @tildawilson1198
    @tildawilson1198 Год назад +1

    How are you viewing the actual values ([1] "Bill Clintion" "Barack Obama") rather than just the numbers ([1] 5 3) in this? I see you switch back and forth a bunch of times but I'm not sure how you're doing that.

    • @cansustatisticsglobe
      @cansustatisticsglobe Год назад

      Hello Tilda,
      You can use the value=TRUE argument in the use of agrep() function. It would give you the exact values or use the amatch() in square brackets to identify the index positions in the pres_df data frame. The script is given below the video. You should click on show more to see it.
      Regards,
      Cansu

  • @loancet1878
    @loancet1878 2 года назад +1

    Thank you su much ! What you explain is exactly what I was looking for to deal with my data !

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 года назад +1

    Use case.
    I may have an actual use case for this. In my courses I give so-called fill-in-the-blank(s) questions. Students frequently misspell words in the most inventive ways possible (not by design of course) and I am pretty flexible in terms of giving full credit for "near misses". however, sometimes I wonder "How close is that answer actually?" This lesson gives me some ideas of how that may be accomplished by calculating the LD distance. The course management program I use (Blackboard) is not nearly good enough to do this however by itself. I would have generate versions I accept based on LD and feed those versions to Blackboard myself. I thought I would share these thoughts of mine.
    Thanks for the wonderful videos.

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад +1

      Thank you very much for sharing this use case Haraldur! Indeed, this should be a good example where fuzzy matching is useful.

  • @haraldurkarlsson1147
    @haraldurkarlsson1147 2 года назад +1

    Excellent video. Very interesting stuff!
    I do have a request or suggestion. Kerby could you do a video or a series of video on NLP (Natural Language Processing)? It seems to be a field that is gaining steam. My son is a layer and a data scientist who studies NLP for legal docs and I would love to know what he does for a living.

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад

      Thanks for the kind words and the great suggestion Haraldur! I'll forward it to Kirby. Regards, Joachim

  • @1453angela
    @1453angela 4 месяца назад +1

    Hello! If I want to do an exact match and a fuzzy match at the same time how can I do it? 🥺

    • @StatisticsGlobe
      @StatisticsGlobe  4 месяца назад

      Hey, I'm not sure if I understand your question. How would this work theoretically?

  • @jennykim5795
    @jennykim5795 2 года назад +2

    Hi, excellent video!!!! What is the default method for measuring distance for function "stringdist" here? Since you didn't set the method, I was curious.

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад

      Hey Jenny, thank you very much for the kind feedback, glad you like the video! The default method of stringdist is oas. You can find more info on this here: www.rdocumentation.org/packages/stringdist/versions/0.9.8/topics/stringdist Regards, Joachim

  • @robertjl5619
    @robertjl5619 2 года назад +3

    Awesome tutorial. Levenstein distance still doesn't beat speed of fuzzyLookup in excel which is a shame. Neither does fuzzy join package. Frustrating bottleneck for automation but the performance is unquestionable. Tokenized jaccard in fuzzyLookup in excel still the king.

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад +1

      Hey Robert, thanks a lot for the kind words and the additional info!

    • @robertjl5619
      @robertjl5619 2 года назад +1

      @@StatisticsGlobe love your vids bud and your no bullshit approach. keep it up!

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад +1

      Thanks mate! :)

  • @andrea-mj9ce
    @andrea-mj9ce 2 года назад +1

    So _amatch_ is the most general function here for fuzzy matching

    • @StatisticsGlobe
      @StatisticsGlobe  Год назад

      Hey Andrea, sorry for the delayed response, I was on vacation and couldn't reply earlier. Could you please explain your comment in some more detail? I'm afraid I don't get it :) Regards, Joachim

  • @jelly3388
    @jelly3388 Год назад +1

    amazing!

  • @manny1manito2
    @manny1manito2 2 года назад +2

    this is great, would fuzzy_join work with dates?

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад +1

      Thank you! I have never done this myself, but this Stack Overflow thread seems to discuss your question: stackoverflow.com/questions/58718287/fuzzyjoin-with-dates-in-r

  • @paulboutros6093
    @paulboutros6093 2 года назад +1

    What do you suggest for a large data? (About 600,000)

    • @StatisticsGlobe
      @StatisticsGlobe  2 года назад

      Hey Paul, have you tried the code of this video? Did you get any error messages?

  • @Tommygun0110
    @Tommygun0110 Год назад +1

    nice