vdfpy
vdfpy Public API.
Submodules
Functions
|
Clustering input data into n_clusters with a selected method. |
|
Collect plasma moments from data. |
|
Package Contents
- vdfpy.cluster(df, method: str = 'kmeans', n_clusters: int = 2, *, verbose: bool = True) numpy.ndarray [source]
Clustering input data into n_clusters with a selected method.
- Parameters:
df (_type_) – input data in the form of a DataFrame or ndarray.
method (str, optional) – clustering method. Defaults to “kmeans”.
n_clusters (int, optional) – number of clusters. Defaults to 2.
verbose (bool, optional) – logging information. Defaults to True.
- Raises:
Exception – when the prescribed method is not implemented.
- Returns:
labels of classes as integers.
- Return type:
np.ndarray
- vdfpy.collect_moments(filename: str, preprocessed: bool = True) pandas.DataFrame [source]
Collect plasma moments from data.
- Parameters:
filename (str) – Input file name.
preprocessed (bool, optional) – Whether to use moments output directly. Defaults to True.
- Raises:
NameError – If the file name is not recognized.
- Returns:
Pandas DataFrame for storing moments.
- Return type:
pd.DataFrame