vastorbit.machine_learning.vast.svm.LinearSVC.get_match_index¶
- static LinearSVC.get_match_index(x: str, col_list: list, str_check: bool = True) None¶
Returns the matching index. This function is used to simplify the overall code.
- Parameters:
x (str) – Column’s name.
col_list (list) – List of columns.
str_check (bool, optional) – If set to
True, checks if the formattedstris in the formattedlist. No need for an exact match.
- Returns:
index.
- Return type:
int
Examples
The following code demonstrates the usage of the function.
# Import the VAST Model. from vastorbit.machine_learning.vast.base import VASTModel # Match VASTModel.get_match_index('b', ['"A"', '"B"', '"C"']) # str_check = False VASTModel.get_match_index('b', ['"A"', '"B"', '"C"'], str_check = False) # No Match VASTModel.get_match_index('d', ['"A"', '"B"', '"C"'])
Note
These functions serve as utilities to construct others, simplifying the overall code.