@@ -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):
8585def __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
199199def __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
239239def __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
281281def __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