Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
SurgeArrester committed Mar 6, 2021
1 parent e528474 commit 2e615e8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ mapper.fit(df["formula"])

print(mapper.dm)

mapper.export_dm("ComputedMatrix.pk")
...
mapper.import_dm("ComputedMatrix.pk")
mapper.export_dm("ComputedMatrix.csv")
```

This distance matrix can be used as a lookup table for distances between compositions given their numeric indices (`distance = mapper.dm[i][j]`) or used as a kernel matrix for embedding, regression, and classification tasks directly.
Expand All @@ -55,6 +53,11 @@ Embeddings can be constructed through either the [UMAP](https://github.com/lmcin

```python
mapper = ElM2D()
mapper.fit(df["formula"])
embedding = mapper.transform()
...

# For new data
embedding = mapper.fit_transform(df["formula"])
embedding = mapper.fit_transform(df["formula"], how="PCA", n_components=7)
```
Expand Down

0 comments on commit 2e615e8

Please sign in to comment.