📣 黑五价提前开抢|VIP一年通行证5折,蓝莓、Offer多多同步特惠
查看: 1928| 回复: 1
跳转到指定楼层
上一主题 下一主题
收起左侧

转一个对ds的写码建议

全局:

注册一亩三分地论坛,查看更多干货!

您需要 登录 才可以下载或查看附件。没有帐号?注册账号

x
kaggle最近的一个Kernal,总结的还不错,大家学习的时候可以参考一下:

Six steps to more professional data science code
. .и

详情在上面的链接里,不想点的下面是前面的总结介绍:. 1point 3acres
The single best thing you can do to make your code more professional is to make it reusable.. From 1point 3acres bbs

What does “reusable” mean? At some point in your data science career, you’re going to write code that will be used more than just once or twice. Maybe you’re running the same preprocessing pipeline on some different sets of image files, or you’ve got a suite of evaluation techniques that you use to compare models. We’ve all copied and pasted the same code, but once you find yourself copying the same code more than once or twice, it’s time to sink some time into making your code reusable. Reusing well-written code isn’t cheating or slacking: it’s an efficient use of your time and it’s considered a best practice in software engineering.. Waral dи,

There are six central principles that I think 1) make it easy for you or your colleagues to reuse your code, 2) make your code look really polished and professional and, above all, 3) save you time.

📦 Modular: Code is broken into small, independent parts (like functions) that each do one thing. Code you’re reusing lives in a single central place.
✔️ Correct: Your code does what you say/think it does..
📖 Readable: It’s easy to read the code and understand what it does. Variable names are informative and code has up-to-date comments and docstrings.. .и
💅 Stylish: Code follows a single, consistent style (e.g. the Tidyverse style guide for R, PEP 8 for Python code)
🛠️ Versatile: Solves a problem that will happen more than once and anticipates variation in the data.
💡 Creative: Solves a problem that hasn’t already been solved or is a clear improvement over an existing solution.
Let’s go through each of these steps in a bit more detail.with a bit of sample code and see how they work in practice.

评分

参与人数 2大米 +3 收起 理由
perkup + 1 很有用的信息!
YilunNWLV + 2 给你点个赞!

查看全部评分


上一篇:DS专业想现在刷题转码,请各位大神指点一下
下一篇:Data Science美国找工作,有一年国内工作经验是否会有用?

本帖被以下淘专辑推荐:

  • · DS|主题: 224, 订阅: 39
🔗
zsr 2019-10-18 03:58:31 | 只看该作者
全局:
嗯,总结的不错!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册账号
隐私提醒:
  • ☑ 禁止发布广告,拉群,贴个人联系方式:找人请去🔗同学同事飞友,拉群请去🔗拉群结伴,广告请去🔗跳蚤市场,和 🔗租房广告|找室友
  • ☑ 论坛内容在发帖 30 分钟内可以编辑,过后则不能删帖。为防止被骚扰甚至人肉,不要公开留微信等联系方式,如有需求请以论坛私信方式发送。
  • ☑ 干货版块可免费使用 🔗超级匿名:面经(美国面经、中国面经、数科面经、PM面经),抖包袱(美国、中国)和录取汇报、定位选校版
  • ☑ 查阅全站 🔗各种匿名方法

本版积分规则

>
快速回复 返回顶部 返回列表