Wine Quality classification
A Simple Example of Scikit-learn Pipeline
Inspired by https://towardsdatascience.com/a-simple-example-of-pipeline-in-machine-learning-with-scikit-learn-e726ffbb6976 by Saptashwa Bhattacharyya
How to use
from huggingface_hub import hf_hub_url, cached_download<br /> import joblib<br /> import pandas as pd<br /> REPO_ID = "julien-c/wine-quality"<br /> FILENAME = "sklearn_model.joblib"<br /> model = joblib.load(cached_download(<br /> hf_hub_url(REPO_ID, FILENAME)<br /> ))<br /> # model is a `sklearn.pipeline.Pipeline`<br />
Get sample data from this repo
data_file = cached_download(<br /> hf_hub_url(REPO_ID, "winequality-red.csv")<br /> )<br /> winedf = pd.read_csv(data_file, sep=";")<br /> X = winedf.drop(["quality"], axis=1)<br /> Y = winedf["quality"]<br /> print(X[:3])<br />
fixed acidity | volatile acidity | citric acid | residual sugar | chlorides | free sulfur dioxide | total sulfur dioxide | density | pH | sulphates | alcohol | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 7.4 | 0.7 | 0 | 1.9 | 0.076 | 11 | 34 | 0.9978 | 3.51 | 0.56 | 9.4 |
1 | 7.8 | 0.88 | 0 | 2.6 | 0.098 | 25 | 67 | 0.9968 | 3.2 | 0.68 | 9.8 |
2 | 7.8 | 0.76 | 0.04 | 2.3 | 0.092 | 15 | 54 | 0.997 | 3.26 | 0.65 | 9.8 |
收录说明:
1、本网页并非 vvmnnnkv/wine-quality 官网网址页面,此页面内容编录于互联网,只作展示之用;2、如果有与 vvmnnnkv/wine-quality 相关业务事宜,请访问其网站并获取联系方式;3、本站与 vvmnnnkv/wine-quality 无任何关系,对于 vvmnnnkv/wine-quality 网站中的信息,请用户谨慎辨识其真伪。4、本站收录 vvmnnnkv/wine-quality 时,此站内容访问正常,如遇跳转非法网站,有可能此网站被非法入侵或者已更换新网址,导致旧网址被非法使用,5、如果你是网站站长或者负责人,不想被收录请邮件删除:i-hu#Foxmail.com (#换@)
前往AI网址导航
2、本站所有文章、图片、资源等如果未标明原创,均为收集自互联网公开资源;分享的图片、资源、视频等,出镜模特均为成年女性正常写真内容,版权归原作者所有,仅作为个人学习、研究以及欣赏!如有涉及下载请24小时内删除;
3、如果您发现本站上有侵犯您的权益的作品,请与我们取得联系,我们会及时修改、删除并致以最深的歉意。邮箱: i-hu#(#换@)foxmail.com