RemoteDatasetLoader

class RemoteDatasetLoader(dataset_name)[source]

Bases: chemicalx.data.datasetloader.DatasetLoader

A dataset loader for remote data.

Methods Summary

generate_path(file_name)

Generate a complete url for a dataset file.

get_context_features()

Get the context feature set.

get_drug_features()

Get the drug feature set.

get_labeled_triples()

Get the labeled triples file from the storage.

load_raw_csv_data(path)

Load a CSV dataset at the given path.

load_raw_json_data(path)

Load a raw JSON dataset at the given path.

Methods Documentation

generate_path(file_name)[source]

Generate a complete url for a dataset file.

Parameters

file_name (str) – Name of the data file.

Return type

str

Returns

The complete url to the dataset.

get_context_features()[source]

Get the context feature set.

Return type

ContextFeatureSet

get_drug_features()[source]

Get the drug feature set.

Return type

DrugFeatureSet

get_labeled_triples()[source]

Get the labeled triples file from the storage.

Return type

LabeledTriples

load_raw_csv_data(path)[source]

Load a CSV dataset at the given path.

Parameters

path (str) – The path to the triples CSV file.

Return type

DataFrame

Returns

A pandas DataFrame with the data.

load_raw_json_data(path)[source]

Load a raw JSON dataset at the given path.

Parameters

path (str) – The path to the JSON file.

Return type

Dict

Returns

A dictionary with the data.