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).

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()

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. 


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]

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.7
requirements.txt dev-requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
appdirs==1.4.4
attrs==19.3.0
Babel==2.14.0
certifi==2020.6.20
cfgv==3.1.0
chardet==3.0.4
coverage==5.2.1
cycler==0.10.0
distlib==0.3.9
docutils==0.19
dohq-artifactory==0.7.382
filelock==3.12.2
identify==1.4.25
idna==2.10
imagesize==1.4.1
importlib-metadata==6.7.0
iniconfig==1.0.0
Jinja2==3.1.6
joblib==0.16.0
kiwisolver==1.2.0
MarkupSafe==2.1.5
matplotlib==3.3.0
-e git+https://github.com/andersbogsnes/ml_tooling.git@16e153c5f8d178c097ed574a2a6e8b396c474c1a#egg=ml_tooling
more-itertools==8.4.0
nodeenv==1.4.0
numpy==1.19.1
packaging==24.0
pandas==1.1.0
Pillow==7.2.0
platformdirs==4.0.0
pluggy==0.13.1
pre-commit==2.6.0
py==1.9.0
pyaml==20.4.0
Pygments==2.17.2
PyJWT==1.7.1
pyparsing==2.4.7
pytest==6.0.1
pytest-cov==2.10.0
python-dateutil==2.8.1
pytz==2020.1
PyYAML==5.3.1
requests==2.24.0
scikit-learn==0.23.1
scikit-optimize==0.7.4
scipy==1.5.2
six==1.15.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
SQLAlchemy==1.3.18
threadpoolctl==2.1.0
toml==0.10.1
tomli==2.0.1
tox==3.28.0
typing_extensions==4.7.1
urllib3==1.25.10
virtualenv==20.26.6
zipp==3.15.0

name: ml_tooling
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - appdirs==1.4.4
      - attrs==19.3.0
      - babel==2.14.0
      - certifi==2020.6.20
      - cfgv==3.1.0
      - chardet==3.0.4
      - coverage==5.2.1
      - cycler==0.10.0
      - distlib==0.3.9
      - docutils==0.19
      - dohq-artifactory==0.7.382
      - filelock==3.12.2
      - identify==1.4.25
      - idna==2.10
      - imagesize==1.4.1
      - importlib-metadata==6.7.0
      - iniconfig==1.0.0
      - jinja2==3.1.6
      - joblib==0.16.0
      - kiwisolver==1.2.0
      - markupsafe==2.1.5
      - matplotlib==3.3.0
      - more-itertools==8.4.0
      - nodeenv==1.4.0
      - numpy==1.19.1
      - packaging==24.0
      - pandas==1.1.0
      - pillow==7.2.0
      - platformdirs==4.0.0
      - pluggy==0.13.1
      - pre-commit==2.6.0
      - py==1.9.0
      - pyaml==20.4.0
      - pygments==2.17.2
      - pyjwt==1.7.1
      - pyparsing==2.4.7
      - pytest==6.0.1
      - pytest-cov==2.10.0
      - python-dateutil==2.8.1
      - pytz==2020.1
      - pyyaml==5.3.1
      - requests==2.24.0
      - scikit-learn==0.23.1
      - scikit-optimize==0.7.4
      - scipy==1.5.2
      - six==1.15.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sqlalchemy==1.3.18
      - threadpoolctl==2.1.0
      - toml==0.10.1
      - tomli==2.0.1
      - tox==3.28.0
      - typing-extensions==4.7.1
      - urllib3==1.25.10
      - virtualenv==20.26.6
      - zipp==3.15.0
prefix: /opt/conda/envs/ml_tooling

tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_repr_is_correct_load
tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_dataset_return_correct_x_attribute tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_dataset_return_correct_y_attribute tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_dataset_from_fetchopenml_works tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_dataset_x_from_fetchopenml_with_parameters_works tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_dataset_y_from_fetchopenml_with_two_target_columns_works tests/test_datasets/test_demo_dataset.py::TestDemoDatasetModule::test_load_prediction_data_works_as_expected
docs/baseclass.rst src/ml_tooling/data/load_demo.py docs/dataset.rst CHANGELOG.md
docs/baseclass.rst src/ml_tooling/data/load_demo.py docs/dataset.rst CHANGELOG.md