Repository: andersbogsnes/ml_tooling

Issue:
ENH: change __repr__ for demodata to include dataset name 
**Is your feature request related to a problem? Please describe.**
The ML-developer want to know which dataset they use. 

**Describe the solution you'd like**
Should show 'Boston - data" when printing demo-dataset based on Boston. 



Discussion:
codecov[bot]: # [Codecov](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=h1) Report
> Merging [#653](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=desc) into [develop](https://codecov.io/gh/andersbogsnes/ml_tooling/commit/16e153c5f8d178c097ed574a2a6e8b396c474c1a&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653/graphs/tree.svg?width=650&height=150&src=pr&token=ucKtL3BlxO)](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##           develop      #653   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         1675      1675           
  Branches       189       189           
=========================================
  Hits          1675      1675           
```


| [Impacted Files](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/ml\_tooling/data/load\_demo.py](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653/diff?src=pr&el=tree#diff-c3JjL21sX3Rvb2xpbmcvZGF0YS9sb2FkX2RlbW8ucHk=) | `100.00% <ø> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=footer). Last update [16e153c...beff7e4](https://codecov.io/gh/andersbogsnes/ml_tooling/pull/653?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 74e1c19..cdda3a2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
 - Added a `read_file` convenience method to `FileDataset` to read
 - Fixed a bug where `copy_to` failed between two instances of Sqlite based SQLDatasets
 - Fixed a bug where `ClassificationVisualize.confusion_matrix` would fail on multi-class problems due to wrong defaults
+- Added __repr__ to demodataset
 - Lift curve now can plot multi-class
 - Precision-Recall curve can now plot multi-class
 - ROC AUC curve can now plot multi-class
diff --git a/docs/baseclass.rst b/docs/baseclass.rst
index e6992e3..f3b843b 100644
--- a/docs/baseclass.rst
+++ b/docs/baseclass.rst
@@ -27,7 +27,7 @@ We then simply wrap a :class:`~sklearn.linear_model.LinearRegression` using our
     >>> bostondata = load_demo_dataset("boston")
     >>> # Remember to setup a train test split!
     >>> bostondata.create_train_test()
-    <DemoData - Dataset>
+    <BostonData - Dataset>
 
 Creating your model
 ~~~~~~~~~~~~~~~~~~~
diff --git a/docs/dataset.rst b/docs/dataset.rst
index 69589c1..776f0f1 100644
--- a/docs/dataset.rst
+++ b/docs/dataset.rst
@@ -101,4 +101,4 @@ If you want to test your model on a demo datasets from :ref:`sklearn:datasets`,
     >>> bostondata = load_demo_dataset("boston")
     >>> # Remember to setup a train test split!
     >>> bostondata.create_train_test()
-    <DemoData - Dataset>
+    <BostonData - Dataset>
diff --git a/src/ml_tooling/data/load_demo.py b/src/ml_tooling/data/load_demo.py
index 050d121..a72c38e 100644
--- a/src/ml_tooling/data/load_demo.py
+++ b/src/ml_tooling/data/load_demo.py
@@ -72,4 +72,7 @@ def load_demo_dataset(dataset_name: str, **kwargs) -> Dataset:
             x = pd.DataFrame(selected_data.data, columns=selected_data.feature_names)
             return x.loc[[idx]]
 
+        def __repr__(self):
+            return f"<{dataset_name.capitalize()}Data - Dataset>"
+
     return DemoData()


Test patch:
diff --git a/tests/test_datasets/test_demo_dataset.py b/tests/test_datasets/test_demo_dataset.py
index 09d4f6f..6bb84ae 100644
--- a/tests/test_datasets/test_demo_dataset.py
+++ b/tests/test_datasets/test_demo_dataset.py
@@ -28,7 +28,7 @@ class TestDemoDatasetModule:
 
     def test_repr_is_correct_load(self, load_dataset_iris: Dataset):
         result = str(load_dataset_iris)
-        assert result == "<DemoData - Dataset>"
+        assert result == "<IrisData - Dataset>"
 
     def test_dataset_return_correct_x_attribute(
         self, load_dataset_iris: Dataset, iris_df: Tuple[pd.DataFrame, DataType]