Skip to content

Commit

Permalink
Merge pull request #57 from awoimbee/aw/fix-typos
Browse files Browse the repository at this point in the history
fix typos
  • Loading branch information
codie3611 authored Apr 15, 2024
2 parents aacb322 + 331a7b8 commit 071df4b
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion docs/diffcrash/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ analysis of simulation runs.
It can be used as a set of independent executables or as a postprocessor plugin.
[Diffcrash] itself must be licensed.
Please therefore contact [Sidact] directly.
This commmand line utility makes running a Diffcrash analysis much
This command line utility makes running a Diffcrash analysis much
easier.

[diffcrash]: https://www.sidact.de/diffcrash
Expand Down
8 changes: 4 additions & 4 deletions docs/dimred/command_line_interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ optional arguments:
Arguments for clustering algorithms. If not set,
clustering will be skipped.
--outlier-args [OUTLIER_ARGS [OUTLIER_ARGS ...]]
Arguments for outlier detection befor clustering.
Arguments for outlier detection before clustering.
```

Following arguments are required for the analysis:
Expand Down Expand Up @@ -322,8 +322,8 @@ through:
Next, we will take a look at the `--start-stage` and `--end-stage` arguments.
These allow to restart and end the command-line utility at certain points in the
process.
This is usefull if you don't want to repeat certain stages to save time, or want
to end the process prematurly, e.g. don't want to generate the `.html` output.
This is useful if you don't want to repeat certain stages to save time, or want
to end the process prematurely, e.g. don't want to generate the `.html` output.

To set the desired start and end stage, use the the following keywords:

Expand Down Expand Up @@ -431,7 +431,7 @@ ref_sample = h5file["subsample"][:]
np.stack(h5file["subsampled_runs"][entry][:]
for entry in h5file["subsampled_runs"].keys()])

# create a numpy array containg the right reduced order basis for projection:
# create a numpy array containing the right reduced order basis for projection:
v_rob = h5file["v_rob"][:]

# the subsampled runs are projected into the right reduced order basis and called betas:
Expand Down
2 changes: 1 addition & 1 deletion docs/dyna/performance_info.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ Since different results may be dumped at different frequencies some state
folders might contain more information than others.
This inherently prevents efficient memory reading.
The python version used here is slower than the original C-based version but
one therefore gains better portability accross operating systems.
one therefore gains better portability across operating systems.
4 changes: 2 additions & 2 deletions docs/femzip/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ functions such as a femzip file check if desired.
```

Here we check if we can use the extended FEMZIP-API.
The extended FEMZIP-API allows reading selected arrays, but reqires a license
The extended FEMZIP-API allows reading selected arrays, but requires a license
with the feature "FEMUNZIPLIB-DYNA", which can be attained from SIDACT or
femzip distributors.

Expand All @@ -37,7 +37,7 @@ True
```

Check the file and library version.
This is usually not neccessary.
This is usually not necessary.

``` python
>>> api.is_femunzip_version_ok(filepath)
Expand Down
2 changes: 1 addition & 1 deletion lasso/diffcrash/diffcrash_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ def _create_merge_input_file(self, directory: str) -> str:
merge_input_file.write("eigen_all ! Name of eigen input file\n")
merge_input_file.write(
"mode_ ! Name of Output file "
+ "(string will be apended with mode information)\n"
+ "(string will be appended with mode information)\n"
)
merge_input_file.write("1 1 ! Mode number to be generated\n")
merge_input_file.write("'d+ d-' ! Mode type to be generated\n")
Expand Down
2 changes: 1 addition & 1 deletion lasso/dimred/dimred_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def _parse_html_name(self, html_name_string: str) -> str:
if replace_count > 0:
msg = (
f"Replaced {replace_count} invalid characters for the html file name. "
f"The new hmtl name is: {html_name}"
f"The new html name is: {html_name}"
)
self.log(msg)

