<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>PyPI on Chang Luo</title>
		<link>https://www.luochang.ink/tags/pypi/</link>
		<description>Recent content in PyPI on Chang Luo</description>
		<generator>Hugo</generator>
		<language>zh-CN</language>
		
		
		
		
			<lastBuildDate>Sat, 25 May 2024 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://www.luochang.ink/tags/pypi/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>深度学习工具箱 FlameAI</title>
				<link>https://www.luochang.ink/posts/flameai/</link>
				<pubDate>Sat, 25 May 2024 00:00:00 +0000</pubDate>
				<guid>https://www.luochang.ink/posts/flameai/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;在上一篇博客&lt;a href=&#34;https://www.luochang.ink/posts/lightgbm_practice/&#34; target=&#34;_blank&#34;&gt;《LightGBM 工程实践》&lt;/a&gt;中，我把通用函数写到 &lt;a href=&#34;https://github.com/luochang212/lightgbm-binary/blob/main/util.py&#34; target=&#34;_blank&#34;&gt;util.py&lt;/a&gt; 文件，以实现代码复用。但是这么复用好麻烦，每次开新项目，得把 util.py 文件贴过去才行。为了省下这个贴的动作，我把它写成 Python 包了。现在下载一次，就可以到处使用啦！&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;GitHub 项目地址：&lt;a href=&#34;https://github.com/luochang212/flameai&#34; target=&#34;_blank&#34;&gt;flameai&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;一简单介绍&#34;&gt;一、简单介绍&lt;/h3&gt;&#xA;&lt;p&gt;我的这个包叫 &lt;a href=&#34;https://pypi.org/project/flameai&#34; target=&#34;_blank&#34;&gt;FlameAI&lt;/a&gt;。作为一个深度学习工具包，它的主要功能是 &lt;strong&gt;数据预处理&lt;/strong&gt; 和 &lt;strong&gt;模型评估&lt;/strong&gt;。FlameAI 旨在解决最后一公里问题。即在框架之外，业务代码之内，寻求最佳实践。为了让我的包看起来上流一点，我让 Kimi 帮我想了几个名字，最后还是选择了 FlameAI，因为这个名字最霸气。&lt;/p&gt;&#xA;&lt;p&gt;执行以下命令安装 FlameAI：&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pip install flameai&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;如果嫌安装速度慢，可以使用腾讯源或阿里源：&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# 腾讯源&#xA;pip install flameai -i https://mirrors.cloud.tencent.com/pypi/simple/&#xA;&#xA;# 阿里源&#xA;pip install flameai -i https://mirrors.aliyun.com/pypi/simple/&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;如果发现 pip 缓存目录占用了太多磁盘空间，可执行以下命令（通常不需要清理）&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# 清理 pip 缓存文件&#xA;pip cache purge&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;二模块功能介绍&#34;&gt;二、模块功能介绍&lt;/h3&gt;&#xA;&lt;h4 id=&#34;21-二分类模型评估&#34;&gt;2.1 二分类模型评估&lt;/h4&gt;&#xA;&lt;p&gt;二分类模型评估是咱们的拳头产品。只需一行命令，就可以计算下面全部指标：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;accuracy&lt;/code&gt;: 准确率&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;precision&lt;/code&gt;: 精确率&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;recall&lt;/code&gt;: 召回率&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;f1_score&lt;/code&gt;: 精确率和召回率的调和平均数&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;auc&lt;/code&gt;: ROC曲线下的面积&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;cross-entropy loss&lt;/code&gt;: 交叉熵损失&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;True Positive (TP)&lt;/code&gt;: 真阳&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;True Negative (TN)&lt;/code&gt;: 真阴&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;False Positive (FP)&lt;/code&gt;: 假阳&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;False Negative (FN)&lt;/code&gt;: 假阴&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;confusion matrix&lt;/code&gt;: 混淆矩阵&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h5 id=&#34;1简单用法&#34;&gt;1）简单用法&lt;/h5&gt;&#xA;&lt;p&gt;你可以直接指定阈值，下面代码中指定阈值为 &lt;code&gt;0.5&lt;/code&gt;。&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
