View Source Scitree.Validations (scitree v0.1.0)
Validations to ensure data is consistent and in the format expected by Yggdrasil.
Link to this section Summary
Functions
Checks if config learner is valid.
Checks if all columns are the same size.
Checks if the configuration label is in the dataset.
Check if the task config is compatible with the type of the dataset's label column.
Link to this section Types
Link to this section Functions
@spec validate_config_learner(data(), Scitree.Config.t()) :: :ok | {:error, :unknown_learner}
Checks if config learner is valid.
examples
Examples
iex> Scitree.Validations.validate_config_learner(data, config)
{:error, :unknown_learner}
@spec validate_dataset_size(data(), Scitree.Config.t()) :: :ok | {:error, :incompatible_column_sizes}
Checks if all columns are the same size.
examples
Examples
iex> Scitree.Validations.validate_dataset_size(data, config)
{:error, :incompatible_column_sizes}
@spec validate_label(data(), Scitree.Config.t()) :: :ok | {:error, :unidentified_label}
Checks if the configuration label is in the dataset.
examples
Examples
iex> Scitree.Validations.validate_label(data, config)
{:error, :unidentified_label}
@spec validate_task(data(), Scitree.Config.t()) :: :ok | {:error, {:incompatible_column_for_task, atom(), [atom()]}}
Check if the task config is compatible with the type of the dataset's label column.
examples
Examples
iex> Scitree.Validations.validate_task({{"my column", :numerical, 1}}, %{label: "my column", task: :classification})
{:error, {:incompatible_column_for_task, :numerical, [:categorical, :string]}