diff --git a/SL/aufgaben/workshop1/README.md b/SL/aufgaben/workshop1/README.md index 3efa308..c3c933f 100644 --- a/SL/aufgaben/workshop1/README.md +++ b/SL/aufgaben/workshop1/README.md @@ -48,10 +48,12 @@ Hierarchie: `nominal ⊂ ordinal ⊂ intervall ⊂ ratio` ``` . ├── devenv.nix +├── devenv.lock +├── devenv.yaml ├── data/ │ └── melb_data.csv └── notebooks/ - └── 01_skalenniveaus.ipynb + └── 01_skalenniveaus.md ``` ## Libraries diff --git a/SL/aufgaben/workshop1/devenv.lock b/SL/aufgaben/workshop1/devenv.lock new file mode 100644 index 0000000..ca8e6d8 --- /dev/null +++ b/SL/aufgaben/workshop1/devenv.lock @@ -0,0 +1,103 @@ +{ + "nodes": { + "devenv": { + "locked": { + "dir": "src/modules", + "lastModified": 1779303056, + "narHash": "sha256-+DJSNTtrdUb5yelcKp8fa5aITlg050701WCOJt0oMtI=", + "owner": "cachix", + "repo": "devenv", + "rev": "0d0be23517b92cbcedd95a0dbb6f735deae9b38c", + "type": "github" + }, + "original": { + "dir": "src/modules", + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "nixpkgs": { + "inputs": { + "nixpkgs-src": "nixpkgs-src" + }, + "locked": { + "lastModified": 1778507786, + "narHash": "sha256-HzSQCKMsMr8r55LwM1JuzIOB+8bzk0FEv6sItKvsfoY=", + "owner": "cachix", + "repo": "devenv-nixpkgs", + "rev": "8f24a228a782e24576b155d1e39f0d914b380691", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "rolling", + "repo": "devenv-nixpkgs", + "type": "github" + } + }, + "nixpkgs-python": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1779117433, + "narHash": "sha256-iKhNJH1ABTrPvDF6Sd1U+GCVYSh8Xn88ee10ko7PvvE=", + "owner": "cachix", + "repo": "nixpkgs-python", + "rev": "a0f88fb785debcb0a201d0ce311a2e3d829e4a1b", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "nixpkgs-python", + "type": "github" + } + }, + "nixpkgs-src": { + "flake": false, + "locked": { + "lastModified": 1778274207, + "narHash": "sha256-I4puXmX1iovcCHZlRmztO3vW0mAbbRvq4F8wgIMQ1MM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b3da656039dc7a6240f27b2ef8cc6a3ef3bccae7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "devenv": "devenv", + "nixpkgs": "nixpkgs", + "nixpkgs-python": "nixpkgs-python" + } + } + }, + "root": "root", + "version": 7 +} \ No newline at end of file diff --git a/SL/aufgaben/workshop1/devenv.nix b/SL/aufgaben/workshop1/devenv.nix new file mode 100644 index 0000000..2f95820 --- /dev/null +++ b/SL/aufgaben/workshop1/devenv.nix @@ -0,0 +1,27 @@ +{ pkgs, lib, config, ... }: + +{ + languages.python = { + enable = true; + version = "3.12"; + venv.enable = true; + venv.requirements = '' + ipython + jupyter + jupyterlab + numpy + pandas + matplotlib + seaborn + scikit-learn + imbalanced-learn + statsmodels + ydata-profiling + ''; + }; + + packages = [ + pkgs.graphviz + pkgs.zsh + ]; +} diff --git a/SL/aufgaben/workshop1/devenv.yaml b/SL/aufgaben/workshop1/devenv.yaml new file mode 100644 index 0000000..f6e91f8 --- /dev/null +++ b/SL/aufgaben/workshop1/devenv.yaml @@ -0,0 +1,6 @@ +inputs: + nixpkgs-python: + url: github:cachix/nixpkgs-python + inputs: + nixpkgs: + follows: nixpkgs diff --git a/SL/aufgaben/workshop1/solution/01_skalenniveaus.md b/SL/aufgaben/workshop1/solution/01_skalenniveaus.md new file mode 100644 index 0000000..4065548 --- /dev/null +++ b/SL/aufgaben/workshop1/solution/01_skalenniveaus.md @@ -0,0 +1,46 @@ +# Workshop 1 – Skalenniveaus Melbourne Housing Dataset + +## Klassifikation der Variablen + +| # | Spalte | Dtype | Skalenniveau | Bemerkung | +|---|---|---|---|---| +| 0 | Unnamed: 0 | int64 | nominal | CSV-Index, reine ID – für ML droppen | +| 1 | Suburb | object | nominal | hohe Kardinalität, Encoding-Strategie nötig | +| 2 | Address | object | nominal | Kardinalität ≈ n, für ML ungeeignet | +| 3 | Rooms | int64 | metrisch | Zähldaten, Ratio-Skala | +| 4 | Type | object | nominal | h/u/t – wenige Kategorien, One-Hot | +| 5 | Price | float64 | metrisch | Ratio-Skala, typische Zielvariable | +| 6 | Method | object | nominal | Verkaufsmethode | +| 7 | SellerG | object | nominal | hohe Kardinalität | +| 8 | Date | object | metrisch | formal Intervall, dtype sollte datetime sein | +| 9 | Distance | float64 | metrisch | Distanz zum CBD, Ratio | +| 10 | Postcode | float64 | nominal | trotz numerisch – keine sinnvolle Ordnung | +| 11 | Bedroom2 | float64 | metrisch | Zähldaten, alternative Quelle zu Rooms | +| 12 | Bathroom | float64 | metrisch | Zähldaten | +| 13 | Car | float64 | metrisch | Anzahl Parkplätze | +| 14 | Landsize | float64 | metrisch | Ratio-Skala | +| 15 | BuildingArea | float64 | metrisch | Ratio-Skala | +| 16 | YearBuilt | float64 | metrisch | formal Intervall | +| 17 | CouncilArea | object | nominal | Verwaltungsbezirk | +| 18 | Lattitude | float64 | metrisch | formal Intervall, mit Longitude als Paar behandeln | +| 19 | Longtitude | float64 | metrisch | formal Intervall, mit Latitude als Paar behandeln | +| 20 | Regionname | object | nominal | wenige Kategorien | +| 21 | Propertycount | float64 | metrisch | Anzahl Properties im Suburb | + +## Anmerkungen + +- `Date` und `YearBuilt` sind formal Intervallskala (kein echter Nullpunkt), + werden hier aber zu metrisch zusammengefasst, da die Klasse Intervall/Ratio + nicht weiter unterscheidet. +- `Postcode` ist trotz `float64`-dtype nominal – Postleitzahlen haben keine + sinnvolle Ordnung. Float entsteht durch Missing Values. +- Geokoordinaten passen streng genommen nicht ins Stevens-Schema + (zyklisch, nicht-euklidisch), werden pragmatisch als metrisch geführt. +- `Address` und `SellerG` haben sehr hohe Kardinalität → Kandidaten für die + Liste ungeeigneter Variablen in Workshop 2. + +## Online-Doku-Abgleich + +Quelle: + +Konsistenz-Check beim Workshop 2 ergänzen.