Skip to content

Commit fab3e96

Browse files
committed
fix: alpha
1 parent a0e5f31 commit fab3e96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/source/content/query_strategies/ranked_batch_mode.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"\n",
1919
"$$score = \\alpha(1 - \\Phi(x, X_{labeled})) + (1 - \\alpha) U(x),$$\n",
2020
"\n",
21-
"where $\\alpha = \\frac{|X_{labeled}|}{|X_{unlabeled}| + |X_{labeled}|}$, $X_{labeled}$ is the labeled dataset, $U(x)$ is the uncertainty of predictions for $x$, and $\\Phi$ is a so-called similarity function, for instance [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). This latter function measures how well the feature space is explored near $x$. (The lower the better.)\n",
21+
"where $\\alpha = \\frac{|X_{unlabeled}|}{|X_{unlabeled}| + |X_{labeled}|}$, $X_{labeled}$ is the labeled dataset, $U(x)$ is the uncertainty of predictions for $x$, and $\\Phi$ is a so-called similarity function, for instance [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity). This latter function measures how well the feature space is explored near $x$. (The lower the better.)\n",
2222
"\n",
2323
"After scoring, the highest scored instance is put at the top of a list. The instance is removed from the pool and the score is recalculated until the desired amount of instances are selected."
2424
]
@@ -130,7 +130,7 @@
130130
"distance_scores = pairwise_distances(X_pool, X_training, metric='euclidean').min(axis=1)\n",
131131
"similarity_scores = 1 / (1 + distance_scores)\n",
132132
"\n",
133-
"alpha = len(X_training)/len(X_raw)\n",
133+
"alpha = len(X_pool)/len(X_raw)\n",
134134
"\n",
135135
"scores = alpha * (1 - similarity_scores) + (1 - alpha) * uncertainty"
136136
]

0 commit comments

Comments
 (0)