Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ModelX

Hierarchy

  • ModelX

Implements

  • ModelContext

Index

Constructors

Properties

Methods

Constructors

constructor

  • new ModelX(configuration: ModelConfiguration, options?: ModelOptions): ModelX
  • Parameters

    • configuration: ModelConfiguration
    • options: ModelOptions = ...

    Returns ModelX

Properties

DataSet

DataSet: DataSet

Model

Optional auto_assign_features

auto_assign_features: boolean

config

config: ModelConfiguration

cross_validation_options

cross_validation_options: CrossValidationOptions

debug

debug: boolean

Optional dependent_variables

dependent_variables: string[]

Optional dimension

dimension: Dimensions

emptyObject

emptyObject: Datum

Optional entity

entity: Entity

forecastDates

forecastDates: Date[]

getTimeseriesDimension

getTimeseriesDimension: timeseriesCalculation

Optional independent_variables

independent_variables: string[]

Optional input_independent_features

input_independent_features: AutoFeature[]

max_evaluation_outputs

max_evaluation_outputs: number

mockEncodedData

mockEncodedData: Data

original_data_test

original_data_test: Data

original_data_train

original_data_train: Data

Optional output_dependent_features

output_dependent_features: AutoFeature[]

Optional prediction_inputs

prediction_inputs: Data

Optional prediction_inputs_next_value_function

prediction_inputs_next_value_function: ForecastPredictionInputNextValueFunction

prediction_inputs_next_value_functions

prediction_inputs_next_value_functions: GeneratedFunctionDefinitionsList

Optional prediction_options

prediction_options: PredictModelConfig

prediction_timeseries_date_feature

prediction_timeseries_date_feature: string

Optional prediction_timeseries_date_format

prediction_timeseries_date_format: string

prediction_timeseries_dimension_feature

prediction_timeseries_dimension_feature: string

Optional prediction_timeseries_end_date

prediction_timeseries_end_date: string | Date

Optional prediction_timeseries_start_date

prediction_timeseries_start_date: string | Date

prediction_timeseries_time_zone

prediction_timeseries_time_zone: string

preprocessing_feature_column_options

preprocessing_feature_column_options: DataSetTransform

removedFilterdtrainingData

removedFilterdtrainingData: Data

Optional retrain_forecast_model_with_predictions

retrain_forecast_model_with_predictions: boolean

status

status: ModelStatus

testDataSet

testDataSet: DataSet

trainDataSet

trainDataSet: DataSet

trainingData

trainingData: Data

Optional training_data_filter_function

training_data_filter_function: DataFilterFunction

Optional training_data_filter_function_body

training_data_filter_function_body: string

training_feature_column_options

training_feature_column_options: DataSetTransform

Optional training_model_loss

training_model_loss: number

training_options

training_options: TensorScriptOptions

training_progress_callback

training_progress_callback: TrainingProgressCallback

Optional training_size_values

training_size_values: number

use_empty_objects

use_empty_objects: boolean

use_mock_encoded_data

use_mock_encoded_data: boolean

use_next_value_functions_for_training_data

use_next_value_functions_for_training_data: boolean

use_preprocessing_on_trainning_data

use_preprocessing_on_trainning_data: boolean

validate_training_data

validate_training_data: boolean

x_indep_matrix_test

x_indep_matrix_test: Matrix

x_indep_matrix_train

x_indep_matrix_train: Matrix

x_independent_features

x_independent_features: string[]

x_raw_independent_features

x_raw_independent_features: string[]

y_dep_matrix_test

y_dep_matrix_test: Matrix

y_dep_matrix_train

y_dep_matrix_train: Matrix

y_dependent_labels

y_dependent_labels: string[]

y_raw_dependent_labels

y_raw_dependent_labels: string[]

Static dimension

dimension: Dimensions

Static prediction_timeseries_date_feature

prediction_timeseries_date_feature: string

Static prediction_timeseries_date_format

prediction_timeseries_date_format: string

Static prediction_timeseries_dimension_feature

prediction_timeseries_dimension_feature: string

Methods

addMockData

  • addMockData(__namedParameters?: { use_mock_dates: any }): void
  • Parameters

    • __namedParameters: { use_mock_dates: any } = ...

    Returns void

checkTrainingStatus

  • checkTrainingStatus(options?: { retrain?: boolean }): Promise<boolean>
  • Parameters

    • options: { retrain?: boolean } = ...
      • Optional retrain?: boolean

    Returns Promise<boolean>

evaluateClassificationAccuracy

  • evaluateClassificationAccuracy(options?: EvaluationAccuracyOptions): { accuracy: any; actuals: any; estimates: any; labels: any; matrix: any }
  • Parameters

    • options: EvaluationAccuracyOptions = ...

    Returns { accuracy: any; actuals: any; estimates: any; labels: any; matrix: any }

    • accuracy: any
    • actuals: any
    • estimates: any
    • labels: any
    • matrix: any

