Skip to content
Snippets Groups Projects
Commit 2ddf3613 authored by shawk masboob's avatar shawk masboob
Browse files

fixed docstring

parent 1beadd21
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ def numpy_to_pandas(sklearn_data):
sklearn_data (array): name of dataframe
Returns:
panda.array: pandas dataframe
data: pandas dataframe
"""
data = pd.DataFrame(data=sklearn_data.data, columns=sklearn_data.feature_names)
......@@ -30,14 +30,14 @@ def lens_1d(x_array, proj='l2norm', random_num=1729, verbosity=0):
"""Creates a L^2-Norm for features. This lens highlights expected features in the data.
Args:
X (array): features of dataset
proj (string): projection type
random_num: random state
verbosity: verbosity
x_array (array): features of dataset </br>
proj (string): projection type </br>
random_num: random state </br>
verbosity: verbosity </br>
Returns:
lens: Isolation Forest, L^2-Norm
mapper:
lens: Isolation Forest, L^2-Norm </br>
mapper: </br>
"""
if not type(x_array) == np.ndarray:
......@@ -68,12 +68,12 @@ def uniform_sampling(dist_matrix, n_sample):
the subsampled set.
Args:
dist_matrix (array): Distance matrix
n_sample (int): Size of subsample set
dist_matrix (array): Distance matrix </br>
n_sample (int): Size of subsample set </br>
Returns:
list_subsample (array): List of indices corresponding to the subsample set.
np.max(dist_to_l): Covering radious for the subsample set.
list_subsample (array): List of indices corresponding to the subsample set </br>
distance_to_l: Covering radious for the subsample set </br>
"""
if not type(dist_matrix) == np.ndarray:
......@@ -89,4 +89,5 @@ def uniform_sampling(dist_matrix, n_sample):
num_points = dist_matrix.shape[0]
list_subsample = np.random.choice(num_points, n_subsample)
dist_to_l = np.min(dist_matrix[list_subsample, :], axis=0)
return list_subsample, np.max(dist_to_l)
distance_to_l = np.max(dist_to_l)
return list_subsample, distance_to_l
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment