본문 바로가기

「python초짜에서 중급으로!26

ensemble 모델 (xgboost/ lightgbm) 설명이 꽤 초보자에게 괜찮게 되있어서 포스팅!! https://lsjsj92.tistory.com/547 머신러닝 앙상블(ensemble) xgboost란? - Python 예제와 함께 살펴보기머신러닝에서는 앙상블(ensemble) 모델을 빼놓을 수가 없습니다. 이 앙상블에는 배깅(bagging)과 부스팅(boosting) 그리고 보팅(voting) 방법이 있습니다. 크게 보면 말이죠 이 중 ensemble bagging에 대해서는 lsjsj92.tistory.comhttps://lsjsj92.tistory.com/548 머신러닝 ensemble lightgbm 알고리즘이란? - python 예제와 함께 살펴보자지난 포스팅까지 머신러닝 앙상블에 대해서 계속 올리고 있습니다. 머신러닝 앙상블(machine.. 2023. 8. 10.
자동차보험 가입여부 예측분류하기(KAGGLE사례) 데이터 설명 : 자동차 보험 가입 예측 (종속변수 Response: 1 : 가입 , 0 :미가입) x_train: https://raw.githubusercontent.com/Datamanim/datarepo/main/insurance/x_train.csv y_train: https://raw.githubusercontent.com/Datamanim/datarepo/main/insurance/y_train.csv x_test: https://raw.githubusercontent.com/Datamanim/datarepo/main/insurance/x_test.csv x_label(평가용) : https://raw.githubusercontent.com/Datamanim/datarepo/main/insur.. 2023. 8. 10.
건강검진데이터를 활용해서 흡연여부 분류하기 import pandas as pd #데이터 로드 x_train = pd.read_csv("https://raw.githubusercontent.com/Datamanim/datarepo/main/smoke/x_train.csv") y_train = pd.read_csv("https://raw.githubusercontent.com/Datamanim/datarepo/main/smoke/y_train.csv") x_test= pd.read_csv("https://raw.githubusercontent.com/Datamanim/datarepo/main/smoke/x_test.csv") display(x_train.head()) display(y_train.head()) # print(x_train.info().. 2023. 8. 10.
의료비 예측 모델 kaggle 사례(Insurance prediction using Regression) https://www.kaggle.com/code/sadafpj/insurance-prediction-using-regression-regulation Insurance prediction using Regression | Regulation Explore and run machine learning code with Kaggle Notebooks | Using data from Medical Cost Personal Datasets www.kaggle.com #regression models from sklearn.linear_model import LinearRegression, Ridge from sklearn.linear_model import RidgeCV, LassoCV, ElasticNetC.. 2023. 8. 10.
pandas exercise 추천 https://github.com/guipsamora/pandas_exercises/tree/master 2023. 8. 10.
statsmodels api https://www.statsmodels.org/stable/api.html#statsmodels-api API Reference - statsmodels 0.14.0 API Reference The main statsmodels API is split into models: statsmodels.api: Cross-sectional models and methods. Canonically imported using import statsmodels.api as sm. statsmodels.tsa.api: Time-series models and methods. Canonically imported using impor www.statsmodels.org 2023. 8. 10.
seaborn 산점도 그리기(KAIST 인공지능 이규민교수님 강의) 1. 기본 포맷 s=100 점의 크기 alpha =0.5 투명도 sns.replot(x='cases', y='deaths' , data=df, kind='scatter', s=100, alpha=0.5) 2. 범례표기 옵션 hue 로 그룹별 다른색깔 표기 추가 3. 버블 플랏 : 제 3의 정보를 원의 크기 size 로 설정해줄수 있다. 앞의 예시는 s=100 상수로 정의 범례그룹의 색깔과 제3의 정보까지 원의 크기로 표현할 수 있다!! seaborn의 산점도 활용법을 기억하자!! 4. 특정 그룹별로 SUBPLOT을 그리고 싶을때 COL 옵션 단일변수 : BOXPLOT, HISTOGRAM 두 연속형 변수의 관계 : SCATTER PLOT , CORR 2023. 8. 8.
Boosting vs. Bagging(Boostrap Aggregating) https://youtu.be/GM3CDQfQ4sw https://youtu.be/2Mg8QD0F1dQ 2023. 8. 8.
고려대학교 강필성 교수님(XGBoost/Light GBM/CatBoost) https://www.youtube.com/watch?v=VHky3d_qZ_E&list=PLetSlH8YjIfWMdw9AuLR5ybkVvGcoG2EW&index=27 https://www.youtube.com/watch?v=4C8SUZJPlMY&t=26s https://www.youtube.com/watch?v=2Yi_Jse_7JQ 2023. 8. 8.
SCIKIT LEARN CRASH COURSE https://www.youtube.com/watch?v=0B5eIE_1vpU 2023. 8. 8.
Solving real world data science tasks with Python Pandas! https://www.youtube.com/watch?v=eMOA1pPVUc4 언제 하루 날 잡아 이것 한번 슬쩍 봐야겠다!!! 얼핏 보니 실전 문제로 판다스 기능 배우는게 재밌어보인다. 2023. 8. 8.
머신러닝모델 구축방법 및 프로세스 https://www.kdnuggets.com/2020/11/build-data-science-project.html Learn to build an end to end data science project - KDnuggets Appreciating the process you must work through for any Data Science project is valuable before you land your first job in this field. With a well-honed strategy, such as the one outlined in this example project, you will remain productive and consistently www.kdnuggets... 2023. 8. 8.
Best Python Libraries For: Machine Learning Best Python Libraries For: Machine Learning 6. Scikit-Learn Stars: 42500, Commits: 26162, Contributors: 1881 Scikit-learn is a Python module for machine learning built on top of SciPy and is distributed under the 3-Clause BSD license. 7. XGBoost Stars: 19900, Commits: 5015, Contributors: 461 Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library, for Python, R, Java, Sc.. 2023. 8. 8.
파이썬 4시간 FREECODECAMP https://www.youtube.com/watch?v=r-uOLxNrNk8 https://www.kdnuggets.com/2022/06/7-steps-mastering-python-data-science.html 7 Steps to Mastering Python for Data Science - KDnuggets Here’s how you can learn to code in Python from scratch in 7 easy steps. www.kdnuggets.com 2023. 8. 8.
X,Y 산점도 그리기(KAIST 이규민 교수님 인공지능 강의week8 lecture part3) X,Y 두 변수의 상관관계를 확인하기 위한 산점도 그리기 plt.scatter(x,y) x,y 두변수의 산점도 + 두 변수의 교차점에 해당하는 지표를 원의 크기로 나타내기 예를 들면 코로나 확진자(x) ,사망자(y) 와 해당 국가의 인구수(z) 를 같이 나타내고 싶을떄 또는 가맹점별 쿠폰발행수, 사용자수의 관계를 나타내고 가맹점의 매출액크기를 같이 나타내고 싶을떄!! 이럴때 파이썬 산점도가 유용함 결과값 pdf 파일로 저장후 내보내기 2023. 8. 8.
7 Steps to Mastering Data Cleaning and Preprocessing Techniques https://www.kdnuggets.com/2023/08/7-steps-mastering-data-cleaning-preprocessing-techniques.html 7 Steps to Mastering Data Cleaning and Preprocessing Techniques - KDnuggets Are you trying to solve your first data science project? This tutorial will help you to guide you step by step to prepare your dataset before applying the machine learning model. www.kdnuggets.com 2023. 8. 8.
[DAY2_KAIST 이규민교수님 강의] pandas dataframe ① 1. 기본 datafram 구조 파악하는 방법 헷갈리지 말자!!!!! -shape, info() 차이있음 df.shape df.columns df.values df.dtypes df.info() df.describe() df.head() df.tail() 2. iloc : 순서 기반 출력, 실제 행index가 220이더라도 첫번째 순서면 0으로 봄 loc : 실제 데이터 기반 index 출력 df_covid.loc[[0, 1],['Name', 'Cases - cumulative total']] # loc는 실제 데이터의 좌표를 찍는다!!! loc[ [행] ,[열] ] 3. subset 출력하기 df[ ] df_covid['Name'] #name 컬럼만 뽑아내기, subset 여러개 컬럼을 포함한 subs.. 2023. 2. 7.
[DAY1] 쥬피터 노트북 환경설정 파이썬 20일 프로젝트는 아래 글에 썼다. https://vividmango.tistory.com/manage/newpost/181?type=post&returnURL=https%3A%2F%2Fvividmango.tistory.com%2F181 https://vividmango.tistory.com/manage/newpost/181?returnURL=https%3A%2F%2Fvividmango.tistory.com%2F181&type=post vividmango.tistory.com 1. 토글 라인 기능 - VIEW>Toggle Line Numbers 하면 각 셀당 number가 매겨져서 편리하다. 2023. 2. 1.
[DAY1] 쥬피터 노트북 환경설정 파이썬 20일 프로젝트는 아래 글에 썼다. https://vividmango.tistory.com/manage/newpost/181?type=post&returnURL=https%3A%2F%2Fvividmango.tistory.com%2F181 https://vividmango.tistory.com/manage/newpost/181?returnURL=https%3A%2F%2Fvividmango.tistory.com%2F181&type=post vividmango.tistory.com 1. 토글 라인 기능 - VIEW>Toggle Line Numbers 하면 각 셀당 number가 매겨져서 편리하다. 2023. 2. 1.
07. dataframe에서 특정 columns 선택하기 rfriend.tistory.com/282 [Python pandas] Series, DataFrame 행, 열 생성(creation), 선택(selection, slicing, indexing), 삭제(drop, delete) 이번 포스팅에서는 Python pandas 의 Series, DataFrame의 행(row)과 열(column)에 대해서 - 생성 (creation) - 선택 (selection, slicing and indexing) - 삭제 (drop, delete) 하는 방법에 대해서 알아보.. rfriend.tistory.com 역시나 헷갈리기 쉬운 내용을 너무나 쉽게 설명해주시는 위 티스토리를 참고했다!!! 다시 한번 감사드립니다.^^ DataFrame에서 칼럼 이름을 지정해서 선별하는.. 2021. 1. 31.