clickstream_entropy.php

来自「使用php开发的一个“熵”的计算程序」· PHP 代码 · 共 16 行

PHP
16
字号
<?php /*** Measures the entropy for a few hypothetical values from a page_id column * of a typical Webstats table.  Uses the following abbreviations: h=HomePage, * n=NewsPage, p=ProductsPage, s=ServicesPage, a=AboutPage.*/ require_once "../Entropy.php"; $tokens = array("h","n","p","s","h","n","h","a","h","p","h","s","h","n","p");                 $e = new Entropy($tokens); ?><pre><?php print_r($e) ?></pre><p>The Entropy of the source measured in bits is: <?php echo $e->bits ?> </p>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?