COSINE_SIMILARITY (Lakehouse v2)
Devolve a semelhança de cosseno entre duas matrizes (vetores).
Sintaxe de Analyze
Seção intitulada “Sintaxe de Analyze”func.cosine_similarity(<array1>, <array2>)Exemplos de Analyze
Seção intitulada “Exemplos de Analyze”func.cosine_similarity([1.0, 2.0], [2.0, 4.0])
┌─────┐│ 1.0 │└─────┘Sintaxe SQL
Seção intitulada “Sintaxe SQL”COSINE_SIMILARITY(<array1>, <array2>)Exemplos SQL
Seção intitulada “Exemplos SQL”SELECT COSINE_SIMILARITY([1.0, 2.0], [2.0, 4.0]);
┌─────┐│ 1.0 │└─────┘