Skip to content

Commit

Permalink
better structure for methods in constants.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ypriverol committed Sep 22, 2024
1 parent 032a422 commit c2312c8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 565 deletions.
25 changes: 24 additions & 1 deletion fsspark/fs/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,27 @@
}
]
}
}
}


def get_fs_methods():
"""
Get the list of feature selection methods
:return: dict
"""
return FS_METHODS

def get_fs_method_details(method_name: str):
"""
Get the details of the feature selection method, this function search in all-methods definitions
and get the details of the method with the given name. If the method is not found, it returns None.
The method name is case-insensitive.
:param method_name: str
:return: dict
"""

for method_type in FS_METHODS:
for method in FS_METHODS[method_type]['methods']:
if method['name'].lower() == method_name.lower():
return method
return None
Loading

0 comments on commit c2312c8

Please sign in to comment.