# DENSIRED
This package provides a data generator for density-based data, described in the ECML PKDD 24 paper "Data with Density-Based Clusters: A Generator for Systematic Evaluation of Clustering Algorithms" by Philipp Jahn$^{1,2}$ , Christian M. M. Frey$^{3}$, Anna Beer$^{4}$, Collin Leiber$^{1,2}$, and Thomas Seidl$^{1,2,3}$.
(1 LMU Munich, Munich, Germany; 2 Munich Center for Machine Learning (MCML), Munich, Germany; 3 Fraunhofer IIS, Erlangen, Germany; 4 University of Vienna, Vienna, Austria.)
## pip installation
The current stable version can be installed by the following command:
pip install densired
## How to use
Use the following code to generate a skeleton. Parameters are listed at our Github Repository (https://github.com/PhilJahn/DENSIRED).
```
skeleton = datagen.densityDataGen()
```
Use the following code to obtain a dataset with *n* points from a skeleton. There are additional parameters, that are also listed below.
```
data = skeleton.generate_data(n)
datax = data[:,0:-1]
datay = data[:,-1]
```
To visualize the skeleton, call the following code. For higher-dimensionalities, either specify *dcount* to get all pairs of the *dc* most spread out dimensions or specify the desired dimensions directly with *dims*.
```
skeleton.display_cores(dims=[d1,d2,...], dcount=dc)
```
To visualize a dataset, call the following. Give the dataset as *data*. The flags *show_radius* and *show_core* decide whether to display the core radii and core centers, respectively. For higher-dimensionalities, as with dispaly_cores, either specify *dcount* to get all pairs of the *dc* most spread out dimensions or specify the desired dimensions directly with *dims*.
```
skeleton.display_data(data, show_radius=False, show_core=False, dims=[d1,d2,...], dcount=dc)
```
To initialize a stream, call the following function. The *command*-String controls the stream behavior. The *default_duration* is the default duration of a block of the stream. default_duration does not need to be specified, in which case it has a value of 1000. The *command*-String will be explained in more detail further below.
```
skeleton.init_stream(command=commandstring, default_duration = 1000)
```
In order to get an element from the stream, just use the skeleton as an iterator
```
x = skeleton.next()
```
To visualize a data stream, call the following.
```
skeleton.display_current_stream()
```
Alternatively, use this to set a stream command and display it in one command. Parameters are analogous to *init_stream*.
```
skeleton.display_stream(command=commandstring, default_duration = 1000)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/PhilJahn/DENSIRED",
"name": "densired",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Philipp Jahn",
"author_email": "jahn@dbs.ifi.lmu.de",
"download_url": "https://files.pythonhosted.org/packages/fd/f0/5a1a79149c5cfa06e59edb4803efa9ce463a8266c6b5df845ef7fd18a440/densired-1.0.1.tar.gz",
"platform": null,
"description": "# DENSIRED\r\n\r\nThis package provides a data generator for density-based data, described in the ECML PKDD 24 paper \"Data with Density-Based Clusters: A Generator for Systematic Evaluation of Clustering Algorithms\" by Philipp Jahn$^{1,2}$ , Christian M. M. Frey$^{3}$, Anna Beer$^{4}$, Collin Leiber$^{1,2}$, and Thomas Seidl$^{1,2,3}$.\r\n\r\n(1 LMU Munich, Munich, Germany; 2 Munich Center for Machine Learning (MCML), Munich, Germany; 3 Fraunhofer IIS, Erlangen, Germany; 4 University of Vienna, Vienna, Austria.)\r\n\r\n## pip installation\r\n\r\nThe current stable version can be installed by the following command:\r\n\r\npip install densired\r\n\r\n## How to use\r\n\r\nUse the following code to generate a skeleton. Parameters are listed at our Github Repository (https://github.com/PhilJahn/DENSIRED).\r\n\r\n```\r\nskeleton = datagen.densityDataGen()\r\n```\r\n\r\nUse the following code to obtain a dataset with *n* points from a skeleton. There are additional parameters, that are also listed below.\r\n\r\n```\r\ndata = skeleton.generate_data(n)\r\ndatax = data[:,0:-1]\r\ndatay = data[:,-1]\r\n```\r\n\r\nTo visualize the skeleton, call the following code. For higher-dimensionalities, either specify *dcount* to get all pairs of the *dc* most spread out dimensions or specify the desired dimensions directly with *dims*.\r\n```\r\nskeleton.display_cores(dims=[d1,d2,...], dcount=dc)\r\n```\r\n\r\nTo visualize a dataset, call the following. Give the dataset as *data*. The flags *show_radius* and *show_core* decide whether to display the core radii and core centers, respectively. For higher-dimensionalities, as with dispaly_cores, either specify *dcount* to get all pairs of the *dc* most spread out dimensions or specify the desired dimensions directly with *dims*.\r\n```\r\nskeleton.display_data(data, show_radius=False, show_core=False, dims=[d1,d2,...], dcount=dc)\r\n```\r\n\r\nTo initialize a stream, call the following function. The *command*-String controls the stream behavior. The *default_duration* is the default duration of a block of the stream. default_duration does not need to be specified, in which case it has a value of 1000. The *command*-String will be explained in more detail further below.\r\n```\r\nskeleton.init_stream(command=commandstring, default_duration = 1000)\r\n```\r\n\r\nIn order to get an element from the stream, just use the skeleton as an iterator\r\n```\r\nx = skeleton.next()\r\n```\r\n\r\nTo visualize a data stream, call the following.\r\n```\r\nskeleton.display_current_stream()\r\n```\r\n\r\nAlternatively, use this to set a stream command and display it in one command. Parameters are analogous to *init_stream*.\r\n```\r\nskeleton.display_stream(command=commandstring, default_duration = 1000)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A generator for density-based data",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/PhilJahn/DENSIRED"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fdf05a1a79149c5cfa06e59edb4803efa9ce463a8266c6b5df845ef7fd18a440",
"md5": "d28fe36dddd178ba9d9b8b7d68fc53b6",
"sha256": "54694e6db736d4a9110e60e6e35390774922992e269b3d8b14f9f2305204e2bf"
},
"downloads": -1,
"filename": "densired-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "d28fe36dddd178ba9d9b8b7d68fc53b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16024,
"upload_time": "2024-08-23T13:24:24",
"upload_time_iso_8601": "2024-08-23T13:24:24.388670Z",
"url": "https://files.pythonhosted.org/packages/fd/f0/5a1a79149c5cfa06e59edb4803efa9ce463a8266c6b5df845ef7fd18a440/densired-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-23 13:24:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PhilJahn",
"github_project": "DENSIRED",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "densired"
}