Skip to content

Commit b255c07

Browse files
committed
small changes
1 parent 7200a01 commit b255c07

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

R/predict.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#' "name" = c("James", "Leah", "Thomas", "Sophie", "Mathew", "Andrew"),
7878
#' "surname" = c("Wilson", "Thompson", "Davies", "Clarks", "Robins", "Scots")
7979
#' )
80-
#' predict(model, df_new_1, df_new_2, set_construction = "size")
80+
#' predict(model, df_new_1, df_new_2)
8181
#' @export
8282
predict.rec_lin_model <- function(object,
8383
newdata_A,

R/supervised_learning.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ train_rec_lin <- function(
111111
}
112112

113113
if (is.null(prob_ratio)) {
114-
prob_ratio <- "1"
114+
prob_ratio <- "2"
115115
}
116116

117117
if (any(methods %in% c("binary", "continuous_parametric"))) {

README.Rmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ df_1 <- data.frame(
4646
city = c("New York", "Los Angeles", "Chicago", "Houston", "Phoenix",
4747
"Philadelphia", "San Antonio", "San Diego", "Dallas", "San Jose")
4848
)
49-
5049
df_2 <- data.frame(
5150
name = c(
5251
"Emma", "Liam", "Olivia", "Noah",
@@ -68,7 +67,7 @@ df_1
6867
df_2
6968
```
7069

71-
Specify key variables used for record linkage. Select a comparison function (i.e. a function to compare pairs of records) for each variable. For example, use the `jarowinkler_complement` function from the `automatedRecLin` package (1 - Jaro-Winkler distance). Choose a method for estimating the probability or density ratio for each variable. The available methods are: `"binary"`, `"continuous_parametric"` and `"continuous_nonparametric"`.
70+
Specify the key variables used for record linkage. Select a comparison function (i.e. a function to compare pairs of records) for each variable. For example, use the `jarowinkler_complement` function from the `automatedRecLin` package (1 - Jaro-Winkler distance). Choose a method for estimating the probability or density ratio for each variable. The available methods are: `"binary"`, `"continuous_parametric"` and `"continuous_nonparametric"`.
7271

7372
```{r}
7473
variables <- c("name", "surname", "city")
@@ -92,7 +91,7 @@ Perform record linkage using the `mec` function. The output contains the followi
9291
+ the method for constructing the predicted set of matches (default: `"size"`),
9392
+ estimated false link rate (FLR),
9493
+ estimated missing match rate (MMR),
95-
+ estimated parameters for variables using the `"binary"` or `"continuous_parametric"` methods.
94+
+ estimated parameters for the variables using the `"binary"` or `"continuous_parametric"` methods.
9695

9796
```{r}
9897
set.seed(1)
@@ -160,7 +159,8 @@ df_2_new
160159
Predict matches using the `predict` function. The output has a similar structure to that of the `mec` function.
161160

162161
```{r}
163-
predict(model, df_1_new, df_2_new)
162+
result_sup <- predict(model, df_1_new, df_2_new)
163+
result_sup
164164
```
165165

166166
## Funding

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ df_1 <- data.frame(
4242
city = c("New York", "Los Angeles", "Chicago", "Houston", "Phoenix",
4343
"Philadelphia", "San Antonio", "San Diego", "Dallas", "San Jose")
4444
)
45-
4645
df_2 <- data.frame(
4746
name = c(
4847
"Emma", "Liam", "Olivia", "Noah",
@@ -88,7 +87,7 @@ df_2
8887
#> 12 Lucas Clark Denver
8988
```
9089

91-
Specify key variables used for record linkage. Select a comparison
90+
Specify the key variables used for record linkage. Select a comparison
9291
function (i.e. a function to compare pairs of records) for each
9392
variable. For example, use the `jarowinkler_complement` function from
9493
the `automatedRecLin` package (1 - Jaro-Winkler distance). Choose a
@@ -121,7 +120,7 @@ following information:
121120
`"size"`),
122121
- estimated false link rate (FLR),
123122
- estimated missing match rate (MMR),
124-
- estimated parameters for variables using the `"binary"` or
123+
- estimated parameters for the variables using the `"binary"` or
125124
`"continuous_parametric"` methods.
126125

127126
``` r
@@ -246,7 +245,8 @@ Predict matches using the `predict` function. The output has a similar
246245
structure to that of the `mec` function.
247246

248247
``` r
249-
predict(model, df_1_new, df_2_new)
248+
result_sup <- predict(model, df_1_new, df_2_new)
249+
result_sup
250250
#> The algorithm predicted 5 matches.
251251
#> The first 5 predicted matches are:
252252
#> a b ratio / 1000

man/predict.rec_lin_model.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)