본문 바로가기

전체 글218

chat GPT 활용 MYSQL 소수점 계산 물어보기 코딩테스트를 보다보니 Floor 함수가 가끔 출제되는듯하다!! ceil floor round 반올림 truncate 소수점 지정자리수까지 잘라내어 반환, round 처럼 반환하지 않음 2023. 8. 13.
[프로그래머스sql고득점kit-level4]코딩테스트 연습JOIN5월 식품들의 총매출 조회하기 https://school.programmers.co.kr/learn/courses/30/lessons/131117 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 역시 오랜만에 푸니 date_format 구분 까먹었다!! 다시 복습!!!! 문제 FOOD_PRODUCT와 FOOD_ORDER 테이블에서 생산일자가 2022년 5월인 식품들의 식품 ID, 식품 이름, 총매출을 조회하는 SQL문을 작성해주세요. 이때 결과는 총매출을 기준으로 내림차순 정렬해주시고 총매출이 같다면 식품 ID를 기준으로 오름차순 정렬해주세요. 그래도 맞췄다!!ㅋㅋ -- 코드를 입력하세.. 2023. 8. 13.
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.
[chat GPT]코호트분석 mysql(월별/주별, 6개월기간) 1. 월별과 주별 코호트 분석 및 리텐션율을 모두 구하는 MySQL 쿼리를 아래에 제시합니다. 먼저, 월별 코호트 분석과 리텐션율을 구하는 쿼리입니다: SELECT DATE_FORMAT(join_date, '%Y-%m') AS Cohort, COUNT(DISTINCT user_id) AS CohortSize, COUNT(DISTINCT CASE WHEN DATE_FORMAT(activity_date, '%Y-%m') = DATE_FORMAT(join_date, '%Y-%m') THEN user_id END) AS Month1, COUNT(DISTINCT CASE WHEN PERIOD_DIFF(DATE_FORMAT(activity_date, '%Y%m'), DATE_FORMAT(join_date, '%Y%.. 2023. 7. 30.
[JOIN-LEVEL4]코딩테스트 연습JOIN그룹별 조건에 맞는 식당 목록 출력하기 https://school.programmers.co.kr/learn/courses/30/parts/17046 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 3개월만에 다시 푸니 너무 어려웠다!!! join과 where 절을 같이 활용하는 문제는 항상 헷갈린다. * 이슈사항 1. where 절에 in을 쓸때는 써브쿼리문에 limit 문이 먹히지 않는다!! syntax 오류남 그리고 where 절에 특정 컬럼이 있는지 in 을 쓸때는 서브쿼리에 반드시 그 컬럼을 포함한 여러 컬럼이 있어도 된다 ㅋ 즉 where member_id in (select memb.. 2023. 7. 30.