evaluateModel

  • evaluateModel(options?: EvaluateModelOptions): Promise<EvaluateClassificationModel | EvaluateRegressionModel>
  • Parameters

    • options: EvaluateModelOptions = ...

    Returns Promise<EvaluateClassificationModel | EvaluateRegressionModel>

evaluateRegressionAccuracy

  • evaluateRegressionAccuracy(options?: EvaluationAccuracyOptions): RegressionEvaluation
  • Parameters

    • options: EvaluationAccuracyOptions = ...

    Returns RegressionEvaluation

getCrosstrainingData

  • getCrosstrainingData(): { test: any; train: any }
  • Returns { test: any; train: any }

    • test: any
    • train: any

getDataSetProperties

  • getDataSetProperties(options?: GetDataSetProperties): Promise<void>
  • Parameters

    • options: GetDataSetProperties = ...

    Returns Promise<void>

getForecastDates

  • getForecastDates(options?: {}): Date[]

getForecastDatesFromPredictionInputs

  • getForecastDatesFromPredictionInputs(options?: ValidateTimeseriesDataOptions): { forecastDates: any[]; raw_prediction_inputs: {}[] }
  • Parameters

    • options: ValidateTimeseriesDataOptions = ...

    Returns { forecastDates: any[]; raw_prediction_inputs: {}[] }

    • forecastDates: any[]
    • raw_prediction_inputs: {}[]

getPredictionData

  • getPredictionData(options?: { getPredictionInputPromise?: GetPredicitonData }): Promise<Data>
  • Parameters

    • options: { getPredictionInputPromise?: GetPredicitonData } = ...
      • Optional getPredictionInputPromise?: GetPredicitonData

    Returns Promise<Data>

getTrainingData

  • getTrainingData(options?: { getDataPromise?: GetPredicitonData; retrain?: boolean; trainingData?: Data }): Promise<void>
  • Parameters

    • options: { getDataPromise?: GetPredicitonData; retrain?: boolean; trainingData?: Data } = ...
      • Optional getDataPromise?: GetPredicitonData
      • Optional retrain?: boolean
      • Optional trainingData?: Data

    Returns Promise<void>

predictModel

  • predictModel(options?: Data | PredictModelOptions): Promise<any>
  • Parameters

    • options: Data | PredictModelOptions = ...

    Returns Promise<any>

removeMockData

  • removeMockData(__namedParameters?: { use_mock_dates: any }): void
  • Parameters

    • __namedParameters: { use_mock_dates: any } = ...

    Returns void

retrainTimeseriesModel

  • retrainTimeseriesModel(options?: retrainTimeseriesModel): Promise<ModelX>

timeseriesForecast

  • timeseriesForecast(options?: ValidateTimeseriesDataOptions): Promise<any[]>
  • Parameters

    • options: ValidateTimeseriesDataOptions = ...

    Returns Promise<any[]>

trainModel

  • trainModel(options?: ModelTrainningOptions): Promise<ModelX>

validateTimeseriesData

  • validateTimeseriesData(options?: ValidateTimeseriesDataOptions): Promise<{ datasetDates: any; dimension: Dimensions; forecastDateFirstDataSetDateIndex: any; forecastDates: Date[]; lastOriginalForecastDate: Date; raw_prediction_inputs: Data }>
  • Parameters

    • options: ValidateTimeseriesDataOptions = ...

    Returns Promise<{ datasetDates: any; dimension: Dimensions; forecastDateFirstDataSetDateIndex: any; forecastDates: Date[]; lastOriginalForecastDate: Date; raw_prediction_inputs: Data }>

validateTrainingData

  • validateTrainingData(__namedParameters?: { cross_validate_training_data?: boolean; inputMatrix?: Matrix }): boolean
  • Parameters

    • __namedParameters: { cross_validate_training_data?: boolean; inputMatrix?: Matrix } = ...
      • Optional cross_validate_training_data?: boolean
      • Optional inputMatrix?: Matrix

    Returns boolean

Static calcTimeseriesDimension

  • calcTimeseriesDimension(options?: { DataSetData?: Datum; dimension?: Dimensions; timeseries_date_feature?: string; timeseries_date_format?: string }): TimeseriesDimension
  • Attempts to automatically figure out the time dimension of each date feature (hourly, daily, etc) and the format of the date property (e.g. JS Date Object, or ISO String, etc) from the dataset data

    Parameters

    • options: { DataSetData?: Datum; dimension?: Dimensions; timeseries_date_feature?: string; timeseries_date_format?: string } = ...
      • Optional DataSetData?: Datum
      • Optional dimension?: Dimensions
      • Optional timeseries_date_feature?: string
      • Optional timeseries_date_format?: string

    Returns TimeseriesDimension