basilica: Basilica

Description Creating an API key How many data points do I need? What do these features mean? Author(s) See Also Examples

Description

Extract features from your images and natural language text. This package provides several 'embed_*' functions that return a vector of features (embeddings) you can easily feed into a regression or any other type of model. The package uses the Basilica.ai API.

Creating an API key

You can use basilica with our "SLOW_DEMO_KEY", which is an evaluation key with a limit of 5,000 requests per week per IP address. You can create an API key for free at www.basilica.ai, which will give you more requests.

How many data points do I need?

For training your own models with embeddings provided by Basilica, you should have around 1,000 data points. The more data points the better though. Some models might have good results with less data, while others might need more.

What do these features mean?

The features provided by Basilica are points in high-dimensional space where two points that are considered similar. These embeddings are trained through deep neural networks trained on a variety of tasks with millions of data points. Go to https://www.basilica.ai/available-embeddings/ to read more about our different embeddings.

Author(s)

Maintainer: Jorge Silva jorge@basilica.ai

See Also

Useful links:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(basilica)
conn <- connect("SLOW_DEMO_KEY")

sentences <- c(
   "This is a sentence!",
   "This is a similar sentence!",
   "I don't think this sentence is very similar at all..."
)

embeddings <- embed_sentences(sentences, conn=conn)
print(dim(embeddings)) # 3 512
print(embeddings) # [[0.8556405305862427, ...], ...]

print(cor(embeddings[1,], embeddings[2,])) # 0.8048559
print(cor(embeddings[1,], embeddings[3,])) # 0.6877435

basilica-ai/basilica-r-client documentation built on June 6, 2019, 3:40 p.m.