Implementation of ModelsApiClient that goes through the REST API

Hierarchy

Constructors

Properties

sqlClient: default

SQL API client to send all SQL query requests.

Methods

  • Partially adjusts this model with the given options.

    Throws

    • Something went wrong querying the model.

    Parameters

    • name: string

      Name of the model.

    • project: string

      Project the model belongs to.

    • adjustOptions: AdjustOptions

    Returns Promise<void>

  • Queries this model for a batch prediction by joining with another data source.

    Returns

    • All prediction results from the batch query.

    Throws

    • Something went wrong querying the model.

    Parameters

    • name: string

      Name of the model.

    • version: number
    • targetColumn: string

      Column that the model predicts.

    • project: string

      Project the model belongs to.

    • options: BatchQueryOptions

      Options to use when querying the model.

    Returns Promise<ModelPrediction[]>

  • Deletes this model.

    Throws

    • Something went wrong deleting the model.

    Parameters

    • name: string

      Name of the model.

    • project: string

      Project the model belongs to.

    Returns Promise<void>

  • Gets a model by name and project.

    Returns

    • The matching model, or undefined if none exists.

    Parameters

    • name: string

      Name of the model.

    • project: string

      Project the model belongs to.

    • Optional version: number

      The version of the model.

    Returns Promise<undefined | Model>

  • Queries this model for a single prediction. For batch predictions, use batchQuery.

    Returns

    • The prediction result.

    Throws

    • Something went wrong querying the model.

    Parameters

    • name: string

      Name of the model.

    • version: number
    • targetColumn: string

      Column that the model predicts.

    • project: string

      Project the model belongs to.

    • options: QueryOptions

      Options to use when querying the model.

    Returns Promise<ModelPrediction>

  • Rerains this model with the given options.

    Throws

    • Something went wrong querying the model.

    Parameters

    • name: string

      Name of the model.

    • targetColumn: string

      Column for the model to predict.

    • project: string

      Project the model belongs to.

    • Optional trainingOptions: TrainingOptions

    Returns Promise<void>

  • Trains this model with the given options.

    Throws

    • Something went wrong querying the model.

    Parameters

    • name: string

      Name of the model.

    • targetColumn: string

      Column for the model to predict.

    • project: string

      Project the model belongs to.

    • trainingOptions: TrainingOptions

    Returns Promise<Model>

Generated using TypeDoc