mirror of
https://github.com/lancedb/lancedb.git
synced 2026-05-26 08:20:39 +00:00
This adds a rust permutation builder. In the next PR I will have python bindings and integration with pytorch.
35 lines
685 B
Markdown
35 lines
685 B
Markdown
[**@lancedb/lancedb**](../README.md) • **Docs**
|
|
|
|
***
|
|
|
|
[@lancedb/lancedb](../globals.md) / permutationBuilder
|
|
|
|
# Function: permutationBuilder()
|
|
|
|
```ts
|
|
function permutationBuilder(table): PermutationBuilder
|
|
```
|
|
|
|
Create a permutation builder for the given table.
|
|
|
|
## Parameters
|
|
|
|
* **table**: [`Table`](../classes/Table.md)
|
|
The source table to create a permutation from
|
|
|
|
## Returns
|
|
|
|
[`PermutationBuilder`](../classes/PermutationBuilder.md)
|
|
|
|
A PermutationBuilder instance
|
|
|
|
## Example
|
|
|
|
```ts
|
|
const builder = permutationBuilder(sourceTable, "training_data")
|
|
.splitRandom({ ratios: [0.8, 0.2], seed: 42 })
|
|
.shuffle({ seed: 123 });
|
|
|
|
const trainingTable = await builder.execute();
|
|
```
|