Experiment¶
-
class
previsionio.experiment.
Experiment
(_id: str, project_id: str, provider: str, name: str, training_type: previsionio.experiment_config.TypeProblem, data_type: previsionio.experiment_config.DataType)¶ Bases:
previsionio.api_resource.ApiResource
An Experiment
Parameters: -
delete
()¶ Delete an experiment from the actual [client] workspace.
Raises: PrevisionException
– If the experiment does not existrequests.exceptions.ConnectionError
– Error processing the request
-
experiment_version_class
¶ Get the type of ExperimentVersion class used by this Experiment
Returns: ( previsionio.text_similarity.TextSimilarity
|Supervised
|TimeSeries
|ExternalExperimentVersion
): Type of ExperimentVersion
-
classmethod
from_id
(_id: str) → previsionio.experiment.Experiment¶ Get an experiment from the platform by its unique id.
Parameters: _id (str) – Unique id of the experiment version to retrieve Returns: Fetched experiment Return type: Experiment
Raises: PrevisionException
– Any error while fetching data from the platform or parsing result
-
latest_version
¶ Get the latest version of this experiment version.
Returns: latest ExperimentVersion in this Experiment Return type: ( previsionio.text_similarity.TextSimilarity
|Supervised
|TimeSeries
)
-
classmethod
list
(project_id: str, all: bool = True) → List[previsionio.experiment.Experiment]¶ List all the available experiment in the current active [client] workspace.
Warning
Contrary to the parent
list()
function, this method returns actualExperiment
objects rather than plain dictionaries with the corresponding data.Parameters: - project_id (str) – project id
- all (boolean, optional) – Whether to force the SDK to load all items of the given type (by calling the paginated API several times). Else, the query will only return the first page of result.
Returns: Fetched dataset objects
Return type: list(
Experiment
)
-
versions
¶ Get the list of all versions for the current experiment version.
Returns: List of the experiment versions (as JSON metadata) Return type: list( previsionio.text_similarity.TextSimilarity
|Supervised
|TimeSeries
)
-
-
previsionio.experiment.
get_experiment_version_class
(training_type: previsionio.experiment_config.TypeProblem, data_type: previsionio.experiment_config.DataType, provider: str) → Union[Type[previsionio.text_similarity.TextSimilarity], Type[previsionio.supervised.Supervised], Type[previsionio.timeseries.TimeSeries], Type[previsionio.external_experiment_version.ExternalExperimentVersion]]¶ Get the type of ExperimentVersion class used by this Experiment
Returns: ( previsionio.text_similarity.TextSimilarity
|Supervised
|TimeSeries
|ExternalExperimentVersion
): Type of ExperimentVersion