我想获得每个输出的每个类别的预测概率。
但是MultiOutputClassifier上没有<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js">
</script>
<script type="text/javascript">
google.charts.load('current', {
packages: ['corechart', 'scatter']
});
</script>
<div id="chart_div" ></div>
属性。
如何将类与输出关联?
<?php
global $woocommerce;
$items = $woocommerce->cart->get_cart();
foreach($items as $item => $values) {
$product =wc_get_product( $values['data']->get_id());
echo "<b>".$product->get_title().'</b><br> Quantità: '.$values['quantity'].'<br>';
$price = get_post_meta($values['product_id'] , '_price', true);
echo "Prezzo: ".$price."<br>";
$carrello = $values['quantity'] * $price;
echo "Totale: ".$carrello."<br>";
// Below the new data with tax and discount calculation:
$percent = ($tax_amount / $without_tax) * 100;
if ($percent == "10")
$tax_rate = 10;
else $tax_rate= 4;
$with_tax = $scontato;
$totaleforsebene = ($scontato * $percent)/100;
$totalForSebeneArray[$values['data']->get_id()] = $totaleforsebene; // add the value by the item ID
$totaleforsebene = number_format($totaleforsebene, 2, '.', '')." €";
}
?>
<th>Iva<br />Totale chiusura</th>
<td>
<?php
$totaleiva_1 = 0;
$items = $woocommerce->cart->get_cart();
foreach($items as $item ) {
$totaleiva_1 += $totalForSebeneArray[$item ['data']->get_id()];
}
$totaleiva_1 = number_format($totaleiva_1, 2, '.', '');
echo "€"; echo $totaleiva_1;
echo "<br>";
$totalefinitocarrello = $totaleiva_1 + $total;
echo "€"; echo $totalefinitocarrello;
?></td></tr>
<?php endif; ?>
AttributeError:“ MultiOutputClassifier”对象没有属性“ classes _”
答案 0 :(得分:1)
使用estimators_
的{{1}}属性访问估算器属性。
尝试一下!
MultiOutputClassifier