Task API

AutoKeras support the following task APIs.

[source]

ImageClassifier class

autokeras.task.ImageClassifier(
    num_classes=None,
    multi_label=False,
    loss=None,
    metrics=None,
    name="image_classifier",
    max_trials=100,
    directory=None,
    objective="val_loss",
    seed=None,
)

AutoKeras image classification class.

Arguments

  • num_classes: Int. Defaults to None. If None, it will infer from the data.
  • multi_label: Boolean. Defaults to False.
  • loss: A Keras loss function. Defaults to use 'binary_crossentropy' or 'categorical_crossentropy' based on the number of classes.
  • metrics: A list of Keras metrics. Defaults to use 'accuracy'.
  • name: String. The name of the AutoModel. Defaults to 'image_classifier'.
  • max_trials: Int. The maximum number of different Keras Models to try. The search may finish before reaching the max_trials. Defaults to 100.
  • directory: String. The path to a directory for storing the search outputs. Defaults to None, which would create a folder with the name of the AutoModel in the current directory.
  • objective: String. Name of model metric to minimize or maximize, e.g. 'val_accuracy'. Defaults to 'val_loss'.
  • seed: Int. Random seed.

[source]

ImageRegressor class

autokeras.task.ImageRegressor(
    output_dim=None,
    loss=None,
    metrics=None,
    name="image_regressor",
    max_trials=100,
    directory=None,
    objective="val_loss",
    seed=None,
)

AutoKeras image regression class.

Arguments

  • output_dim: Int. The number of output dimensions. Defaults to None. If None, it will infer from the data.
  • multi_label: Boolean. Defaults to False.
  • loss: A Keras loss function. Defaults to use 'mean_squared_error'.
  • metrics: A list of Keras metrics. Defaults to use 'mean_squared_error'.
  • name: String. The name of the AutoModel. Defaults to 'image_regressor'.
  • max_trials: Int. The maximum number of different Keras Models to try. The search may finish before reaching the max_trials. Defaults to 100.
  • directory: String. The path to a directory for storing the search outputs. Defaults to None, which would create a folder with the name of the AutoModel in the current directory.
  • objective: String. Name of model metric to minimize or maximize, e.g. 'val_accuracy'. Defaults to 'val_loss'.
  • seed: Int. Random seed.

[source]

TextClassifier class

autokeras.task.TextClassifier(
    num_classes=None,
    multi_label=False,
    loss=None,
    metrics=None,
    name="text_classifier",
    max_trials=100,
    directory=None,
    objective="val_loss",
    seed=None,
)

AutoKeras text classification class.

Arguments

  • num_classes: Int. Defaults to None. If None, it will infer from the data.
  • multi_label: Boolean. Defaults to False.
  • loss: A Keras loss function. Defaults to use 'binary_crossentropy' or 'categorical_crossentropy' based on the number of classes.
  • metrics: A list of Keras metrics. Defaults to use 'accuracy'.
  • name: String. The name of the AutoModel. Defaults to 'text_classifier'.
  • max_trials: Int. The maximum number of different Keras Models to try. The search may finish before reaching the max_trials. Defaults to 100.
  • directory: String. The path to a directory for storing the search outputs. Defaults to None, which would create a folder with the name of the AutoModel in the current directory.
  • objective: String. Name of model metric to minimize or maximize, e.g. 'val_accuracy'. Defaults to 'val_loss'.
  • seed: Int. Random seed.

[source]

TextRegressor class

autokeras.task.TextRegressor(
    output_dim=None,
    loss=None,
    metrics=None,
    name="text_regressor",
    max_trials=100,
    directory=None,
    objective="val_loss",
    seed=None,
)

AutoKeras text regression class.

Arguments

  • output_dim: Int. The number of output dimensions. Defaults to None. If None, it will infer from the data.
  • multi_label: Boolean. Defaults to False.
  • loss: A Keras loss function. Defaults to use 'mean_squared_error'.
  • metrics: A list of Keras metrics. Defaults to use 'mean_squared_error'.
  • name: String. The name of the AutoModel. Defaults to 'text_regressor'.
  • max_trials: Int. The maximum number of different Keras Models to try. The search may finish before reaching the max_trials. Defaults to 100.
  • directory: String. The path to a directory for storing the search outputs. Defaults to None, which would create a folder with the name of the AutoModel in the current directory.
  • objective: String. Name of model metric to minimize or maximize, e.g. 'val_accuracy'. Defaults to 'val_loss'.
  • seed: Int. Random seed.

Coming Soon:

StructuredDataClassifier

StructuredDataRegressor

TimeSeriesForecaster