Skip to content

Commit 071df4b

Browse files
authored
Merge pull request #57 from awoimbee/aw/fix-typos
fix typos
2 parents aacb322 + 331a7b8 commit 071df4b

23 files changed

+65
-65
lines changed

docs/diffcrash/run.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ analysis of simulation runs.
77
It can be used as a set of independent executables or as a postprocessor plugin.
88
[Diffcrash] itself must be licensed.
99
Please therefore contact [Sidact] directly.
10-
This commmand line utility makes running a Diffcrash analysis much
10+
This command line utility makes running a Diffcrash analysis much
1111
easier.
1212

1313
[diffcrash]: https://www.sidact.de/diffcrash

docs/dimred/command_line_interface.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ optional arguments:
209209
Arguments for clustering algorithms. If not set,
210210
clustering will be skipped.
211211
--outlier-args [OUTLIER_ARGS [OUTLIER_ARGS ...]]
212-
Arguments for outlier detection befor clustering.
212+
Arguments for outlier detection before clustering.
213213
```
214214

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

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

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

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

437437
# the subsampled runs are projected into the right reduced order basis and called betas:

docs/dyna/performance_info.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ Since different results may be dumped at different frequencies some state
7070
folders might contain more information than others.
7171
This inherently prevents efficient memory reading.
7272
The python version used here is slower than the original C-based version but
73-
one therefore gains better portability accross operating systems.
73+
one therefore gains better portability across operating systems.

docs/femzip/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ functions such as a femzip file check if desired.
1919
```
2020

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

@@ -37,7 +37,7 @@ True
3737
```
3838

3939
Check the file and library version.
40-
This is usually not neccessary.
40+
This is usually not necessary.
4141

4242
``` python
4343
>>> api.is_femunzip_version_ok(filepath)

lasso/diffcrash/diffcrash_run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ def _create_merge_input_file(self, directory: str) -> str:
11411141
merge_input_file.write("eigen_all ! Name of eigen input file\n")
11421142
merge_input_file.write(
11431143
"mode_ ! Name of Output file "
1144-
+ "(string will be apended with mode information)\n"
1144+
+ "(string will be appended with mode information)\n"
11451145
)
11461146
merge_input_file.write("1 1 ! Mode number to be generated\n")
11471147
merge_input_file.write("'d+ d-' ! Mode type to be generated\n")

lasso/dimred/dimred_run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def _parse_html_name(self, html_name_string: str) -> str:
657657
if replace_count > 0:
658658
msg = (
659659
f"Replaced {replace_count} invalid characters for the html file name. "
660-
f"The new hmtl name is: {html_name}"
660+
f"The new html name is: {html_name}"
661661
)
662662
self.log(msg)
663663

lasso/dimred/graph_laplacian.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def _laplacian(lapl: csgraph, n_eigenmodes: int = 5):
126126
n_eigenmodes : int
127127
number of eigenmodes to compute
128128
points : np.ndarray
129-
coordintes of graph nodes (only for plotting)
129+
coordinates of graph nodes (only for plotting)
130130
131131
Returns
132132
-------

lasso/dimred/sphere/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def compute_similarity(embeddings: np.ndarray) -> np.ndarray:
182182
return smatrix
183183

184184

