{"resolved":true,"match_type":"uuid","source_type":"original_book","book_id":"cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","title":"人工智能与大数据技术导论","author":null,"edition":null,"publisher":null,"year":null,"isbn":"9787302517986","requested_by":"printed_page","book":{"source_type":"original_book","book_id":"cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","id":"cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","uuid":"cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","title":"人工智能与大数据技术导论","normalized_title":"人工智能与大数据技术导论","author":null,"edition":null,"publisher":null,"year":null,"isbn":"9787302517986","isbns":["9787302517986"],"parsed":true,"ai_readable":true,"document_type":"book","page_count":490,"navigation_url":"https://workshop.closeclaw.top/ai/book/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","title_url":"https://workshop.closeclaw.top/ai/title/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E4%B8%8E%E5%A4%A7%E6%95%B0%E6%8D%AE%E6%8A%80%E6%9C%AF%E5%AF%BC%E8%AE%BA","fixed_page_url_template":"https://workshop.closeclaw.top/ai/book/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71/page/{printed_page}","path_api_url_template":"https://workshop.closeclaw.top/api/ai/book/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71/page/{printed_page}","read_url":"https://workshop.closeclaw.top/api/ai/read/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71","page_url":"https://workshop.closeclaw.top/api/ai/books/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71/page","search_url":"https://workshop.closeclaw.top/api/ai/books/cd4f7678-cd9b-4971-bde0-e9ad46a6cc71/search"},"page":{"printed_page":293,"pdf_page":309,"physical_index":309,"physical_index_base":0,"printed_page_status":"recognized","page_sha256":"734e6bfabf09aa4a61814f53298fe5f7c1b723bdec2e26d1be9b8277d974beb1"},"chapter":"第9章","content":"$$\nL o g L o s s = \\sum _ { ( x , y ) \\in D } - y \\cdot l o g ( y _ { p r e d } ) - ( 1 - y ) \\cdot l o g ( 1 - y _ { p r e d } )\n$$\n\n下面我们使用LinearRegressor.predict来获得预测值，然后使用这个值和标签值来计算LogLoss。其代码如下：\n\n结果如图9-30所示。\n\n下面使用逻辑回归。我们将LinearRegressor替换为LinearClassifier。当在LinearClassifier模型上运行train()和predict()时，predictions[\"probabilities\"]的probabilities键是预测的概率值。我们还使用sklearn的log\\_loss函数来计算这些概率的LogLoss，代码如下：\n\n第9章 TensorFlow 高级知识\n\n293","previous_page":292,"next_page":294}