-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
006b6c2
commit 48eeaa6
Showing
5 changed files
with
288 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 24, | ||
"id": "initial_id", | ||
"metadata": { | ||
"collapsed": true, | ||
"ExecuteTime": { | ||
"end_time": "2024-07-02T14:56:08.629731500Z", | ||
"start_time": "2024-07-02T14:56:08.622215400Z" | ||
} | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import uadapy.data as data\n", | ||
"import uadapy.dr.uamds as uamds\n", | ||
"import uadapy.plotting.plots2D as plots2D\n", | ||
"import numpy as np" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# Loading data\n", | ||
"We provide ready-to-use toy datasets for getting started with the analysis quickly. In this example, we fit normal distributions to the points of the iris-dataset." | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "7d50ba4e72fe8896" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 25, | ||
"outputs": [], | ||
"source": [ | ||
"distribs_hi = data.load_iris_normal()" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"ExecuteTime": { | ||
"end_time": "2024-07-02T14:56:09.122543800Z", | ||
"start_time": "2024-07-02T14:56:09.107284800Z" | ||
} | ||
}, | ||
"id": "399ccab20e87f833" | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# Applying UAMDS\n", | ||
"Uncertainty-aware multi-dimensional scaling can be applied directly to reduce the data to a user-defined target dimension." | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "6a4094383bfc23a6" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 26, | ||
"outputs": [], | ||
"source": [ | ||
"distribs_lo = uamds.uamds(distribs_hi, dims=2)" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"ExecuteTime": { | ||
"end_time": "2024-07-02T14:56:09.660688100Z", | ||
"start_time": "2024-07-02T14:56:09.644078700Z" | ||
} | ||
}, | ||
"id": "17d410f46ac143ad" | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"source": [ | ||
"# Visualizing data\n", | ||
"The data can be directly visualized, for example as a contour plot." | ||
], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "b90713040349a03b" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [ | ||
"np.random.seed(0)\n", | ||
"plots2D.plot_contour(distribs_lo, ranges=[[5,13],[8,15]])" | ||
], | ||
"metadata": { | ||
"collapsed": false, | ||
"is_executing": true | ||
}, | ||
"id": "36652dfe9d1204d4" | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"outputs": [], | ||
"source": [], | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"id": "8215650467252202" | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.6" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters