ãã¹ãçµæãã¤ãã¤ãæ¸ãã¦ãã¨é·ããªããããªã®ã§è¨äºãåããï¼ æ
å ±éã«idfå¤ãç¨ãã¦ãã£ã¦ã¿ãï¼ åèªAãåºããåèªBãåºãã£ã¦ãã確çã¯ååã§è¡ã£ã¦ããã®ã§ï¼ åæ¯ã¯idfã£ã¦ãã¼ï¼å¯¾æ¥µçéã¿ä»ãã®ã¹ã³ã¢ã使ã£ã¦ã¿ãï¼ ç¸äºæ
å ±é = log( (å
¨ææ¸ã«åºç¾ããåèªã®ç·æ° * åèªAã¨åèªBã®å
±èµ·é »åº¦) / (åèªAã®idfå¤ * åèªBã®idfå¤) ) çºè¡ããSQLã¯ä»¥ä¸ã®éãï¼ select t1.id, t1.name, t2.id, t2.name, log( -- T1 ( -- èªã®ç·æ° (select count(id) from terms as t_cnt) * -- Aã¨Bã®å
±èµ·åæ° ( select count(term_id) as co_cnt from document_terms a join terms b on a.term_id = b.id
{{#tags}}- {{label}}
{{/tags}}