Crate tangram[][src]

Expand description

The Tangram crate makes it easy to make predictions with your Tangram machine learning model from Rust.

Usage

[dependencies]
tangram = "*"
let model: tangram::Model = tangram::Model::from_path("heart_disease.tangram", None).unwrap();

let input = tangram::predict_input! {
  "age": 63.0,
  "gender": "male",
  // ...
};

let output = model.predict_one(input, None);

For more information, read the docs.

Macros

Structs

This describes the contribution of a feature from a bag of words cosine similarity feature group.

This describes the contribution of a feature from a bag of words feature group.

This is the output of calling Model::predict on a Model whose task is binary classification.

This is a description of the feature contributions for the prediction if the task is regression or binary classification, or for a single class if the task is multiclass classification.

This describes the contribution of a feature from an identity feature group.

These are the options passed when loading a Model.

This is the type of the argument to Model::log_prediction and Model::enqueue_log_prediction which specifies the details of the prediction to log.

This is the type of the argument to Model::log_true_value and Model::enqueue_log_true_value which specifies the details of the true value to log.

Use this struct to load a model, make predictions, and log events to the app.

This is the output of calling Model::predict on a Model whose task is multiclass classification.

This describes the contribution of a feature from a normalized feature group.

This is the input type of Model::predict. A predict input is a map whose keys are the same as the column names in the CSV the model was trained with, and whose values match the type for each column.

These are the options passed to Model::predict.

This is the output of calling Model::predict on a Model whose task is regression.

This describes the contribution of a feature from a word vector feature group.

Enums

This identifies the type of a feature contribution.

This is a sequence of n tokens. Tangram currently supports unigrams and bigrams.

This is the output of Model::predict.

Traits

Derive Macros