Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
C:/Users/48607/Desktop/Grant/blocking_30_05/DESCRIPTION="BADE5BA2"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/blocking.R="44766414"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/controls.R="A7B8B8D2"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/est_block_error.R="1DB588BC"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/eval.R="30BB8D2A"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/method_annoy.R="38099BF2"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/method_hnsw.R="ECE2EFAA"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/method_mlpack.R="7020DB20"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/method_nnd.R="1937EFF4"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/methods.R="2B7AFCBF"
C:/Users/48607/Desktop/Grant/blocking_30_05/R/sentence_to_vector.R="71CCE4B2"
C:/Users/48607/Desktop/Grant/blocking_30_05/README.md="3BCBDFED"
C:/Users/48607/Desktop/Grant/blocking_30_05/inst/WORDLIST="5610708B"
C:/Users/48607/Desktop/Grant/blocking_30_05/inst/tinytest/test_annoy.R="A935531D"
C:/Users/48607/Desktop/Grant/blocking_30_05/inst/tinytest/test_hnsw.R="13EE8820"
C:/Users/48607/Desktop/Grant/blocking_30_05/inst/tinytest/test_true_blocks.R="7D5E11CB"
C:/Users/48607/Desktop/Grant/blocking_30_05/tests/tinytest.R="2AFE54EE"
C:/Users/48607/Desktop/Grant/blocking_30_05/vignettes/v2-reclin.Rmd="7E043D0D"
C:/Users/48607/Desktop/Grant/blocking_30_05/vignettes/v3-integration.Rmd="EE91B56E"
C:/Users/48607/Desktop/Grant/blocking_test_3/vignettes/v2-reclin.Rmd="F7A0D8BC"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/.github/workflows/pkgdown.yaml="48AB106D"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/.github/workflows/test-coverage.yaml="E824CBD4"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/.gitignore="DF69E985"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/DESCRIPTION="CB8B0A33"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/NAMESPACE="EBD0CE51"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/R/blocking.R="25D2A128"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/R/controls.R="9BA1FC11"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/R/data.R="2F3A9433"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/R/eval.R="AACD4DF9"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/README.Rmd="610BE353"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/man/cis.Rd="485EF5A5"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/man/est_block_error.Rd="73E6957E"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/man/sentence_to_vector.Rd="A6CD2A86"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/tests/tinytest.R="AADD0AFB"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/vignettes/v1-deduplication.Rmd="DCCF1C6F"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/vignettes/v2-reclin.Rmd="7253B478"
/Users/berenz/mac/nauka/ncn-foreigners/software/blocking/vignettes/v3-integration.Rmd="A9B0ECDA"
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: blocking
Type: Package
Title: Deduplication / Entity Resolution with Record Blocking
Version: 0.1.0
Version: 1.0.0
Authors@R:
c(person(given = "Maciej",
family = "Beręsewicz",
Expand Down
4 changes: 4 additions & 0 deletions R/eval.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' Returns a list containing TP, FP, FN and TN.
#'
#' @keywords internal
#' @noRd
eval_reclin <- function(pred_df, true_df) {

pred_x_map <- unique(pred_df[, c("x", "block"), with = FALSE])
Expand Down Expand Up @@ -82,6 +83,7 @@ eval_reclin <- function(pred_df, true_df) {
#' Returns a list containing TP, FP, FN and TN.
#'
#' @keywords internal
#' @noRd
eval_dedup <- function(pred_df, true_df) {

pred_lbl <- melt(pred_df,
Expand Down Expand Up @@ -143,6 +145,7 @@ eval_dedup <- function(pred_df, true_df) {
#' Returns a list containing evaluation metrics.
#'
#' @keywords internal
#' @noRd
get_metrics <- function(TP, FP, FN, TN) {

recall <- if (TP + FN != 0) TP / (TP + FN) else 0
Expand Down Expand Up @@ -176,6 +179,7 @@ get_metrics <- function(TP, FP, FN, TN) {
#' Returns a confusion matrix.
#'
#' @keywords internal
#' @noRd
get_confusion <- function(TP, FP, FN, TN) {

cm <- matrix(c(TP, FP, FN, TN), nrow = 2)
Expand Down
19 changes: 0 additions & 19 deletions man/eval_dedup.Rd

This file was deleted.

19 changes: 0 additions & 19 deletions man/eval_reclin.Rd

This file was deleted.

23 changes: 0 additions & 23 deletions man/get_confusion.Rd

This file was deleted.

23 changes: 0 additions & 23 deletions man/get_metrics.Rd

This file was deleted.

1 change: 1 addition & 0 deletions man/method_annoy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/method_hnsw.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/method_mlpack.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/method_nnd.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions man/sentence_to_vector.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.