Deprecated
This is the reference to the functions contained in
deprecated
. For now, they are all accesible directly
through machine-learning-datasets
and you don't
need to use the deprecated
namespace.
Common Utility Functions
encode_classification_error_vector(y_true, y_pred)
Encodes the classification error vector.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
y_true |
Union[Series, ndarray]
|
The true classification labels. |
required |
y_pred |
Union[Series, ndarray]
|
The predicted classification labels. |
required |
Returns:
Type | Description |
---|---|
Tuple[ndarray, Dict]
|
Tuple[np.ndarray, Dict]: A tuple containing the encoded error vector and the error labels. |
Example
y_true = np.array([1, 0, 1, 0]) y_pred = np.array([0, 0, 1, 1]) encode_classification_error_vector(y_true, y_pred) (array([3, 4, 1, 2]), {0: 'FP', 1: 'FN', 2: 'TP', 3: 'TN'})
Source code in machine_learning_datasets/deprecated.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
|
plot_3dim_decomposition(Z, y_labels, y_names, save_name=None)
Plots a 3-dimensional decomposition of the given data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
Z |
Union[DataFrame, ndarray]
|
The input data. |
required |
y_labels |
ArrayLike
|
The labels for the data points. |
required |
y_names |
Dict
|
A dictionary mapping label indices to their names. |
required |
save_name |
Optional[str]
|
The name to save the plot as. Defaults to None. |
None
|
Returns:
Type | Description |
---|---|
None
|
None |
Source code in machine_learning_datasets/deprecated.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
|