Anaxagor / applyBN

4 stars 0 forks source link

Продумывание кейсов для модуля отбора и генерации признаков #5

Open Anaxagor opened 3 months ago

Anaxagor commented 3 months ago

Продумать конкретные практические кейсы и варианты использования модуля отбора и генерации признаков на основе БС.

Rubin-Ivan commented 2 months ago

Отбор признаков с помощью БС

Причины:

Возможности:

Отбор признаков по causal effect

image image image

Пример отбора признаков с помощью марковского окружения

photo1718641451

Ограничения

Размерность датасета

Эксперименты

bnlearn


    def independence_test(model, df, test="chi_square", alpha=0.05, prune=False, verbose=3):
    Compute edge strength using test statistic.

    Description
    -----------
    Compute the edge strength using a statistical test of independence based using the model structure (DAG) and the data.
    For the pairs in the DAG (either by structure learning or user-defined), an statistical test is performed.
    Any two variables are associated if the test's p-value < significance_level.

    Parameters
    ----------
    model: Instance of bnlearn.structure_learning.
        The (learned) model which needs to be tested.
    df: pandas.DataFrame instance
        The dataset against which to test the model structure.
    test: str or function
        The statistical test to compute associations.
            * chi_square
            * g_sq
            * log_likelihood
            * freeman_tuckey
            * modified_log_likelihood
            * neyman
            * cressie_read
    alpha: float
        A value between 0 and 1. If p_value < significance_level, the variables are
        considered uncorrelated.
    prune: bool (default: False)
        True: Keep only edges that are significant (<=alpha) based on the independence test.

    Returns
    -------
    df: pandas.DataFrame instance
        The dataset against which to test the model structure.
Rubin-Ivan commented 2 months ago

Генерация признаков с помощью БС

feature engineering / feature construction / feature extraction / feature generation

создание нового признака из 1 или неск. объектов

Причины

Возможности

image