185-
def create_historgram(
185+
def create_histogram(
186186
cloud: np.ndarray, sphere_axis: str = "Z", planar: bool = False
187187
) -> BinnedStatistic2dResult:
188188
"""Builds a histogram using the blocks of a sphered globe and returns a

lasso/dimred/svd/clustering_betas.py

+27-27
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __apply_spectral_clustering(betas, runids, datasets, idsets, random_state=11
2525
idsets: list
2626
List where the grouped ids corresponding to the grouped Betas will be saved
2727
**kwargs: keyword arguments
28-
Keyword arguments specific for the SpectralClustering algorythm
28+
Keyword arguments specific for the SpectralClustering algorithm
2929
3030
See Also
3131
--------
@@ -62,7 +62,7 @@ def __apply_k_means(betas, runids, datasets, idsets, random_state=11, **kwargs):
6262
idsets: list
6363
List where the grouped ids corresponding to the grouped Betas will be saved
6464
**kwargs: keyword arguments
65-
Keyword arguments specific fot the KMeans algorythm
65+
Keyword arguments specific for the KMeans algorithm
6666
6767
See Also
6868
--------
@@ -85,7 +85,7 @@ def __apply_k_means(betas, runids, datasets, idsets, random_state=11, **kwargs):
8585
def __apply_dbscan(betas, runids, datasets, idsets, **kwargs):
8686
"""
8787
Method to group the input Betas.
88-
Defautl keyword arguments: eps=0.08
88+
Default keyword arguments: eps=0.08
8989
9090
Parameters
9191
----------
@@ -98,7 +98,7 @@ def __apply_dbscan(betas, runids, datasets, idsets, **kwargs):
9898
idsets: list
9999
List where the grouped ids corresponding to the grouped Betas will be saved
100100
**kwags: keyword arguments
101-
Keyword arguments for the DBSCAN algorythm
101+
Keyword arguments for the DBSCAN algorithm
102102
103103
See Also
104104
--------
@@ -158,7 +158,7 @@ def __detect_outliers_isolation_forest(
158158
betas, ids, beta_clusters, id_clusters, random_state=11, **kwargs
159159
):
160160
"""
161-
Detects outliers based on the IsolationForest algorythm from sklearn.
161+
Detects outliers based on the IsolationForest algorithm from sklearn.
162162
Detected outliers will be appended into the provided lists
163163
Default keyword parameters: random_state=12, behaviour="new", contamination=0.005
164164
@@ -173,7 +173,7 @@ def __detect_outliers_isolation_forest(
173173
id_clusters: list
174174
List where each cluster of ids will be appended
175175
**kwargs: keyword argument
176-
Keywords specific to the IsolationForest algorythm
176+
Keywords specific to the IsolationForest algorithm
177177
Returns
178178
-------
179179
inlier_betas: np.array
@@ -198,7 +198,7 @@ def __detect_outliers_isolation_forest(
198198

199199
def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_clusters, **kwargs):
200200
"""
201-
Detects outliers based on the LocalOutlierFactor algorythm from sklearn.
201+
Detects outliers based on the LocalOutlierFactor algorithm from sklearn.
202202
Detected outliers will be appended into the provided lists
203203
Default keyword parameters: contamination=0.01
204204
@@ -213,7 +213,7 @@ def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_cluster
213213
id_clusters: list
214214
List where each cluster of ids will be appended
215215
**kwargs: keyword argument
216-
Keywords specific to the LocalOutlierFactor algorythm.
216+
Keywords specific to the LocalOutlierFactor algorithm.
217217
Returns
218218
-------
219219
inlier_betas: np.ndarray
@@ -238,9 +238,9 @@ def __detect_outliers_local_outlier_factor(betas, ids, beta_clusters, id_cluster
238238

239239
def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kwargs):
240240
"""
241-
Detects outliers based on the OneClassSVM algorythm from sklearn.
241+
Detects outliers based on the OneClassSVM algorithm from sklearn.
242242
Detected outliers will be appended into the provided lists
243-
Defautl keyword arguments: gamma=0.1, nu=0.01
243+
Default keyword arguments: gamma=0.1, nu=0.01
244244
245245
Parameters
246246
----------
@@ -253,7 +253,7 @@ def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kw
253253
id_clusters: list
254254
List where each cluster of ids will be appended
255255
**kwargs: keyword argument
256-
Keywords specific to the OneClassSVM algorythm.
256+
Keywords specific to the OneClassSVM algorithm.
257257
258258
Returns
259259
-------
@@ -280,7 +280,7 @@ def __detect_outliers_one_class_svm(betas, ids, beta_clusters, id_clusters, **kw
280280

281281
def __experimental_outlier_detector(betas, ids, **kwargs):
282282
"""
283-
Detects outliers by applying LocalOutlierFactor algorythm from sklearn over multiple slices of betas .
283+
Detects outliers by applying LocalOutlierFactor algorithm from sklearn over multiple slices of betas .
284284
Detected outliers will be appended into the provided lists
285285
Default keyword arguments: contamination=0.01
286286
Parameters
@@ -290,7 +290,7 @@ def __experimental_outlier_detector(betas, ids, **kwargs):
290290
ids: np.ndarray
291291
Numpy array containing the ids of each beta
292292
**kwargs: keyword argument
293-
Keywords specific to the LocalOutlierFactor algorythm
293+
Keywords specific to the LocalOutlierFactor algorithm
294294
Returns
295295
-------
296296
outliers: np.array
@@ -583,9 +583,9 @@ def group_betas(
583583
) -> Union[Tuple[list, list], str]:
584584
"""
585585
Base function to to group betas into groups, detect outliers. Provides that all different
586-
clustering and outlier detection algorythms are implemented in an easy to access environment.
586+
clustering and outlier detection algorithms are implemented in an easy to access environment.
587587
To select different clustering and outlier detection algoyrthms, please use appropriate
588-
KeywordTypes. A description of each function can be accessed with document_algorythm(keyword)
588+
KeywordTypes. A description of each function can be accessed with document_algorithm(keyword)
589589
A list of all functions can be accessed with list_detectors_and_clusters()
590590
591591
Parameters
@@ -595,25 +595,25 @@ def group_betas(
595595
betas: np.ndarray
596596
Numpy array containing the betas.
597597
Betas are expected to be of shape (samples, timestep, 3)
598-
The three entries per beta can either be dimesnions (x,y,z) or any three betas/eigenvalues
598+
The three entries per beta can either be dimensions (x,y,z) or any three betas/eigenvalues
599599
cluster: str, optional, default : "KMeans".
600-
String specifying which clustering algorythm shall be applied.
600+
String specifying which clustering algorithm shall be applied.
601601
Use ClusterTypefor easier access
602602
detector: str, optional, default: None.
603-
String specifying which outlier detection algorythm shall be applied.
603+
String specifying which outlier detection algorithm shall be applied.
604604
Use DetectorType for easier access
605605
cluster_params: dict, optional
606-
Dictionary containing parameters for the clustering algorythms.
606+
Dictionary containing parameters for the clustering algorithms.
607607
See the sklearn documentation for the function to learn more.
608608
detector_params: dict, optional
609-
Dictionary containing parameters for the outlier detection algorythms.
609+
Dictionary containing parameters for the outlier detection algorithms.
610610
See the sklearn documentation for the function to learn more
611611
612612
Returns
613613
-------
614614
beta_clusters: list
615615
List containing Numpy Arrays of betas in one cluster.
616-
If a detector was selected, or the clustering algorythm has its
616+
If a detector was selected, or the clustering algorithm has its
617617
own outlier detection, the first entry in the list will be oultier betas
618618
id_clusters: list
619619
List containing lists of beta ids. Each id corresponds to the beta in
@@ -626,13 +626,13 @@ def group_betas(
626626
document_algorithm:
627627
Prints docstring of each function into console
628628
list_detectors_and_clusters:
629-
Prints out all detection and clustering algorythms into console
629+
Prints out all detection and clustering algorithms into console
630630
Sklearn Userguide chapter 2.3 Clustering:
631631
https://scikit-learn.org/stable/modules/clustering.html
632-
Detailed overview of different clustering algorythms
632+
Detailed overview of different clustering algorithms
633633
Sklearn Examples outlier detection:
634634
https://scikit-learn.org/stable/auto_examples/plot_anomaly_comparison.html
635-
Example of different used outlier detection algorythms
635+
Example of different used outlier detection algorithms
636636
"""
637637

638638
# pylint: disable = too-many-arguments, too-many-locals, too-many-branches
@@ -659,9 +659,9 @@ def group_betas(
659659
betas = betas[inlier_index]
660660
beta_index = beta_index[inlier_index]
661661
else:
662-
empy_list = []
663-
beta_clusters.append(empy_list)
664-
id_clusters.append(empy_list)
662+
empty_list = []
663+
beta_clusters.append(empty_list)
664+
id_clusters.append(empty_list)
665665

666666
detector = None
667667

0 commit comments

Comments
 (0)