Core
- class oceanai.modules.core.core.CoreMessages(lang: str = 'ru', color_simple: str = '#666', color_info: str = '#1776D2', color_err: str = '#FF0000', color_true: str = '#008001', bold_text: bool = True, text_runtime: str = '', num_to_df_display: int = 30)[source]
Bases:
SettingsClass for messages
- Parameters:
lang (str) – See
langcolor_simple (str) – See
color_simplecolor_info (str) – See
color_infocolor_err (str) – See
color_errcolor_true (str) – See
color_truebold_text (bool) – See
bold_textnum_to_df_display (int) – See
num_to_df_displaytext_runtime (str) – See
text_runtime
- class oceanai.modules.core.core.Core(lang: str = 'ru', color_simple: str = '#666', color_info: str = '#1776D2', color_err: str = '#FF0000', color_true: str = '#008001', bold_text: bool = True, text_runtime: str = '', num_to_df_display: int = 30)[source]
Bases:
CoreMessagesCore class of modules
- Parameters:
lang (str) – See
langcolor_simple (str) – See
color_simplecolor_info (str) – See
color_infocolor_err (str) – See
color_errcolor_true (str) – See
color_truebold_text (bool) – See
bold_textnum_to_df_display (int) – See
num_to_df_displaytext_runtime (str) – See
text_runtime
- __is_notebook() bool
Determining how to run a library in Jupyter or similar
Note
private method
- Returns:
True if the library is run in Jupyter or similar, otherwise False
- Return type:
bool
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4core._Core__is_notebook()
[1]:1True
– 2 –
In [2]:1from oceanai.modules.core.core import Core 2 3Core._Core__is_notebook()
[2]:1True
- _add_last_el_notebook_history_output(message: str) None[source]
Adding text to the latest message from the message output history in a Jupyter cell
Note
protected method
- Parameters:
message (str) – Message
- Returns:
None
- Return type:
None
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._add_last_el_notebook_history_output(message = '...') 6 7core._add_notebook_history_output( 8 message = 'Message 1', last = False 9) 10core._add_last_el_notebook_history_output(message = '...') 11 12core.show_notebook_history_output()
[1]:1... 2Message 1 ...
- _add_notebook_history_output(message: str, last: bool = False) None[source]
Adding message output history to Jupyter cell
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._add_notebook_history_output( 6 message = 'Message 1', last = False 7) 8core._add_notebook_history_output( 9 message = 'Message 2', last = False 10) 11core._add_notebook_history_output( 12 message = 'Replacing the last message', last = True 13) 14 15core.show_notebook_history_output()
[1]:1Message 1 2Replacing the last message
– 2 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for message, last in zip( 6 [ 7 'Message 1', 8 'Message 2', 9 'Replacing the last message' 10 ], 11 [False, False, True] 12): 13 core._add_notebook_history_output( 14 message = message, last = last 15 ) 16 17core.show_notebook_history_output()
[2]:1Message 1 2Replacing the last message
- _append_to_list_of_accuracy(preds: List[float | None], out: bool = True) bool[source]
Adding values to the dictionary for a DataFrame with precision results
Note
protected method
- Parameters:
preds (List[Optional[float]]) – Personality traits scores
out (bool) – Display
- Returns:
True if values have been added to the dictionary for the DataFrame, otherwise False
- Return type:
bool
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core.keys_dataset_ = ['O', 'C', 'E', 'A', 'N'] 6 7core._append_to_list_of_accuracy( 8 preds = [0.5, 0.6, 0.2, 0.1, 0.8], 9 out = True 10) 11 12core._append_to_list_of_accuracy( 13 preds = [0.4, 0.5, 0.1, 0, 0.7], 14 out = True 15) 16 17core.dict_of_accuracy_
[1]:1{ 2 'O': [0.5, 0.4], 3 'C': [0.6, 0.5], 4 'E': [0.2, 0.1], 5 'A': [0.1, 0], 6 'N': [0.8, 0.7] 7}
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core.keys_dataset_ = ['O', 'C', 'E', 'A', 'N'] 6 7core._append_to_list_of_accuracy( 8 preds = [0.5, 0.6, 0.2, 0.1, 0.8], 9 out = True 10) 11 12core.keys_dataset_ = ['O2', 'C2', 'E2', 'A2', 'N2'] 13 14core._append_to_list_of_accuracy( 15 preds = [0.4, 0.5, 0.1, 0, 0.7], 16 out = True 17) 18 19core.dict_of_accuracy_
– 2 –
[2]:1[2024-10-06 18:49:44] Что-то пошло не так ... смотрите настройки ядра и цепочку выполнения действий ... 2 3 Файл: /Users/dl/@DmitryRyumin/Python/envs/OCEANAI/lib/python3.9/site-packages/oceanai/modules/core/core.py 4 Линия: 3300 5 Метод: _append_to_list_of_accuracy 6 Тип ошибки: KeyError 7 8{ 9 'O': [0.5], 10 'C': [0.6], 11 'E': [0.2], 12 'A': [0.1], 13 'N': [0.8] 14}
- _append_to_list_of_files(path: str, preds: List[float | None], out: bool = True) bool[source]
Adding values to a dictionary for a DataFrame with data
Note
protected method
- Parameters:
path (str) – The path to the file
preds (List[Optional[float]]) – Personality traits scores
out (bool) – Display
- Returns:
True if values have been added to the dictionary for the DataFrame, otherwise False
- Return type:
bool
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core.keys_dataset_ = ['P', 'O', 'C', 'E', 'A', 'N'] 6 7core._append_to_list_of_files( 8 path = './6V807Mf_gHM.003.mp4', 9 preds = [0.5, 0.6, 0.2, 0.1, 0.8], 10 out = True 11) 12 13core._append_to_list_of_files( 14 path = './6V807Mf_gHM.004.mp4', 15 preds = [0.4, 0.5, 0.1, 0, 0.7], 16 out = True 17) 18 19core.dict_of_files_
[1]:1{ 2 'P': ['./6V807Mf_gHM.003.mp4', './6V807Mf_gHM.004.mp4'], 3 'O': [0.5, 0.4], 4 'C': [0.6, 0.5], 5 'E': [0.2, 0.1], 6 'A': [0.1, 0], 7 'N': [0.8, 0.7] 8}
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core.keys_dataset_ = ['P', 'O', 'C', 'E', 'A', 'N'] 6 7core._append_to_list_of_files( 8 path = './6V807Mf_gHM.003.mp4', 9 preds = [0.5, 0.6, 0.2, 0.1, 0.8], 10 out = True 11) 12 13core.keys_dataset_ = ['P2', 'O2', 'C2', 'E2', 'A2', 'N2'] 14 15core._append_to_list_of_files( 16 path = './6V807Mf_gHM.004.mp4', 17 preds = [0.4, 0.5, 0.1, 0, 0.7], 18 out = True 19) 20 21core.dict_of_files_
– 2 –
[2]:1[2024-10-06 18:53:43] Что-то пошло не так ... смотрите настройки ядра и цепочку выполнения действий ... 2 3 Файл: /Users/dl/@DmitryRyumin/Python/envs/OCEANAI/lib/python3.9/site-packages/oceanai/modules/core/core.py 4 Линия: 3177 5 Метод: _append_to_list_of_files 6 Тип ошибки: KeyError 7 8{ 9 'P': ['./6V807Mf_gHM.003.mp4'], 10 'O': [0.5], 11 'C': [0.6], 12 'E': [0.2], 13 'A': [0.1], 14 'N': [0.8] 15}
- _bold_wrapper(message: str) str[source]
Wrapped message with bold text
Note
protected method
- Parameters:
message (str) – Message
- Returns:
Wrapped message with bold text
- Return type:
str
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en', bold_text = False) 4print(core._bold_wrapper( 5 'Wrapped message without bold text' 6)) 7 8core.bold_text = True 9print(core._bold_wrapper( 10 'Wrapped message with bold text' 11))
[1]:1<span style="color:#FF0000">Wrapped message without bold text</span> 2<span style="color:#FF4545">Wrapped message with bold text</span>
- _candidate_ranking(df_files: DataFrame | None = None, weigths_openness: int = 0, weigths_conscientiousness: int = 0, weigths_extraversion: int = 0, weigths_agreeableness: int = 0, weigths_non_neuroticism: int = 0, out: bool = True) DataFrame[source]
Ranking candidates by professional responsibilities
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
weigths_openness (int) – Weight for ranking personality trait (openness)
weigths_conscientiousness (int) – Weight for ranking personality trait (conscientiousness)
weigths_extraversion (int) – Weight for ranking personality trait (extraversion)
weigths_agreeableness (int) – Weight for ranking personality trait (agreeableness)
weigths_non_neuroticism (int) – Weight for ranking personality trait (non-neuroticism)
out (bool) – Display
- Returns:
DataFrame with ranking data
- Return type:
pd.DataFrame
Examples
True – 1 –
In [1]:1import pandas as pd 2from oceanai.modules.core.core import Core 3 4df = pd.DataFrame({ 5 "Path": [ 6 "_plk5k7PBEg.003.mp4", 7 "2d6btbaNdfo.000.mp4", 8 "300gK3CnzW0.001.mp4" 9 ], 10 "Openness": [0.581159, 0.463991, 0.60707], 11 "Conscientiousness": [0.628822, 0.418851, 0.591893], 12 "Extraversion": [0.466609, 0.41301, 0.520662], 13 "Agreeableness": [0.622129, 0.493329, 0.603938], 14 "Non-Neuroticism": [0.553832, 0.423093, 0.565726] 15}) 16 17core = Core() 18 19core._candidate_ranking(df, 20, 25, 10, 10, 35)
[1]:1PersonID Path Openness Conscientiousness Extraversion Agreeableness Non-Neuroticism Candidate score 23 300gK3CnzW0.001.mp4 0.607070 0.591893 0.520662 0.603938 0.565726 57.985135 31 _plk5k7PBEg.003.mp4 0.581159 0.628822 0.466609 0.622129 0.553832 57.615230 42 2d6btbaNdfo.000.mp4 0.463991 0.418851 0.413010 0.493329 0.423093 43.622740
Error – 1 –
In [3]:1import pandas as pd 2from oceanai.modules.core.core import Core 3 4df = pd.DataFrame({ 5 "Path": [ 6 "_plk5k7PBEg.003.mp4", 7 "2d6btbaNdfo.000.mp4", 8 "300gK3CnzW0.001.mp4" 9 ], 10 "Openness": [0.581159, 0.463991, 0.60707], 11 "Conscientiousness": [0.628822, 0.418851, 0.591893], 12 "Extraversion": [0.466609, 0.41301, 0.520662], 13 "Agreeableness": [0.622129, 0.493329, 0.603938], 14 "Non-Neuroticism": [0.553832, 0.423093, 0.565726] 15}) 16 17core = Core() 18 19core._candidate_ranking(df, 0, 0, 0, 0,0)
[3]:1[2024-10-06 20:28:22] Что-то пошло не так ... сумма весов для ранжирования персональных качеств должна быть равна 100 ... 2 3 Файл: /Users/dl/@DmitryRyumin/Python/envs/OCEANAI/lib/python3.9/site-packages/oceanai/modules/core/core.py 4 Линия: 3597 5 Метод: _candidate_ranking 6 Тип ошибки: TypeError
- _clear_notebook_history_output() None[source]
Clearing message output history in a Jupyter cell
Note
protected method
- Returns:
None
- Return type:
None
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._add_notebook_history_output( 6 message = 'Message 1', last = False 7) 8core._add_notebook_history_output( 9 message = 'Message 2', last = False 10) 11 12core._clear_notebook_history_output() 13 14core.show_notebook_history_output()
[1]:1
- _colleague_personality_desorders(df_files: DataFrame | None = None, correlation_coefficients_mbti: DataFrame | None = None, correlation_coefficients_disorders: DataFrame | None = None, personality_desorder_number: int = 3, col_name_ocean: str = 'Trait', threshold: float = 0.55, out: bool = True) DataFrame[source]
Определение степени выраженности персональных растройств по версии MBTI
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
correlation_coefficients_mbti (pd.DataFrame) – DataFrame c коэффициентами корреляции для MBTI
correlation_coefficients_disorders (pd.DataFrame) – DataFrame c коэффициентами корреляции для расстройств
target_scores (List[float]) – List with the names of personality traits scores
personality_desorder_number (int) – Количество расстройств для демонстрации
threshold (float) – Threshold for scores of traits polarity (e.g., introvert < 0.55, extrovert > 0.55)
out (bool) – Display
col_name_ocean (str)
- Returns:
DataFrame c вероятностью выраженности персональных растройств
- Return type:
pd.DataFrame
- _colleague_personality_type_match(df_files: DataFrame | None = None, correlation_coefficients: DataFrame | None = None, target_scores: List[float] = [0.47, 0.63, 0.35, 0.58, 0.51], col_name_ocean: str = 'Trait', threshold: float = 0.55, out: bool = True) DataFrame[source]
Поиск коллег по совместимости персональных типов по версии MBTI
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
correlation_coefficients (pd.DataFrame) – DataFrame with correlation coefficients
target_scores (List[float]) – List with the names of personality traits scores
threshold (float) – Threshold for scores of traits polarity (e.g., introvert < 0.55, extrovert > 0.55)
out (bool) – Display
col_name_ocean (str)
- Returns:
DataFrame c совместимостью коллег по персональным типам по версии MBTI
- Return type:
pd.DataFrame
- _colleague_ranking(df_files: DataFrame | None = None, correlation_coefficients: DataFrame | None = None, target_scores: List[float] = [0.47, 0.63, 0.35, 0.58, 0.51], colleague: str = 'major', equal_coefficients: float = 0.5, out: bool = True) DataFrame[source]
Finding a suitable colleague
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
correlation_coefficients (pd.DataFrame) – DataFrame with correlation coefficients
target_scores (List[float]) – List with the names of personality traits scores
colleague (str) – Rank of compatibility colleague
equal_coefficients (float) – Coefficient applied to scores in case of equality of scores of two people
out (bool) – Display
- Returns:
DataFrame with ranked colleagues
- Return type:
pd.DataFrame
- _compatibility_percentage(type1: str, type2: str, weights: list) tuple[float, float][source]
Вычисление процента совместимости и оценки на основе сравнения двух типов
Note
protected method
- Parameters:
type1 (str) – Первый тип, который необходимо сравнить
type2 (str) – Второй тип для сравнения с первым
weights (list) – Список весов, где каждый элемент соответствует значению в type1 и type2
- Returns:
match_percentage (float): Процент совместимости, рассчитываемый как отношение совпадающих элементов к общему числу
weighted_score (float): Взвешенная оценка совместимости, рассчитанная на основе совпадающих элементов и их весов
- Return type:
tuple
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5type1 = [1, 2, 3, 4] 6type2 = [1, 2, 0, 4] 7weights = [0.5, 1.0, 1.5, 2.0] 8 9core._compatibility_percentage(type1, type2, weights)
[1]:1(75.0, 2.625)
- _create_folder_for_logs(out: bool = True)[source]
Creating a directory for saving LOG files
Note
protected method
- Parameters:
out (bool) – Display
- Returns:
True if the directory is created or exists, otherwise False
- Return type:
bool
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core.path_to_logs_ = './logs' 6 7core._create_folder_for_logs(out = True)
[1]:1true
- _del_last_el_notebook_history_output() None[source]
Removing the last message from the message output history in a Jupyter cell
Note
protected method
- Returns:
None
- Return type:
None
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._add_notebook_history_output( 6 message = 'Message 1', last = False 7) 8core._add_notebook_history_output( 9 message = 'Message 2', last = False 10) 11 12core._del_last_el_notebook_history_output() 13 14core.show_notebook_history_output()
[1]:1Message 1
- _error(message: str, last: bool = False, out: bool = True) None[source]
Error message
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._error( 6 message = 'Error message 1', 7 last = False, out = True 8) 9 10core.color_simple_ = '#FFF' 11core.color_err_ = 'FF0000' 12core.bold_text_ = False 13 14core._error( 15 message = 'Error message 2', 16 last = True, out = True 17)
[1]:1[2022-10-12 15:21:00] Error message 1 2[2022-10-12 15:21:00] Error message 2
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._error( 6 message = '', 7 last = False, out = True 8)
[2]:1[2022-10-12 17:06:04] Invalid argument types or values in "Core._error" ...
- _error_wrapper(message: str) str[source]
Wrapped error message
Note
protected method
- Parameters:
message (str) – Message
- Returns:
Wrapped error message
- Return type:
str
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4print(core._error_wrapper( 5 'Wrapped error message 1' 6)) 7 8core.color_err_ = '#FF4545' 9print(core._error_wrapper( 10 'Wrapped error message 2' 11))
[1]:1<span style="color:#FF0000">Wrapped error message 1</span> 2<span style="color:#FF4545">Wrapped error message 2</span>
- _get_paths(path: Iterable, depth: int = 1, out: bool = True) List[str] | bool[source]
Getting directories where data is stored
Note
protected method
- Parameters:
path (Iterable) – Dataset directory
depth (int) – Hierarchy depth for class extraction
out (bool) – Display
- Returns:
False if the argument check fails or a list of directories
- Return type:
Union[List[str], bool]
Examples
True – 1 –
In [1]:1core = Core() 2core._get_paths( 3 path = '/Users/dl/GitHub/oceanai/oceanai/dataset', 4 depth = 1, out = True 5)
[1]:1[ 2 '/Users/dl/GitHub/oceanai/oceanai/dataset/test80_01', 3 '/Users/dl/GitHub/oceanai/oceanai/dataset/1', 4 '/Users/dl/GitHub/oceanai/oceanai/dataset/test80_17' 5]
Errors – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._get_paths( 5 path = '', 6 depth = 1, out = True 7)
[2]:1[2022-10-12 16:36:16] Invalid argument types or values in "Core._get_paths" ... 2False
– 2 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._get_paths( 5 path = '/Users/dl/GitHub/oceanai/oceanai/folder', 6 depth = 1, out = True 7)
[3]:1[2024-10-06 21:01:44] Что-то пошло не так ... директория "/Users/dl/GitHub/oceanai/oceanai/folder" не найдена ... 2 3 Файл: /Users/dl/@DmitryRyumin/Python/envs/OCEANAI/lib/python3.9/site-packages/oceanai/modules/core/core.py 4 Линия: 2964 5 Метод: _get_paths 6 Тип ошибки: FileNotFoundError 7 8False
- _info(message: str, last: bool = False, out: bool = True) None[source]
Announcement
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._info( 6 message = 'Announcement 1', 7 last = False, out = True 8) 9 10core.color_simple_ = '#FFF' 11core.color_info_ = '#0B45B9' 12core.bold_text_ = False 13 14core._info( 15 message = 'Announcement 2', 16 last = True, out = True 17)
[1]:1[2022-10-14 11:35:00] Announcement 1 2[2022-10-14 11:35:00] Announcement 2
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._info( 6 message = '', 7 last = False, out = True 8)
[2]:1[2022-10-14 11:43:00] Invalid argument types or values in "Core._info" ...
- _info_true(message: str, last: bool = False, out: bool = True) None[source]
True information
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._info_true( 6 message = 'Informational true message 1', 7 last = False, out = True 8) 9 10core.color_true_ = '#008001' 11core.bold_text_ = False 12 13core._info_true( 14 message = 'Informational true message 2', 15 last = True, out = True 16)
[1]:1Informational true message 1 2 3Informational true message 2
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._info_true( 6 message = '', 7 last = False, out = True 8)
[2]:1[2022-10-22 16:46:56] Invalid argument types or values in "Core._info_true" ...
- _info_wrapper(message: str) str[source]
Wrapped announcement
Note
protected method
- Parameters:
message (str) – Message
- Returns:
Wrapped announcement
- Return type:
str
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4print(core._info_wrapper('Wrapped announcement 1')) 5 6core.color_info_ = '#0B45B9' 7print(core._info_wrapper('Wrapped announcement 2'))
[1]:1<span style="color:#1776D2">Wrapped announcement 1</span> 2<span style="color:#0B45B9">Wrapped announcement 2</span>
- _inv_args(class_name: str, build_name: str, last: bool = False, out: bool = True) None[source]
Message about specifying invalid argument types
Note
protected method
- Parameters:
class_name (str) – Class name
build_name (str) – Function method/name
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._inv_args( 5 Core.__name__, core._info.__name__, 6 last = False, out = True 7)
[1]:1[2022-10-14 11:58:04] Invalid argument types or values in "Core._info" ...
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._inv_args(1, '', last = False, out = True)
[2]:1[2022-10-14 11:58:04] Invalid argument types or values in "Core._inv_args" ...
- _metadata_info(last: bool = False, out: bool = True) None[source]
Library Information
Note
protected method
- Parameters:
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._metadata_info(last = False, out = True)
[1]:1[2022-10-14 13:05:54] oceanai - персональные качества личности человека: 2 Авторы: 3 Рюмина Елена [ryumina_ev@mail.ru] 4 Рюмин Дмитрий [dl_03.03.1991@mail.ru] 5 Карпов Алексей [karpov@iias.spb.su] 6 Сопровождающие: 7 Рюмина Елена [ryumina_ev@mail.ru] 8 Рюмин Дмитрий [dl_03.03.1991@mail.ru] 9 Версия: 1.0.0a37 10 Лицензия: BSD License
Better not to do that – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._metadata_info(last = 1, out = [])
[2]:1[2022-10-14 13:05:54] oceanai - персональные качества личности человека: 2 Авторы: 3 Рюмина Елена [ryumina_ev@mail.ru] 4 Рюмин Дмитрий [dl_03.03.1991@mail.ru] 5 Карпов Алексей [karpov@iias.spb.su] 6 Сопровождающие: 7 Рюмина Елена [ryumina_ev@mail.ru] 8 Рюмин Дмитрий [dl_03.03.1991@mail.ru] 9 Версия: 1.0.0a37 10 Лицензия: BSD License
- _notebook_display_markdown(message: str, last: bool = False, out: bool = True) None[source]
Message display
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._notebook_display_markdown('Message')
[1]:1Message
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._notebook_display_markdown(1)
[2]:1[2022-10-14 15:52:03] Invalid argument types or values in "Core._notebook_display_markdown" ...
- _other_error(message: str, last: bool = False, out: bool = True) None[source]
Other error message
Note
protected method
- Parameters:
message (str) – Message
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5try: raise Exception 6except: 7 core._other_error( 8 message = 'Other error message 1', 9 last = False, out = True 10 ) 11 12core.color_simple_ = '#FFF' 13core.color_err_ = 'FF0000' 14core.bold_text_ = False 15 16try: raise Exception 17except: 18 core._other_error( 19 message = 'Other error message 2', 20 last = True, out = True 21 )
[1]:1[2024-10-06 21:09:43] Сообщение об ошибке 1 2 3 Файл: /var/folders/gw/w3k5kxtx0s3_nqdqw94zr8yh0000gn/T/ipykernel_3613/1171760106.py 4 Линия: 5 5 Метод: 1171760106.py 6 Тип ошибки: Exception 7 8[2024-10-06 21:09:43] Сообщение об ошибке 2 9 10 Файл: /var/folders/gw/w3k5kxtx0s3_nqdqw94zr8yh0000gn/T/ipykernel_3613/1171760106.py 11 Линия: 16 12 Метод: 1171760106.py 13 Тип ошибки: Exception
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5try: raise Exception 6except: 7 core._other_error( 8 message = '', 9 last = False, out = True 10 )
[2]:1[2022-10-14 16:25:11] Invalid argument types or values in "Core._other_error" ...
- _priority_calculation(df_files: DataFrame | None = None, correlation_coefficients: DataFrame | None = None, col_name_ocean: str = 'Trait', threshold: float = 0.55, number_priority: int = 1, number_importance_traits: int = 1, out: bool = True) DataFrame[source]
Ranking preferences
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
correlation_coefficients (pd.DataFrame) – DataFrame with correlation coefficients
col_name_ocean (str) – Column with the names of personality traits
threshold (float) – Threshold for scores of traits polarity (e.g., introvert < 0.55, extrovert > 0.55)
number_priority (int) – Number of priority preferences
number_importance_traits (int) – Number of the most important personality traits
out (bool) – Display
- Returns:
DataFrame with ranked priority
- Return type:
pd.DataFrame
- _priority_skill_calculation(df_files: DataFrame | None = None, correlation_coefficients: DataFrame | None = None, threshold: float = 0.55, out: bool = True) DataFrame[source]
Ranking candidates by professional skills
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
correlation_coefficients (pd.DataFrame) – DataFrame with correlation coefficients
threshold (float) – Threshold for scores of traits polarity (e.g., introvert < 0.55, extrovert > 0.55)
out (bool) – Display
- Returns:
DataFrame with ranked candidates
- Return type:
pd.DataFrame
- _professional_match(df_files: DataFrame | None = None, personality_type: str | None = None, correlation_coefficients: DataFrame | None = None, col_name_ocean: str = 'Trait', threshold: float = 0.55, out: bool = True) DataFrame[source]
Ранжирование кандидатов по одному из шестнадцати персональных типов по версии MBTI
Note
protected method
- Parameters:
df_files (pd.DataFrame) – DataFrame with data
personality_type (str) – Персональный тип по версии MBTI
threshold (float) – Threshold for scores of traits polarity (e.g., introvert < 0.55, extrovert > 0.55)
out (bool) – Display
correlation_coefficients (DataFrame | None)
col_name_ocean (str)
- Returns:
DataFrame with ranked candidates
- Return type:
pd.DataFrame
- _progressbar(message: str, progress: str, clear_out: bool = True, last: bool = False, out: bool = True) None[source]
Progressbar
Note
protected method
- Parameters:
message (str) – Message
progress (str) – Progressbar
clear_out (bool) – Clearing the output area
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for cnt in range(1, 4): 6 core._progressbar( 7 message = 'Action cycle', 8 progress = 'Iteration ' + str(cnt), 9 clear_out = False, 10 last = False, out = True 11 )
[1]:1[2022-10-14 16:52:20] Action cycle 2 3 Iteration 1 4 5[2022-10-14 16:52:20] Action cycle 6 7 Iteration 2 8 9[2022-10-14 16:52:20] Action cycle 10 11 Iteration 3
– 2 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for cnt in range(1, 4): 6 core._progressbar( 7 message = 'Action cycle', 8 progress = 'Iteration ' + str(cnt), 9 clear_out = True, 10 last = True, out = True 11 )
[2]:1[2022-10-14 16:52:20] Action cycle 2 3 Iteration 3
Error – 1 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for cnt in range(1, 4): 6 core._progressbar( 7 message = 1, 8 progress = 2, 9 clear_out = True, 10 last = False, out = True 11 )
[3]:1[2022-10-14 16:52:38] Invalid argument types or values in "Core._progressbar" ...
- _progressbar_union_predictions(message: str, item: int, info: str, len_paths: int, clear_out: bool = True, last: bool = False, out: bool = True) None[source]
Progressbar for getting scores by audio
Note
private method
- Parameters:
message (str) – Message
item (int) – Number video file
info (str) – Local path
len_paths (int) – Number of video files
clear_out (bool) – Clearing the output area
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5l = range(1, 4, 1) 6 7for progress in l: 8 core._progressbar_union_predictions( 9 message = 'Action cycle', 10 item = progress, 11 info = 'The path to the file', 12 len_paths = len(l), 13 clear_out = False, 14 last = False, out = True 15 )
[1]:1[2022-10-20 16:51:49] Action cycle 2 3 1 из 3 (33.33%) ... The path to the file ... 4 5[2022-10-20 16:51:49] Action cycle 6 7 2 из 3 (66.67%) ... The path to the file ... 8 9[2022-10-20 16:51:49] Action cycle 10 11 3 из 3 (100.0%) ... The path to the file ...
– 2 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5l = range(1, 4, 1) 6 7for progress in l: 8 core._progressbar_union_predictions( 9 message = 'Action cycle', 10 item = progress, 11 info = 'The path to the file', 12 len_paths = len(l), 13 clear_out = True, 14 last = True, out = True 15 )
[2]:1[2022-10-20 16:51:55] Action cycle 2 3 3 из 3 (100.0%) ... The path to the file ...
Error – 1 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5l = range(1, 4, 1) 6 7for progress in l: 8 core._progressbar_union_predictions( 9 message = 1, 10 item = progress, 11 info = 'The path to the file', 12 len_paths = len(l), 13 clear_out = True, 14 last = False, out = True 15 )
[3]:1[2024-10-06 21:13:03] Неверные типы или значения аргументов в "Core._progressbar_union_predictions" ...
- _r_end(last: bool = False, out: bool = True) None[source]
End of runtime countdown
Note
protected method
Hint
Works in conjunction with
_r_start()- Parameters:
last (bool) – Replacing the last message
out (bool) – Display
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._r_start() 6for cnt in range(0, 10000000): res = cnt * 2 7core._r_end()
[1]:1--- Runtime: 0.819 sec. ---
Error – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for cnt in range(0, 10000000): res = cnt * 2 6core._r_end()
[1]:1--- Runtime: 1665756222.704 сек. ---
- _r_start() None[source]
Start time countdown
Note
protected method
Hint
Works in conjunction with
_r_end()- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._r_start() 6for cnt in range(0, 10000000): res = cnt * 2 7core._r_end()
[1]:1--- Runtime: 0.819 sec. ---
Error – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5for cnt in range(0, 10000000): res = cnt * 2 6core._r_end()
[1]:1--- Runtime: 1665756222.704 сек. ---
- _round_math(val: int | float, out: bool = True) int | bool[source]
Rounding numbers according to mathematical law
Note
protected method
- Parameters:
val (Union[int, float]) – Number to round
out (bool) – Display
- Returns:
Rounded number if no errors found, False otherwise
- Return type:
Union[int, bool]
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core._round_math(4.5)
[1]:15
– 2 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core._round_math(-2.5)
[1]:1-3
Error – 1 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._round_math('')
[3]:1[2022-11-03 15:52:30] Invalid argument types or values in "Core._round_math" ... 2 3False
- _save_logs(df: DataFrame, name: str, out: bool = True) bool[source]
Saving the LOG file
Note
protected method
- Parameters:
df (pd.DataFrame) – DataFrame to be saved to LOG file
name (str) – LOG filename
out (bool) – Display
- Returns:
True if the LOG file is saved, otherwise False
- Return type:
bool
Example
True – 1 –
In [1]:1import pandas as pd 2from oceanai.modules.core.core import Core 3 4df = pd.DataFrame.from_dict( 5 data = {'Test': [1, 2, 3]} 6) 7 8core = Core(lang = 'en') 9 10core.path_to_logs_ = './logs' 11 12core._save_logs( 13 df = df, name = 'test', out = True 14)
[1]:1True
- _search_file(path_to_file: str, ext: str, create: bool = False, out: bool = True) bool[source]
File Search
Note
protected method
- Parameters:
path_to_file (str) – The path to the file
ext (str) – File extension
create (bool) – Creating a file in case of its absence
out (bool) – Print the execution process
- Returns:
True if the file is found, otherwise False
- Return type:
bool
- _stat_acoustic_features(last: bool = False, out: bool = True, **kwargs: int | Tuple[int]) None[source]
Message with statistics of extracted features from an acoustic signal
Note
protected method
- Parameters:
last (bool) – Replacing the last message
out (bool) – Display
**kwargs (Union[int, Tuple[int]]) – Additional named arguments
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core( 4 lang = 'en', 5 color_simple = '#FFF', 6 color_info = '#1776D2', 7 bold_text = True, 8) 9 10core._stat_acoustic_features( 11 last = False, out = True, 12 len_hc_features = 12, 13 len_melspectrogram_features = 12, 14 shape_hc_features = [196, 25], 15 shape_melspectrogram_features = [224, 224, 3], 16)
[1]:1[2022-10-14 17:59:20] Statistics of the features extracted from the acoustic signal: 2 Total number of segments with: 3 1. expert features: 12 4 2. mel-spectrogram log: 12 5 Dimension of the matrix of expert features of one segment: 196 ✕ 25 6 Tensor dimension with log chalk spectrograms of one segment: 224 ✕ 224 ✕ 3
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core( 4 lang = 'en', 5 color_simple = '#FFF', 6 color_info = '#1776D2', 7 bold_text = True, 8) 9 10core._stat_acoustic_features( 11 last = False, out = True 12)
[2]:1[2022-10-14 17:59:21] Invalid argument types or values in "Core._stat_acoustic_features" ...
- _stat_text_features(last: bool = False, out: bool = True, **kwargs: int | Tuple[int]) None[source]
Message with statistics of extracted features from a text
Note
protected method
- Parameters:
last (bool) – Replacing the last message
out (bool) – Display
**kwargs (Union[int, Tuple[int]]) – Additional named arguments
- Returns:
None
- Return type:
None
- _stat_visual_features(last: bool = False, out: bool = True, **kwargs: int | Tuple[int]) None[source]
Message with statistics of extracted features from a visual signal
Note
protected method
- Parameters:
last (bool) – Replacing the last message
out (bool) – Display
**kwargs (Union[int, Tuple[int]]) – Additional named arguments
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core( 4 lang = 'en', 5 color_simple = '#FFF', 6 color_info = '#1776D2', 7 bold_text = True, 8) 9 10core._stat_visual_features( 11 last = False, out = True, 12 len_hc_features = 23, 13 len_nn_features = 23, 14 shape_hc_features = [10, 115], 15 shape_nn_features = [10, 512], 16 fps_before = 30, 17 fps_after = 10 18)
[1]:1[2022-11-03 16:18:40] Statistics of extracted features from visual signal: 2 Total number of segments since: 3 1. expert features: 23 4 2. eural network features: 23 5 Dimension of the matrix of expert features of one segment: 10 ✕ 115 6 Dimension of a tensor with neural network features of one segment: 10 ✕ 512 7 FPS down: with 30 to 10
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core( 4 lang = 'en', 5 color_simple = '#FFF', 6 color_info = '#1776D2', 7 bold_text = True, 8) 9 10core._stat_visual_features( 11 last = False, out = True 12)
[2]:1[2022-11-03 16:19:35] Invalid argument types or values in "Core._stat_visual_features" ...
- static _traceback() Dict[source]
Exception trace
Note
protected method
- Returns:
Dictionary describing the exception
- Return type:
Dict
Example
True – 1 –
In [1]:1import pprint 2from oceanai.modules.core.core import Core 3 4core = Core() 5 6try: raise Exception 7except: 8 pp = pprint.PrettyPrinter(compact = True) 9 pp.pprint(core._traceback())
[1]:1{ 2 'filename': '/var/folders/gw/w3k5kxtx0s3_nqdqw94zr8yh0000gn/T/ipykernel_3613/3289675153.py', 3 'lineno': 6, 4 'name': '<module>', 5 'type': 'Exception' 6}
- property df_accuracy_: DataFrame
Getting a DataFrame with precision calculation results
- Returns:
DataFrame with precision calculation results
- Return type:
pd.DataFrame
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4len(core.df_accuracy_)
[1]:10
- property df_files_: DataFrame
Getting a DataFrame with data
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4len(core.df_files_)
[1]:10
- property df_files_MBTI_colleague_match_: DataFrame
Получение DataFrame c ранжированными коллегами на основе MBTI
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
- property df_files_MBTI_disorders_: DataFrame
Получение DataFrame c ранжированными профессиональными расстройствами на основе MBTI
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
- property df_files_MBTI_job_match_: DataFrame
Получение DataFrame c ранжированными кандидатами на основе MBTI
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
- property df_files_colleague_: DataFrame
Getting a DataFrame with ranked colleagues based on data
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
- property df_files_priority_: DataFrame
Getting a DataFrame with ranked priority based on the data
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4len(core.df_files_priority_)
[1]:10
- property df_files_priority_skill_: DataFrame
Getting a DataFrame with ranked colleagues based on data
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
- property df_files_ranking_: DataFrame
Getting a DataFrame with ranked data
- Returns:
DataFrame with data
- Return type:
pd.DataFrame
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4 5core._round_math('')
[1]:10
- property df_pkgs_: DataFrame
Getting a DataFrame with versions of installed libraries
- Returns:
DataFrame with versions of installed libraries
- Return type:
pd.DataFrame
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4core.libs_vers(out = False, runtime = True, run = True) 5core.df_pkgs_
[1]:1|----|---------------|--------------| 2| | Package | Version | 3|----|---------------|--------------| 4| 1 | OpenCV | 4.10.0 | 5| 2 | MediaPipe | 0.10.14 | 6| 3 | NumPy | 1.23.5 | 7| 4 | SciPy | 1.13.1 | 8| 5 | Pandas | 2.2.3 | 9| 6 | Scikit-learn | 1.5.2 | 10| 7 | OpenSmile | 2.5.0 | 11| 8 | Librosa | 0.10.2.post1 | 12| 9 | AudioRead | 3.0.1 | 13| 10 | IPython | 8.18.1 | 14| 11 | Requests | 2.32.3 | 15| 12 | JupyterLab | 4.2.5 | 16| 13 | LIWC | 0.5.0 | 17| 14 | Transformers | 4.45.1 | 18| 15 | Sentencepiece | 0.2.0 | 19| 16 | Torch | 2.2.2 | 20| 17 | Torchaudio | 2.2.2 | 21|----|---------------|--------------|
- property dict_of_accuracy_: Dict[str, List[int | float]]
Getting a dictionary for a DataFrame with precision results
Hint
Based on this dictionary, a DataFrame is formed with the data
df_accuracy_- Returns:
Dictionary for DataFrame with precision results
- Return type:
Dict[str, List[Union[int, float]]]
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4len(core.dict_of_accuracy_)
[1]:10
- property dict_of_files_: Dict[str, List[int | str | float]]
Getting a dictionary for a DataFrame with data
Hint
Based on this dictionary, a DataFrame is formed with the data
df_files_- Returns:
Dictionary for DataFrame with data
- Return type:
Dict[str, List[Union[int, str, float]]]
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4len(core.dict_of_files_)
[1]:10
- property is_notebook_: bool
Getting the result of a library run definition in Jupyter or similar
- Returns:
True if the library is run in Jupyter or similar, otherwise False
- Return type:
bool
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4print(core.is_notebook_)
[1]:1True
- libs_vers(out: bool = True, runtime: bool = True, run: bool = True) None[source]
Getting and Displaying Versions of Installed Libraries
- Parameters:
out (bool) – Display
runtime (bool) – Run runtime
run (bool) – Run blocking
- Returns:
None
- Return type:
None
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core.libs_vers(out = True, runtime = True, run = True)
[1]:1|----|---------------|--------------| 2| | Package | Version | 3|----|---------------|--------------| 4| 1 | OpenCV | 4.10.0 | 5| 2 | MediaPipe | 0.10.14 | 6| 3 | NumPy | 1.23.5 | 7| 4 | SciPy | 1.13.1 | 8| 5 | Pandas | 2.2.3 | 9| 6 | Scikit-learn | 1.5.2 | 10| 7 | OpenSmile | 2.5.0 | 11| 8 | Librosa | 0.10.2.post1 | 12| 9 | AudioRead | 3.0.1 | 13| 10 | IPython | 8.18.1 | 14| 11 | Requests | 2.32.3 | 15| 12 | JupyterLab | 4.2.5 | 16| 13 | LIWC | 0.5.0 | 17| 14 | Transformers | 4.45.1 | 18| 15 | Sentencepiece | 0.2.0 | 19| 16 | Torch | 2.2.2 | 20| 17 | Torchaudio | 2.2.2 | 21| 18 | Torchvision | 0.17.2 | 22|----|---------------|--------------| 23--- Время выполнения: 0.005 сек. ---
– 2 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core.libs_vers(out = True, runtime = True, run = False)
[2]:1[2022-10-15 18:17:27] Run blocked by user ...
Error – 1 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core.libs_vers(out = True, runtime = True, run = 1)
[3]:1[2022-10-15 18:18:51] Invalid argument types or values in "Core.libs_vers" ...
- property runtime_
Getting runtime
- Returns:
Runtime
- Return type:
Union[int, float]
Examples
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core._r_start() 6for cnt in range(0, 10000000): res = cnt * 2 7core._r_end(out = False) 8 9print(core.runtime_)
[1]:10.838
Error – 1 –
In [2]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5print(core.runtime_)
[2]:1-1
– 2 –
In [3]:1from oceanai.modules.core.core import Core 2 3core = Core() 4 5core._r_start() 6for cnt in range(0, 10000000): res = cnt * 2 7 8print(core.runtime_)
[3]:1-1
- show_notebook_history_output() None[source]
Display message output history in a Jupyter cell
- Returns:
None
- Return type:
None
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core._info( 5 message = 'Announcement', 6 last = False, out = False 7) 8 9core.show_notebook_history_output()
[1]:1[2022-10-15 18:27:46] Announcement
- property true_traits_: Dict[str, str]
Getting paths to ground truth scores for calculating accuracy
- Returns:
Dictionary with paths to ground truth scores for calculating accuracy
- Return type:
Dict
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core() 4core.true_traits_
[1]:1{ 2 'fi': { 3 'sberdisk': 'https://download.sberdisk.ru/download/file/478675810?token=anU8umMha1GiWPQ&filename=data_true_traits_fi.csv', 4 'googledisk': 'https://drive.usercontent.google.com/download?id=1O5dliseCG-MOPEjriASge3iXxqyc7dgX&export=download&authuser=2&confirm=t&uuid=d7821fcd-0692-4f26-95b2-dd1a6af81657&at=AO7h07dS-gJaqtjsbSpyLloAV1Wv:1727196204665' 5 }, 6 'mupta': { 7 'sberdisk': 'https://download.sberdisk.ru/download/file/478675811?token=hUMsrUSKjSRrV5e&filename=data_true_traits_mupta.csv', 8 'googledisk': 'https://drive.usercontent.google.com/download?id=1s-2UhVFRaSZmTmqa3ztGPnaL_9dWFUlz&export=download&authuser=2&confirm=t&uuid=ef16d01d-40d9-4d30-a3c9-382eb4569f5a&at=AO7h07c4dLmma0g29tJXsrh2jLMF:1727196324559' 9 } 10}
- property weights_for_big5_: Dict[str, Dict]
Obtaining weights for neural network architectures
- Returns:
Dictionary with weights for neural network architectures
- Return type:
Dict
Example
True – 1 –
In [1]:1from oceanai.modules.core.core import Core 2 3core = Core(lang = 'en') 4core.weights_for_big5_
[1]:1{ 2 'audio': { 3 'fi': { 4 'hc': { 5 'googledisk': 'https://drive.usercontent.google.com/download?id=11EeWmEzjBM2uVpDv1JTNlUPoUmYTc4ar&export=download&authuser=2&confirm=t&uuid=583e76db-450a-4bb7-b0ae-b454acb08613&at=AO7h07dsgtllWrkR2jZ0kRzdDHfc:1727270957484' 6 }, 7 'nn': { 8 'googledisk': 'https://drive.usercontent.google.com/download?id=1GQLVdYs0XhPYI-Hn7rYw2-LpOuWgBBzx&export=download&authuser=2&confirm=t&uuid=c82c6516-7da7-45c3-8705-2727a6c6ffb8&at=AO7h07ceFDOtg7sMb5Gdi2Mzqe_K:1727288160810' 9 }, 10 'b5': { 11 'openness': { 12 'googledisk': 'https://drive.usercontent.google.com/download?id=1RDQ_EyKv-GLEMUvs3w9o1cThClMjPQud&export=download&authuser=2&confirm=t&uuid=9c24908a-46dd-4772-bb37-5f2d5b1ceae3&at=AN_67v21iOtcNefAGCFlefTPqYGz:1727290092037' 13 }, 14 'conscientiousness': { 15 'googledisk': 'https://drive.usercontent.google.com/download?id=18M0kCW6Q9oD4B-JFRaECEL05U1FUShDB&export=download&authuser=2&confirm=t&uuid=e582c3c5-5dbc-4955-895c-3e52414a2a97&at=AN_67v1_K1HQXbRfwLnjbJbfgh6k:1727289934706' 16 }, 17 'extraversion': { 18 'googledisk': 'https://drive.usercontent.google.com/download?id=1qi2YVf25Bs5QfPfXlXXEO8x5hXu--WcA&export=download&authuser=2&confirm=t&uuid=6bdf3546-4672-46ef-b7fc-95d36105f5a1&at=AN_67v015u8YFSwjMXh9ygO5mtk_:1727289973929' 19 }, 20 'agreeableness': { 21 'googledisk': 'https://drive.usercontent.google.com/download?id=1glPO999kk7As81F-tc1-jpq1fbNeUQgA&export=download&authuser=2&confirm=t&uuid=0cc2d044-3616-4864-a2dc-8faac4151959&at=AN_67v24uko_8JufEMR3YyLS2fkQ:1727290023217' 22 }, 23 'non_neuroticism': { 24 'googledisk': 'https://drive.usercontent.google.com/download?id=1Y89jPj_4vVfyBtE43gP16vyaateKP2Bb&export=download&authuser=2&confirm=t&uuid=bdea116a-d166-475c-8257-6482ad6391a9&at=AN_67v2rMxyCAy8hhgvFtWR751Wq:1727290055424' 25 } 26 } 27 }, 28 'mupta': { 29 'hc': { 30 'googledisk': 'https://drive.usercontent.google.com/download?id=151ISGwKvuPnKLvObeU9CS-2AsWV98cwI&export=download&authuser=2&confirm=t&uuid=0f2b7770-fdea-4434-b522-b9df66a92b5d&at=AO7h07epzz7_6h7alDMVoJspjyhz:1727271012853' 31 }, 32 'nn': { 33 'googledisk': 'https://drive.usercontent.google.com/download?id=1ePwbNYottjpNW2Ehi45C8O2fm_H6HuXh&export=download&authuser=2&confirm=t&uuid=d7ece633-385c-4511-a4f0-58cdb9e02fe2&at=AO7h07e6sjR3UG7bTOaGEz5OUOT3:1727288215449' 34 } 35 } 36 }, 37 'video': { 38 'fi': { 39 'hc': { 40 'googledisk': 'https://drive.usercontent.google.com/download?id=1Ug9b-vvnU9BQtyahlfj7no3CVSf2MUMB&export=download&authuser=2&confirm=t&uuid=5f135650-15b8-4ad0-9af4-68521a731c0a&at=AO7h07dLs9A6Jwf_4uJWAOysU4_y:1727105753033' 41 }, 42 'nn': { 43 'googledisk': 'https://drive.usercontent.google.com/download?id=1QF7ReDQXpCciF7aWjbEt4Q-x06hwDrMZ&export=download&authuser=2&confirm=t&uuid=c2fd5a21-7af7-4b7f-8419-d7d628847768&at=AO7h07eilj-Bm5RIk0HwQBEr37ri:1727175670133' 44 }, 45 'fe': { 46 'googledisk': 'https://drive.usercontent.google.com/download?id=1SOuDY_JGlu5vV26zz_zNjpYZOu751A3Y&export=download&authuser=2&confirm=t&uuid=4cec3ead-89af-45ce-9437-0b1eed463fdc&at=AO7h07cBxO6cNzloq6LmFdhUenNy:1727174252392' 47 }, 48 'b5': { 49 'openness': { 50 'googledisk': 'https://drive.usercontent.google.com/download?id=1vnpHymFLm3pXeYoyTjGasrIvzz-xzKO3&export=download&authuser=2&confirm=t&uuid=a6e4bb96-53bf-4d4b-9a38-978665a51792&at=AO7h07eQ5SN8TN9gRdAGQZ5yh0im:1727181613809' 51 }, 52 'conscientiousness': { 53 'googledisk': 'https://drive.usercontent.google.com/download?id=1HQrLYQBkRiNbKUoD9BpyelF6GQJcjLid&export=download&authuser=2&confirm=t&uuid=049a1f8d-87e2-4c49-800b-f7e7d9ac58c4&at=AO7h07e3Cpm8-4BVOsWcSEs9vhf9:1727181922083' 54 }, 55 'extraversion': { 56 'googledisk': 'https://drive.usercontent.google.com/download?id=1xDowylrNjMQfnJk4KJkYNLoaK-33XKI0&export=download&authuser=2&confirm=t&uuid=88491cad-46ec-41c2-ae28-2b180e597fee&at=AO7h07fjaflK_FwdhLXBHH42uUXY:1727181953043' 57 }, 58 'agreeableness': { 59 'googledisk': 'https://drive.usercontent.google.com/download?id=1AfRF1j5M_XkZRDaG6NjMz26iJV3tAmFi&export=download&authuser=2&confirm=t&uuid=443dc2d7-1c51-4418-b4fa-19dbbb17d624&at=AO7h07di_ajVQCpEcXb_XqU6ak2I:1727181988356' 60 }, 61 'non_neuroticism': { 62 'googledisk': 'https://drive.usercontent.google.com/download?id=1qB1iRbuTKLqKm-CH96rEBgabj-AnllIt&export=download&authuser=2&confirm=t&uuid=0a087c9a-4df6-408f-80cd-ef1f20390ce2&at=AO7h07dwQThSoBctwDwDDPfqre9T:1727182020902' 63 } 64 } 65 }, 66 'mupta': { 67 'hc': { 68 'googledisk': 'https://drive.usercontent.google.com/download?id=1Ybz6X5hNl3JCmZCpuLnLdzWY_W7Gnf5J&export=download&authuser=2&confirm=t&uuid=6dbd07bb-b9f6-40e8-88b2-d5adb34076c3&at=AO7h07eLQrKFVFfTFmiq7tYK2KZX:1727185527591' 69 }, 70 'nn': { 71 'googledisk': 'https://drive.usercontent.google.com/download?id=1gbRUh-4AYf8-4OpXj17gAv3SfmpCqv1V&export=download&authuser=2&confirm=t&uuid=9784f923-994e-4e27-8c82-82d603d5f1c5&at=AO7h07euCb37HT_H8rq9w_H4FdR-:1727185473779' 72 }, 73 'fe': { 74 'googledisk': 'https://drive.usercontent.google.com/download?id=1SOuDY_JGlu5vV26zz_zNjpYZOu751A3Y&export=download&authuser=2&confirm=t&uuid=4cec3ead-89af-45ce-9437-0b1eed463fdc&at=AO7h07cBxO6cNzloq6LmFdhUenNy:1727174252392' 75 } 76 } 77 }, 78 'text': { 79 'fi': { 80 'hc': 81 'googledisk': 'https://drive.usercontent.google.com/download?id=1QwHyCCgitWKuDPKxhylaD4aZJYuTEOF1&export=download&authuser=2&confirm=t&uuid=8ac05c03-b0b7-4898-bf02-14841a904111&at=AN_67v1y3k_bXdYkrUGxTQOwRUP0:1727456663203' 82 }, 83 'nn': { 84 'googledisk': 'https://drive.usercontent.google.com/download?id=1pbnumZzDSw9WifZUNhdvfY8azZAatapb&export=download&authuser=2&confirm=t&uuid=fad1e6b8-fe6e-4c61-bdcd-35164a4659f2&at=AN_67v1gjCWAv8ebAU1Q5EvTte7b:1727456849254' 85 }, 86 'b5': { 87 'googledisk': 'https://drive.usercontent.google.com/download?id=16gw0AfZxPkZZgLXq2dvl2K809SYsxMUm&export=download&authuser=2&confirm=t&uuid=17138780-3b94-4cef-b80d-4fda11f7137e&at=AN_67v1kXjIJrQkgOcoY9fxfRhG9:1727456761067' 88 } 89 }, 90 'mupta': { 91 'hc': { 92 'googledisk': 'https://drive.usercontent.google.com/download?id=11qDQPLOfoIkm6woMpHc2aZn2Pd6WP2Yp&export=download&authuser=2&confirm=t&uuid=869a2f77-70b2-4440-9e27-5c08e4b06e68&at=AN_67v09IFO8WjgKVGN7cZVW2bWK:1727456887637' 93 }, 94 'nn': { 95 'googledisk': 'https://drive.usercontent.google.com/download?id=1dyH4lqajNS7LOwNqcfj3YktxlJrbLSXf&export=download&authuser=2&confirm=t&uuid=f69981d0-9852-4e0e-8d49-91b55dae3da0&at=AN_67v1nGyJJ427XWPLc3ISlZxbx:1727456802847' 96 }, 97 'b5': { 98 'googledisk': 'https://drive.usercontent.google.com/download?id=1ZZqOdLdaH9IgZyHP8ko4nZ1SHTnF66dl&export=download&authuser=2&confirm=t&uuid=76bb23e4-42d2-4b12-befc-a5e72045fcb0&at=AN_67v3JssIUaLVilcAsJjXnjBdu:1727456716440' 99 } 100 } 101 }, 102 'av': { 103 'fi': { 104 'b5': { 105 'openness': { 106 'googledisk': 'https://drive.usercontent.google.com/download?id=1XfpJewfYQ9Ge_CFkI15yaR42ezMRJmgV&export=download&authuser=2&confirm=t&uuid=a5dbbdeb-6459-4542-8c3c-2757c24b8cd6&at=AN_67v34zt7FGMCrrsTtNhSEVJ_M:1727615612517' 107 }, 108 'conscientiousness': { 109 'googledisk': 'https://drive.usercontent.google.com/download?id=1cnNIWbAh9mm6YGN4IMax_3GNIWS5UJd1&export=download&authuser=2&confirm=t&uuid=aa6e7365-e39b-4aa7-89e5-04391a825e74&at=AN_67v25YKChbofCWOTQaIIZ0lOQ:1727615643757' 110 }, 111 'extraversion': { 112 'googledisk': 'https://drive.usercontent.google.com/download?id=1xdEnwPaY0Gbonv9irx4jBbtCiMFmlzJ3&export=download&authuser=2&confirm=t&uuid=e427c375-46f1-43de-a9e5-c41c25431b05&at=AN_67v35vZ-z25nFZMbVq9yFE8gq:1727615666732' 113 }, 114 'agreeableness': { 115 'googledisk': 'https://drive.usercontent.google.com/download?id=1vpoyqPR3MsLdNjkAvP5_KKZdFIvJn45F&export=download&authuser=2&confirm=t&uuid=573effe5-e8d1-44ab-98f8-fc3f39b566d9&at=AN_67v1i_iaJOCQTVfAPFWjiDWUY:1727615685740' 116 }, 117 'non_neuroticism': { 118 'googledisk': 'https://drive.usercontent.google.com/download?id=16Kv55LfBuxUlL7fhY8lBtcgs1Xtfy7f4&export=download&authuser=2&confirm=t&uuid=e3252289-7223-42ad-ac20-231083bb508d&at=AN_67v3Pe1XkhJkfE3JndwkXTUd9:1727615583703' 119 } 120 } 121 }, 122 'mupta': { 123 'b5': {} 124 } 125 }, 126 'avt': { 127 'fi': { 128 'b5': { 129 'googledisk': 'https://drive.usercontent.google.com/download?id=1p4BVr55tchCReCGLZ4y39ttcp5v_cmYq&export=download&authuser=2&confirm=t&uuid=e62c020f-97fb-4975-9872-666dd8e548db&at=AN_67v0U3BmTKeqFSiEKi29moDbn:1727798300717' 130 } 131 }, 132 'mupta': { 133 'b5': { 134 'googledisk': 'https://drive.usercontent.google.com/download?id=1HPFj8nv79H5rLLmjC32Hm76TIdo7GEH6&export=download&authuser=2&confirm=t&uuid=566a2d01-ef26-4cbd-8986-36b6a4a12e65&at=AN_67v1WOHojwdVTzowewJl0vWWz:1727798374011' 135 } 136 } 137 } 138}