Skip to content

Conversation

Alena0704
Copy link
Collaborator

Rewrite test for look-a-like functional. Current tests contain correlation columns and queries have more nodes and description features.

Add aqo_k as custom parameter to define few number of features for prediction. Its default value is 3. Queries can contain a larger number of features than 3 especially generic queries.

Also add predict_a_few_neibours parameter for switch avalable to predict a few neibors than 3. It is done for not to change the previous logic of the code

Alena Rybakina added 4 commits January 20, 2023 12:03
Rewrite test for look-a-like functional. Current tests contain
correlation columns and queries have more nodes and description
features.

Add aqo_k as custom parameter to define few number of features
for prediction. Its default value is 3. Queries can contain
a larger number of features than 3 especially generic queries.

Also add predict_a_few_neibours parameter for switch avalable
to predict a few neibors than 3. It is done for not to change
the previous logic of the code
aqo.c Outdated
PGC_USERSET,
0,
NULL,
lc_assign_hook,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем здесь эта ссылка на функцию?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Поправила,ссылки нет.

NULL,
NULL);

DefineCustomBoolVariable("aqo.predict_with_few_neighbors",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот параметр нужен только для тестирования или зачем? Стоит откомментировать его , иначе непонятна необходимость.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Параметр нужен для того, чтобы не считались предсказания, если найдено меньшее количество соседей, чем задано в параметре min_neighbors_for_predicting. Без этой настройки, aqo сразу делает предсказание при одном найденном соседе, что может быть в некоторых случаях неверно.
Тут дается дополнительная возможность дождаться, когда aqo обучиться и запросов в базе знаний станет достаточно для получения средней оценки, например, на основе трех соседей.

/* Machine learning parameters */

/* The number of nearest neighbors which will be chosen for ML-operations */
int aqo_k = 3;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Должно быть задано значение по-умолчанию, которое совпадает с умолчальным в точке объявления GUC'a - иначе тесты мастера не пройдет.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да, значение по умолчанию берется равным 3.

@danolivo danolivo mentioned this pull request Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants