Learn¶
scikit-learn integration. Wraps any sklearn-compatible estimator (fit / predict / transform /
decision_function / fit_predict) as a carrier-aware Operator.
Phase-1 API — subject to change
The current mode= / nan_fit= / nan_transform= kwargs are provisional. The full design
(PixelTable carrier, type-named wrappers like PixelwiseClassifier, NanPolicy dataclass)
will replace this surface in a follow-up (a breaking change, without aliases). Supervised estimators
(classifiers / regressors) must be pre-fit out-of-graph and loaded via state_path= —
in-graph supervised fit helpers are not implemented yet.
- Universal adapter:
SklearnOp,GeoArrayEstimator - Convenience wrappers (named algorithm, sensible defaults). Each is prefixed
Pixelwiseso it never shadows the scikit-learn class it wraps, and takes that estimator by keyword —gz.learn.PixelwisePCA(estimator=PCA(n_components=3)): - Decomposition:
PixelwisePCA,PixelwiseIPCA,PixelwiseNMF - Clustering:
PixelwiseKMeans,PixelwiseMiniBatchKMeans,PixelwiseGMM - Anomaly:
PixelwiseIsolationForest,PixelwiseOneClassSVM,PixelwiseLocalOutlierFactor - Imputation:
PixelwiseKNNImputer,PixelwiseIterativeImputer - Framework-agnostic inference:
ModelOp(model=...)
Saved state¶
SklearnOp.save_state(path) (and GeoArrayEstimator.save_state) writes one joblib pickle holding
the fitted estimator and imputer. Pass write_meta=True to also write a <path>.meta.json sidecar
with the scikit-learn version, fit input shape / sample count and a UTC fit_timestamp; it is off
by default so a save is deterministic and writes a single file.
Only load state files you trust
load_state(path) and the state_path= constructor argument unpickle the file with
joblib.load, and unpickling can execute arbitrary code. Only load files you created yourself
or that come from a source you trust as much as the code you run — never one from an
untrusted upload, download or share. state_path= loads at construction, so this applies to
instantiating a pipeline config too.
API reference¶
geoops.learn
¶
scikit-learn integration for GeoArray operator pipelines.
.. warning::
**Phase-1 API — subject to change.** This module ships a universal
``SklearnOp`` adapter plus ``Pixelwise*`` named-algorithm convenience
wrappers (``PixelwisePCA``, ``PixelwiseKMeans``, ...) as a
first cut. The full design calls for
a ``PixelTable`` carrier, first-class shape adapters (``ToPixelMajor``,
``ToTemporalPixelMajor``, ``ToChipMajor``), and type-named estimator
wrappers (``PixelwiseClassifier`` / ``Regressor`` / ``Transformer`` /
``Clusterer`` / ``Proba`` / ``Decision``) backed by a ``NanPolicy``
dataclass. Those are not implemented yet; the current ``mode=`` /
``nan_fit=`` / ``nan_transform=`` keyword surface will be replaced
with that vocabulary in a follow-up (a breaking change, without aliases).
**State files are pickles.** ``load_state`` / ``state_path=`` unpickle
with ``joblib.load``, which can execute arbitrary code: only load
files from a trusted source. ``save_state(..., write_meta=True)``
opts in to a timestamped ``<path>.meta.json`` sidecar.
**Supervised estimators (classifiers / regressors) must be pre-fit**
out-of-graph and loaded via ``state_path=``. The operator's in-graph
fit modes (``fit_on_call`` / ``refit`` / ``fit_streaming``) take a
single ``GeoArray`` and have no path for a label tensor ``y``.
Out-of-graph fitting is the preferred pattern; in-graph fit helpers
(``fit_pixelwise``, ``fit_pixelwise_incremental``) are not
implemented yet.
GeoArrayEstimator
¶
Marshall a scikit-learn estimator to and from GeoArray-shaped data.
scikit-learn works on 2-D (n_samples, n_features) matrices while
remote-sensing cubes are channel-first rasters. This class owns the
round trip between the two layouts. Axes follow the canonical
channel-first order — (H, W) for 2-D input, (C, H, W) for
3-D, (T, C, H, W) for 4-D — and mode picks which axes become
samples (rows) and which become features (columns):
"pixel": samples(H, W), features the rest. A(C, H, W)cube flattens to(H * W, C)— one row per pixel, one column per band."pixel_time": samples(T, H, W);(T, C, H, W)flattens to(T * H * W, C)."spectral": samples(C,);(C, H, W)flattens to(C, H * W)— one row per band."temporal": samples(T,); features are all remaining axes."patch": samples axis0;(N, ...)flattens to(N, prod(rest))."custom": explicitsample_axes/feature_axes(axis labels"T"/"C"/"H"/"W"or integer indices) that together must cover every input axis exactly once.
On the way back, a 1-D estimator output of length n_samples
unflattens to the sample shape ("pixel" -> (H, W)); a 2-D
output (n_samples, k) restores the sample axes to their original
positions and places the k output-feature axis where the first
input feature axis was ("pixel" on (C, H, W) -> (k, H, W)),
or in front of the sample axes when there is no feature axis
("pixel" on a single-band (H, W) -> (k, H, W)), so outputs
stay channel-first.
Nodata: a sample row is invalid when any of its elements is
non-finite or equals the carrier's fill_value (see
:mod:geoops._src.valid; plain ndarrays have no fill, so only
non-finite values count). The nan_* strategies apply to every
invalid row, not only NaN ones, and invalid elements are handed to
NaN-tolerant estimators and imputers as NaN. Following georeader,
a carrier with fill_value=0 treats 0 as nodata; pass
fill_value=None (or NaN) on the input when 0 is
real data.
Output fill values: rows that were not handed to the estimator are
written back as nodata, and every GeoArray output declares an
explicit fill_value that matches its dtype -- NaN for
floating-point outputs (scores, projections, probabilities),
label_fill_value (default -1) for integer outputs such as
cluster-label maps (the dtype is kept), False for boolean outputs.
Carrier behavior: every method accepts a GeoArray or a plain
np.ndarray. When the unflattened output's trailing two axes still
match the input's spatial (H, W), the result is rewrapped to
match the input carrier (GeoArray in -> GeoArray out with a fresh
attrs copy; ndarray in -> ndarray out). Otherwise a bare ndarray is
returned (e.g. sample-only outputs from mode="custom" or
mode="spectral", or nan_transform="drop" with invalid rows).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
estimator
|
Any
|
scikit-learn-compatible object to fit/apply. |
required |
mode
|
ReshapeMode
|
Named reshape mode. |
'pixel'
|
sample_axes
|
tuple[str | int, ...] | None
|
Explicit sample axes for |
None
|
feature_axes
|
tuple[str | int, ...] | None
|
Explicit feature axes for |
None
|
nan_fit
|
NanStrategy
|
NaN strategy used while fitting. |
'drop'
|
nan_transform
|
NanStrategy
|
NaN strategy used while applying the estimator. |
'propagate'
|
impute_simple_strategy
|
str
|
Strategy passed to |
'mean'
|
impute_knn_n_neighbors
|
int
|
Neighbour count passed to |
5
|
impute_iterative_max_iter
|
int
|
Iteration cap passed to |
10
|
out_band_names
|
Sequence[str] | None
|
Names of the output bands, written to
|
None
|
label_fill_value
|
int
|
Fill value for integer outputs (e.g. cluster
labels). |
-1
|
Attributes:
| Name | Type | Description |
|---|---|---|
estimator |
The wrapped scikit-learn estimator (replaced on
|
|
imputer |
Any | None
|
Fitted imputer for the |
is_fitted |
Whether |
|
fit_geoarray_shape |
tuple[int, ...] | None
|
Shape of the last cube seen at fit time. |
fit_n_samples |
int | None
|
Number of sample rows the estimator was fitted on. |
Examples:
>>> from sklearn.decomposition import PCA
>>> est = GeoArrayEstimator(PCA(n_components=2), mode="pixel")
>>> projected = est.fit(scene).transform(scene)
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 | |
decision_function(gt)
¶
Apply estimator.decision_function and unflatten the result.
See :meth:transform for the reshaping and carrier contract.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
fit(gt)
¶
Fit the wrapped estimator on the flattened sample matrix.
The cube is reshaped to (n_samples, n_features) according to
mode (e.g. "pixel" sends (C, H, W) to (H * W, C)),
the nan_fit strategy is applied to the rows, and the result
is handed to estimator.fit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gt
|
GeoArray | ndarray
|
Input cube — a |
required |
Returns:
| Type | Description |
|---|---|
Self
|
This estimator, for chaining. |
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
fit_predict(gt)
¶
Apply estimator.fit_predict and unflatten the result.
Fitting uses the nan_fit strategy (like :meth:fit); see
:meth:transform for the reshaping and carrier contract.
Raises:
| Type | Description |
|---|---|
TypeError
|
If the wrapped estimator has no |
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
inverse_transform(gt)
¶
Apply estimator.inverse_transform and unflatten the result.
See :meth:transform for the reshaping and carrier contract.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
load_state(path)
¶
Load a fitted estimator and imputer previously saved with joblib.
Warning
joblib.load unpickles the file, and unpickling can execute
arbitrary code. Only load state files you created yourself or
obtained from a source you trust as much as the code you run;
never load one from an untrusted upload, download or share.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
partial_fit(gt)
¶
Incrementally fit the wrapped estimator on one flattened batch.
Same (n_samples, n_features) marshalling and nan_fit
handling as :meth:fit, but routed to estimator.partial_fit
so streaming estimators accumulate state across calls. With an
impute_* nan_fit strategy the imputer is fitted on the
first batch only and reused (imputer.transform) for every
later batch, so no batch re-derives the imputation statistics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gt
|
GeoArray | ndarray
|
Input cube — a |
required |
Returns:
| Type | Description |
|---|---|
Self
|
This estimator, for chaining. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If the wrapped estimator has no |
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
predict(gt)
¶
Apply estimator.predict and unflatten the result.
See :meth:transform for the reshaping and carrier contract.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
predict_proba(gt)
¶
Apply estimator.predict_proba and unflatten the result.
See :meth:transform for the reshaping and carrier contract.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
save_state(path, *, write_meta=False)
¶
Persist the fitted estimator and any fitted imputer with joblib.
The file is a joblib pickle: load it only where you would run code
from its author (see :meth:load_state).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Destination file (parent directories are created). |
required |
write_meta
|
bool
|
Also write a |
False
|
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
transform(gt)
¶
Apply estimator.transform and unflatten the result.
The cube is flattened to (n_samples, n_features) per
mode, nan_transform is applied, and the estimator output
of shape (n_samples,) or (n_samples, k) is reshaped back
(the k output-feature axis replaces the first input feature
axis — "pixel" mode maps (C, H, W) input to (k, H, W)
output).
Returns a carrier matching the input (GeoArray in -> GeoArray
out, ndarray in -> ndarray out) when the output's trailing axes
match the input's spatial (H, W) shape; otherwise returns a
bare :class:numpy.ndarray (e.g. for sample-only outputs from
mode="custom", or nan_transform="drop" with invalid rows).
Source code in packages/geotoolz-ops/src/geoops/learn/_src/estimators.py
ModelOp
¶
Bases: Operator
Wrap any callable as an Operator.
Materialises the GeoArray to a plain np.ndarray (via
np.asarray) before handing it to the model — frameworks that
strip the subclass (torch, JAX, sklearn) don't care, and frameworks
that preserve it (numpy proper) still see something sensible.
Output contract: the model's return value is passed through as-is
and never rewrapped into the input carrier -- a GeoArray input
yields whatever the model returns (an np.ndarray, a torch tensor,
...) without transform / crs / fill_value. Rewrap
it yourself, or use :class:SklearnOp, which restores the grid for
per-pixel estimators.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
Any
|
Any object that can be called as |
required |
method
|
str
|
Method name to invoke on |
'__call__'
|
batch_size
|
int | None
|
If set, split the input along axis 0 into chunks of this size, call the model once per chunk, concatenate the results along axis 0. Useful when the model can't fit the whole input in GPU memory. |
None
|
Raises:
| Type | Description |
|---|---|
TypeError
|
At construction, when |
Note
forbid_in_yaml = True — the model is a runtime object and
won't round-trip to YAML. Users typically pin a model artifact
(state-dict + class config) themselves.
Examples:
A scikit-learn estimator sees the raw array, so feed it the
(n_samples, n_features) table it was fit on; for per-pixel
prediction on a (C, H, W) scene use :class:SklearnOp,
which flattens the pixels and restores the grid::
op = ModelOp(model=rf_clf, method="predict")
labels = op(features) # features: (n_samples, n_features)
Batched inference with a torch model::
op = ModelOp(model=unet_model, batch_size=8)
preds = op(chips_gt) # iterates 8 chips at a time
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 | |
PixelwiseGMM
¶
Bases: SklearnOp
Gaussian mixture convenience operator.
Pins mode="pixel" and task="predict_proba" — the output has
one band per mixture component; every other :class:SklearnOp
keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseIPCA
¶
Bases: SklearnOp
Streaming IncrementalPCA convenience operator.
Pins mode="pixel", fit_mode="fit_streaming" (each call routes
through partial_fit), task="transform"; every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseIsolationForest
¶
Bases: SklearnOp
Pixel-wise IsolationForest anomaly-score convenience operator.
Pins mode="pixel" and task="decision_function" — the output
is a single-band anomaly-score map; every other :class:SklearnOp
keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseIterativeImputer
¶
Bases: SklearnOp
Pixel-wise IterativeImputer convenience operator.
Pins mode="pixel", task="transform", and
nan_fit=nan_transform="propagate"; every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseKMeans
¶
Bases: SklearnOp
Pixel-wise KMeans label convenience operator.
Pins mode="pixel" and task="predict" — the output is a
single-band cluster-label map; every other :class:SklearnOp
keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseKNNImputer
¶
Bases: SklearnOp
Pixel-wise KNNImputer convenience operator.
Pins mode="pixel", task="transform", and
nan_fit=nan_transform="propagate" so the NaN-tolerant imputer
fits on the clean rows and NaN placement is preserved for it to
fill; every other :class:SklearnOp keyword argument passes
through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseLocalOutlierFactor
¶
Bases: SklearnOp
Pixel-wise LocalOutlierFactor convenience operator.
Pins mode="pixel" and task="decision_function"; requires the
estimator to be constructed with novelty=True (sklearn only
exposes decision_function in novelty mode). Every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseMiniBatchKMeans
¶
Bases: SklearnOp
Streaming MiniBatchKMeans convenience operator.
Pins mode="pixel", fit_mode="fit_streaming" (each call routes
through partial_fit), task="predict"; every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseNMF
¶
Bases: SklearnOp
Pixel-wise NMF convenience operator.
Pins mode="pixel" and task="transform"; every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwiseOneClassSVM
¶
Bases: SklearnOp
Pixel-wise OneClassSVM anomaly-score convenience operator.
Pins mode="pixel" and task="decision_function"; every other
:class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
PixelwisePCA
¶
Bases: SklearnOp
Pixel-wise PCA convenience operator.
Pins mode="pixel", task="transform", nan_fit="drop";
every other :class:SklearnOp keyword argument passes through.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
SklearnOp
¶
Bases: Operator
Universal adapter for scikit-learn-compatible estimators on GeoArrays.
Delegates the (C, H, W) <-> (n_samples, n_features) marshalling
to :class:GeoArrayEstimator and adds the fitting lifecycle
(fit_mode) plus joblib state persistence. Metadata-independent:
accepts a GeoArray or a plain np.ndarray and returns a
matching carrier whenever the estimator output preserves the input's
spatial (H, W) layout; sample-only outputs (and
nan_transform="drop" with invalid rows) come back as bare ndarrays.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
estimator
|
Any
|
scikit-learn-compatible object to wrap. |
required |
mode
|
ReshapeMode
|
Named reshape mode passed to :class: |
'pixel'
|
sample_axes
|
tuple[str | int, ...] | None
|
Explicit sample axes for |
None
|
feature_axes
|
tuple[str | int, ...] | None
|
Explicit feature axes for |
None
|
fit_mode
|
FitMode
|
Fitting lifecycle: |
'fit_on_call'
|
task
|
Task | None
|
Estimator method used at apply time. |
None
|
nan_fit
|
NanStrategy
|
NaN strategy used while fitting. |
'drop'
|
nan_transform
|
NanStrategy
|
NaN strategy used while applying the estimator. |
'propagate'
|
state_path
|
str | Path | None
|
Optional joblib path to load immediately, in the
constructor. Loading unpickles the file, which can execute
arbitrary code: only pass files from a trusted source (see
:meth: |
None
|
out_band_names
|
list[str] | None
|
Names of the output bands, written to
|
None
|
label_fill_value
|
int
|
Fill value of integer outputs such as
cluster-label maps (default |
-1
|
Fitted operator (see Fitted operators in the concepts guide):
:meth:fit / :meth:partial_fit fit the estimator explicitly and
:meth:transform / :meth:predict apply it without fitting, so the
operator satisfies :class:pipekit_ops.FittableTransformer and
:class:pipekit_ops.Predictor. The fitted estimator is never
part of get_config() (persist it with :meth:save_state).
Examples:
>>> from sklearn.decomposition import PCA
>>> op = SklearnOp(estimator=PCA(n_components=3), mode="pixel")
>>> projected = op(scene)
>>> # or fit on one scene, apply to others:
>>> op = SklearnOp(estimator=PCA(n_components=3)).fit(train_scene)
>>> projected = op.transform(scene)
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | |
is_fitted
property
¶
Whether the wrapped estimator has been fitted (or loaded).
fit(gt)
¶
Fit the wrapped estimator on gt (nan_fit strategy applies).
Returns:
| Type | Description |
|---|---|
Self
|
This operator, for chaining. |
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
load_state(path)
¶
Load fitted estimator state from path.
Warning
The state file is a joblib pickle and unpickling can execute arbitrary code. Only load files you created or that come from a source you trust as much as the code you run.
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
partial_fit(gt)
¶
Update a streaming estimator with one more batch.
Returns:
| Type | Description |
|---|---|
Self
|
This operator, for chaining. |
Source code in packages/geotoolz-ops/src/geoops/learn/_src/operators.py
predict(gt)
¶
save_state(path, *, write_meta=False)
¶
Persist fitted estimator state to path (a joblib pickle).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str | Path
|
Destination file. |
required |
write_meta
|
bool
|
Also write a timestamped |
False
|