Skip to content

Commit 5b8bdec

Browse files
authored
chore: fix typos in bigframes.ml (#2035)
* Fix: Fix typos in bigframes/ml * Fix: Fix mypy error in dataframe.py
1 parent 935af10 commit 5b8bdec

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed

bigframes/dataframe.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ def __getitem__(
582582
# Index of column labels can be treated the same as a sequence of column labels.
583583
pandas.Index,
584584
bigframes.series.Series,
585+
slice,
585586
],
586587
): # No return type annotations (like pandas) as type cannot always be determined statically
587588
# NOTE: This implements the operations described in

bigframes/ml/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(
5959
warm_start: bool = False,
6060
):
6161
self.n_clusters = n_clusters
62-
# allow the alias to be compatible with sklean
62+
# allow the alias to be compatible with sklearn
6363
self.init = "kmeans++" if init == "k-means++" else init
6464
self.init_col = init_col
6565
self.distance_type = distance_type

bigframes/ml/forecasting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def _fit(
211211
Args:
212212
X (bigframes.dataframe.DataFrame or bigframes.series.Series,
213213
or pandas.core.frame.DataFrame or pandas.core.series.Series):
214-
A dataframe or series of trainging timestamp.
214+
A dataframe or series of training timestamp.
215215
y (bigframes.dataframe.DataFrame, or bigframes.series.Series,
216216
or pandas.core.frame.DataFrame, or pandas.core.series.Series):
217217
Target values for training.

bigframes/ml/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ def to_gbq(self, model_name: str, replace: bool = False) -> GeminiTextGenerator:
834834
class Claude3TextGenerator(base.RetriableRemotePredictor):
835835
"""Claude3 text generator LLM model.
836836
837-
Go to Google Cloud Console -> Vertex AI -> Model Garden page to enabe the models before use. Must have the Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role to enable the models.
837+
Go to Google Cloud Console -> Vertex AI -> Model Garden page to enable the models before use. Must have the Consumer Procurement Entitlement Manager Identity and Access Management (IAM) role to enable the models.
838838
https://cloud.google.com/vertex-ai/generative-ai/docs/partner-models/use-partner-models#grant-permissions
839839
840840
.. note::

bigframes/ml/model_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def train_test_split(
8282
dfs = list(utils.batch_convert_to_dataframe(*arrays))
8383

8484
def _stratify_split(df: bpd.DataFrame, stratify: bpd.Series) -> List[bpd.DataFrame]:
85-
"""Split a single DF accoding to the stratify Series."""
85+
"""Split a single DF according to the stratify Series."""
8686
stratify = stratify.rename("bigframes_stratify_col") # avoid name conflicts
8787
merged_df = df.join(stratify.to_frame(), how="outer")
8888

bigframes/ml/preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def _compile_to_sql(
434434
if columns is None:
435435
columns = X.columns
436436
drop = self.drop if self.drop is not None else "none"
437-
# minus one here since BQML's inplimentation always includes index 0, and top_k is on top of that.
437+
# minus one here since BQML's implementation always includes index 0, and top_k is on top of that.
438438
top_k = (
439439
(self.max_categories - 1)
440440
if self.max_categories is not None

0 commit comments

Comments
 (0)