Expand Down
2 changes: 1 addition & 1 deletion lasso/dimred/graph_laplacian.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _laplacian(lapl: csgraph, n_eigenmodes: int = 5):
n_eigenmodes : int
number of eigenmodes to compute
points : np.ndarray
coordintes of graph nodes (only for plotting)
coordinates of graph nodes (only for plotting)
Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion lasso/dimred/sphere/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def compute_similarity(embeddings: np.ndarray) -> np.ndarray:
return smatrix


def create_historgram(
def create_histogram(
cloud: np.ndarray, sphere_axis: str = "Z", planar: bool = False
) -> BinnedStatistic2dResult:
"""Builds a histogram using the blocks of a sphered globe and returns a
Expand Down
54 changes: 27 additions & 27 deletions lasso/dimred/svd/clustering_betas.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __apply_spectral_clustering(betas, runids, datasets, idsets, random_state=11
idsets: list
List where the grouped ids corresponding to the grouped Betas will be saved
**kwargs: keyword arguments
Keyword arguments specific for the SpectralClustering algorythm
Keyword arguments specific for the SpectralClustering algorithm
See Also
--------
Expand Down Expand Up @@ -62,7 +62,7 @@ def __apply_k_means(betas, runids, datasets, idsets, random_state=11, **kwargs):
idsets: list
List where the grouped ids corresponding to the grouped Betas will be saved
**kwargs: keyword arguments
Keyword arguments specific fot the KMeans algorythm
Keyword arguments specific for the KMeans algorithm
See Also
--------
Expand All @@ -85,7 +85,7 @@ def __apply_k_means(betas, runids, datasets, idsets, random_state=11, **kwargs):
def __apply_dbscan(betas, runids, datasets, idsets, **kwargs):
"""
Method to group the input Betas.
Defautl keyword arguments: eps=0.08
Default keyword arguments: eps=0.08
Parameters
----------
Expand All @@ -98,7 +98,7 @@ def __apply_dbscan(betas, runids, datasets, idsets, **kwargs):
idsets: list
List where the grouped ids corresponding to the grouped Betas will be saved
**kwags: keyword arguments
Keyword arguments for the DBSCAN algorythm
Keyword arguments for the DBSCAN algorithm
See Also
--------
Expand Down Expand Up @@ -158,7 +158,7 @@ def __detect_outliers_isolation_forest(
betas, ids, beta_clusters, id_clusters, random_state=11, **kwargs
):
"""
Detects outliers based on the IsolationForest algorythm from sklearn.
Detects outliers based on the IsolationForest algorithm from sklearn.
Detected outliers will be appended into the provided lists
Default keyword parameters: random_state=12, behaviour="new", contamination=0.005
Expand All @@ -173,7 +173,7 @@ def __detect_outliers_isolation_forest(
id_clusters: list
List where each cluster of ids will be appended
**kwargs: keyword argument
Keywords specific to the IsolationForest algorythm
Keywords specific to the IsolationForest algorithm
Returns
-------
inlier_betas: np.array
Expand All @@ -198,7 +198,7 @@ def __detect_outliers_isolation_forest(

def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_clusters, **kwargs):
"""
Detects outliers based on the LocalOutlierFactor algorythm from sklearn.
Detects outliers based on the LocalOutlierFactor algorithm from sklearn.
Detected outliers will be appended into the provided lists
Default keyword parameters: contamination=0.01
Expand All @@ -213,7 +213,7 @@ def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_cluster
id_clusters: list
List where each cluster of ids will be appended
**kwargs: keyword argument
Keywords specific to the LocalOutlierFactor algorythm.
Keywords specific to the LocalOutlierFactor algorithm.
Returns
-------
inlier_betas: np.ndarray
Expand All @@ -238,9 +238,9 @@ def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_cluster

def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kwargs):
"""
Detects outliers based on the OneClassSVM algorythm from sklearn.
Detects outliers based on the OneClassSVM algorithm from sklearn.
Detected outliers will be appended into the provided lists
Defautl keyword arguments: gamma=0.1, nu=0.01
Default keyword arguments: gamma=0.1, nu=0.01
Parameters
----------
Expand All @@ -253,7 +253,7 @@ def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kw
id_clusters: list
List where each cluster of ids will be appended
**kwargs: keyword argument
Keywords specific to the OneClassSVM algorythm.
Keywords specific to the OneClassSVM algorithm.
Returns
-------
Expand All @@ -280,7 +280,7 @@ def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kw

def __experimental_outlier_detector(betas, ids, **kwargs):
"""
Detects outliers by applying LocalOutlierFactor algorythm from sklearn over multiple slices of betas .
Detects outliers by applying LocalOutlierFactor algorithm from sklearn over multiple slices of betas .
Detected outliers will be appended into the provided lists
Default keyword arguments: contamination=0.01
Parameters
Expand All @@ -290,7 +290,7 @@ def __experimental_outlier_detector(betas, ids, **kwargs):
ids: np.ndarray
Numpy array containing the ids of each beta
**kwargs: keyword argument
Keywords specific to the LocalOutlierFactor algorythm
Keywords specific to the LocalOutlierFactor algorithm
Returns
-------
outliers: np.array
Expand Down Expand Up @@ -583,9 +583,9 @@ def group_betas(
) -> Union[Tuple[list, list], str]:
"""
Base function to to group betas into groups, detect outliers. Provides that all different
clustering and outlier detection algorythms are implemented in an easy to access environment.
clustering and outlier detection algorithms are implemented in an easy to access environment.
To select different clustering and outlier detection algoyrthms, please use appropriate
KeywordTypes. A description of each function can be accessed with document_algorythm(keyword)
KeywordTypes. A description of each function can be accessed with document_algorithm(keyword)
A list of all functions can be accessed with list_detectors_and_clusters()
Parameters
Expand All @@ -595,25 +595,25 @@ def group_betas(
betas: np.ndarray
Numpy array containing the betas.
Betas are expected to be of shape (samples, timestep, 3)
The three entries per beta can either be dimesnions (x,y,z) or any three betas/eigenvalues
The three entries per beta can either be dimensions (x,y,z) or any three betas/eigenvalues
cluster: str, optional, default : "KMeans".
String specifying which clustering algorythm shall be applied.
String specifying which clustering algorithm shall be applied.
Use ClusterTypefor easier access
detector: str, optional, default: None.
String specifying which outlier detection algorythm shall be applied.
String specifying which outlier detection algorithm shall be applied.
Use DetectorType for easier access
cluster_params: dict, optional
Dictionary containing parameters for the clustering algorythms.
Dictionary containing parameters for the clustering algorithms.
See the sklearn documentation for the function to learn more.
detector_params: dict, optional
Dictionary containing parameters for the outlier detection algorythms.
Dictionary containing parameters for the outlier detection algorithms.
See the sklearn documentation for the function to learn more
Returns
-------
beta_clusters: list
List containing Numpy Arrays of betas in one cluster.
If a detector was selected, or the clustering algorythm has its
If a detector was selected, or the clustering algorithm has its
own outlier detection, the first entry in the list will be oultier betas
id_clusters: list
List containing lists of beta ids. Each id corresponds to the beta in
Expand All @@ -626,13 +626,13 @@ def group_betas(
document_algorithm:
Prints docstring of each function into console
list_detectors_and_clusters:
Prints out all detection and clustering algorythms into console
Prints out all detection and clustering algorithms into console
Sklearn Userguide chapter 2.3 Clustering:
https://scikit-learn.org/stable/modules/clustering.html
Detailed overview of different clustering algorythms
Detailed overview of different clustering algorithms
Sklearn Examples outlier detection:
https://scikit-learn.org/stable/auto_examples/plot_anomaly_comparison.html
Example of different used outlier detection algorythms
Example of different used outlier detection algorithms
"""

# pylint: disable = too-many-arguments, too-many-locals, too-many-branches
Expand All @@ -659,9 +659,9 @@ def group_betas(
betas = betas[inlier_index]
beta_index = beta_index[inlier_index]
else:
empy_list = []
beta_clusters.append(empy_list)
id_clusters.append(empy_list)
empty_list = []
beta_clusters.append(empty_list)
id_clusters.append(empty_list)

detector = None

Expand Down
Loading

0 comments on commit 071df4b

Please sign in to comment.