模型越复杂越容易惰性_ML模型的惰性预测

模型越复杂越容易惰性Hey, hope you are having a wonderful day! 嘿,希望您今天过得愉快! Whenever I work on a new ML project. These lines always pop up in my mind every time 每当我从事新的ML项目时。 这些线每次都会在我的脑海中弹出 “I need to fit the...
摘要由CSDN通过智能技术生成

模型越复杂越容易惰性

Hey, hope you are having a wonderful day!

嘿,希望您今天过得愉快!

Whenever I work on a new ML project. These lines always pop up in my mind every time

每当我从事新的ML项目时。 这些线每次都会在我的脑海中弹出

“I need to fit the data for every model then apply metrics to check which model has better accuracy for the available dataset ,then choose best model and also this process is time-consuming and even it might not be that much effective too“

“我需要为每个模型拟合数据,然后应用度量标准来检查哪个模型对可用数据集具有更好的准确性,然后选择最佳模型,而且此过程非常耗时,甚至可能效果也不那么好”

For this problem, I got a simple solution when surfing through python org, which is a small python library by name “lazypredict” and it does wonders

对于这个问题,我在通过python org进行浏览时得到了一个简单的解决方案,这是一个名为“ lazypredict”的小型python库,它的确令人惊讶

Let me tell you how it works:-

让我告诉你它是如何工作的:

安装库 (Install the library)

pip install lazypredict

注意 (Note)

  1. lazypredict only works for python version≥3.6

    lazypredict仅适用于Python版本≥3.6
  2. It's built on top of various other libraries so if you don't have those libraries in the system, python will throw ModuleError so interpret the error properly and install the required libraries.

    它建立在其他各种库的基础上,因此,如果系统中没有这些库,则python会抛出ModuleError,从而正确解释错误并安装所需的库。

lazypredict comes only for supervised learning (Classification and Regression)

lazypredict仅用于监督学习(分类和回归)

I will be using jupyter notebook in this article

我将在本文中使用Jupyter Notebook

(Code)

# import necessary modules
import warnings
warnings.filterwarnings('ignore')
import time
from sklearn.datasets import load_iris,fetch_california_housing
from sklearn.model_selection import train_test_split
from lazypredict.Supervised import LazyClassifier,LazyRegressor
  • warnings: Package to handle warnings and ‘ignore’ is used when we need to filter out all the warnings

    警告:处理警告和“忽略”的包在我们需要过滤掉所有警告时使用
  • time: Package to handle time manipulation

    time:处理时间的软件包
  • sklearn.datasets: Package to load datasets, today we gonna use the classic datasets which everyone works on it that are load_iris() for classification problem and fetch_california_housing() for a regression problem
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值