A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://umap-learn.readthedocs.io/en/latest/nomic_atlas_umap_of_text_embeddings.html below:

Website Navigation


UMAP of Text Embeddings with Nomic Atlas — umap 0.5.8 documentation

UMAP of Text Embeddings with Nomic Atlas

Nomic Atlas is a platform for interactively visualizing and exploring massive datasets. It automates the creation of embeddings and 2D coordinate projections using UMAP.

Nomic Atlas automatically generates embeddings for your data and allows you to explore large datasets in a web browser. Atlas provides:

This example demonstrates how to use Nomic Atlas to create interactive maps of text using embeddings and UMAP.

Setup
  1. Get the required python packages with pip instll nomic pandas

  2. Get a Nomic API key here

  3. Run nomic login nk-... in a terminal window or use the following code:

import nomic
nomic.login('nk-...')
Download Example Data
import pandas as pd

# Example data
df = pd.read_csv("https://docs.nomic.ai/singapore_airlines_reviews.csv")
Create Atlas Dataset
from nomic import AtlasDataset
dataset = AtlasDataset("airline-reviews-data")
Upload to Atlas Create Data Map

We specify the text field from df as the field to create embeddings from. We choose some standard UMAP parameters as well.

from nomic.data_inference import ProjectionOptions

# model="umap" is how you choose UMAP in Nomic Atlas
# You can adjust n_neighbors, min_dist,
# and n_epochs as you would with the UMAP library.
atlas_map = dataset.create_index(
    indexed_field='text',
    projection=ProjectionOptions(
      model="umap",
      n_neighbors=20,
      min_dist=0.01,
      n_epochs=200
  )
)

print(f"Explore your interactive map at: {atlas_map.map_link}")

Your map will be available in your Atlas Dashboard.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4