Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cumbof committed Jun 1, 2023
1 parent a4fdd5b commit f2a286d
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,20 @@ space = Space(from_file="~/space.pkl")
Here is the list of Space class methods:

| Method | Signature | Description |
|:-------------|:------------------------------------------------|:-------------|
| `memory` | | Return a list with Vector IDs |
| `get` | `names: list, tags: list` | Return a list of Vector objects based on a list of Vector IDs or tags |
| `insert` | `vector: Vector` | Insert a Vector object into the Space |
| `bulkInsert` | `names: list, tags: list` | Automatically create a Vector object for each of the ID in the input `names` list and finally insert them into the Space. Also tag vectors based on tags in the `tags` list of lists. Tags in position `i` are assigned to the Vector object whose name is in position `i` of the `vectors` list |
| `remove` | `name: str` | Remove a Vector object from the Space based on its ID |
| `add_tag` | `name: str, tag: str` | Assign a tag to a Vector object in the Space |
| `remove_tag` | `name: str, tag: str` | Remove a tag to a Vector object in the Space |
| `link` | `name1: str, name2: str` | Link two vectors in the Space. Note that links are directed |
| `set_root` | `name: str` | Vector links can be used to define a tree structure. Set a specific vector as root |
| `find` | `vector: Vector, threshold: float, method: str` | Given a specific Vector object, search for the closest Vector in the Space according to a specific distance metric: `cosine`, `hamming`, or `euclidean` |
| `find_all` | `vector: Vector, threshold: float, method: str` | Report the distance between the input Vector object and all the other Vectors in the Space |
| `dump` | `to_file: str` | Dump the Space object to a pickle file |
| Method | Signature | Description |
|:--------------|:------------------------------------------------|:-------------|
| `memory` | | Return a list with Vector IDs |
| `get` | `names: list, tags: list` | Return a list of Vector objects based on a list of Vector IDs or tags |
| `insert` | `vector: Vector` | Insert a Vector object into the Space |
| `bulk_insert` | `names: list, tags: list` | Automatically create a Vector object for each of the ID in the input `names` list and finally insert them into the Space. Also tag vectors based on tags in the `tags` list of lists. Tags in position `i` are assigned to the Vector object whose name is in position `i` of the `vectors` list |
| `remove` | `name: str` | Remove a Vector object from the Space based on its ID |
| `add_tag` | `name: str, tag: str` | Assign a tag to a Vector object in the Space |
| `remove_tag` | `name: str, tag: str` | Remove a tag to a Vector object in the Space |
| `link` | `name1: str, name2: str` | Link two vectors in the Space. Note that links are directed |
| `set_root` | `name: str` | Vector links can be used to define a tree structure. Set a specific vector as root |
| `find` | `vector: Vector, threshold: float, method: str` | Given a specific Vector object, search for the closest Vector in the Space according to a specific distance metric: `cosine`, `hamming`, or `euclidean` |
| `find_all` | `vector: Vector, threshold: float, method: str` | Report the distance between the input Vector object and all the other Vectors in the Space |
| `dump` | `to_file: str` | Dump the Space object to a pickle file |

### Arithmetic Operations

Expand All @@ -123,6 +123,15 @@ Here are the characteristics of these operators:
| `bind` | (i) Invertible (unbind), (ii) it distributes over bundling, (iii) it preserves the distance, and (iv) the resulting vector is dissimilar to the input vectors |
| `permute` | (i) Invertible, (ii) it distributes over bundling and any elementwise operation, (iii) it preserves the distance, and (iv) the resulting vector is dissimilar to the input vectors |

### Utilities

The `hdlib` library also provides a set of utilities for dealing with input datasets collected under the `parser` module:

| Method | Signature | Description |
|:----------------|:--------------------------|:-------------|
| `load_dataset` | `filepath: str, sep: str` | Given a numerical matrix file, load the list of samples, features, classes, and the matrix with numerical data |
| `split_dataset` | `points: int, folds: int` | Given a number of data points and the number of folds, split a dataset into different folds |

## Contributing

Long-term discussion and bug reports are maintained via GitHub Issues, while code review is managed via GitHub Pull Requests.
Expand Down

0 comments on commit f2a286d

Please sign in to comment.