Hoon's Dev Blog
  • 홈
  • 태그
  • 방명록
  • 메뉴 닫기
  • 글작성
  • 방명록
  • 환경설정
    • 분류 전체보기 (103)
      • Python (44)
      • 일상 (0)
      • MYSQL (10)
      • 프로젝트 (4)
      • DeepLearning (20)
      • OpenCV (25)
  • 홈
  • 태그
  • 방명록
Python

Python - Regression 회귀 분석

회귀분석이란? 독립변수 X의 분포를 분석한 후, 종속변수 Y의 값을 예측하는 것입니다. 다양하게 분포된 X가 존재할 때, Y의 분포를 알아내는 것 즉, X = [ 1,2,3,4,5] 일 경우, Y의 나이 예측 한다고 하면 Y['year'] = X_predict 평균 함수 : 관심의 대상이 되는 모집단의 대표값을 말한다. -> E(Y|X=x) 식에서 기대값은 X 값이 ‘이미 정해졌을때’라는 조건부 기대값으로 볼 수 있다. (회귀 분석에선, 독립변수가 있어야 종속변수 Y값을 예측할 수 있다) 이를 수식으로 본다면, -> E(Y|X=x)=β0+β1x β0은 절편이되고 β1x는 기울기 β0β1은 *모수이며, 우리가 추정해야할 값이다 . *모수 : 모집단 분포 특성을 규정 짓는 척도. 관심의 대상이 되는 모집단의..

2022. 10. 24. 17:50
Python

Python - 다중공선성 , 차원축소 , 군집

import lightgbm import xgboost as xgb from xgboost import XGBClassifier import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns import xgboost as xgb from sklearn.linear_model import LogisticRegression from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.tree import DecisionTreeClassifi..

2022. 10. 24. 09:32
프로젝트

Prophet 주식 예측-4 - 텔레그램 봇

import yfinance as yf import time import pandas as pd import matplotlib.pyplot as plt from fbprophet import Prophet from datetime import datetime,timedelta import telegram telgm_token = '텔레그램 토큰' bot = telegram.Bot(token = telgm_token) #오늘 날짜 -365일 부터 데이터 가져오기 starttime = datetime.now() - timedelta(days=365) endtime =datetime.now() #주식 코드 input문 이용 하기 stockcode = input('한국주식 코드를 입력해주세요') stockin..

2022. 10. 23. 16:05
프로젝트

Python - Prophet 주식 예측- 3 하이퍼 파라미터 튜닝

파라미터 튜닝을 할때에 값을 여러 옵션을 먼저 지정하지 않고, 최소한의 옵션으로 코드가 잘 수행 되는지 확인 을 한후, 옵션을 추가해서 파라미터튜닝을 하는게 좋다. '''파라미터 튜닝 해보자구 ! ''' #귀찮으니까 싹다 임포트 import xgboost as xgb from xgboost import XGBClassifier import pandas as pd import numpy as np import matplotlib.pyplot as plt from fbprophet.diagnostics import cross_validation from fbprophet.diagnostics import performance_metrics from fbprophet.plot import plot_cross_..

2022. 10. 22. 09:35
Python

Python - 모델 Stacking

개별모델의 predict을 뽑은후 , 최종모델에 학습 하는 방식이다. Kfold같은걸 사용하지 않을 경우 과적합 문제 때문에 잘 이용하진 않는다. '''머신러닝 STACKING 1. 개별 모델 설정 ''' logistic_regression = LogisticRegression() voting_model = VotingClassifier(estimators=[('LogisticRegression', logistic_regression)]) voting_model.fit(X,y) voting_pred = voting_model.predict(df_kg) rd_clf = RandomForestClassifier(criterion= 'gini', max_depth= 9, min_samples_split= 5,..

2022. 10. 22. 08:51
프로젝트

Python - Prophet 주가예측 -2 그래프 검증

import yfinance as yf import pandas as pd import matplotlib.pyplot as plt from fbprophet import Prophet from datetime import datetime,timedelta from sklearn.metrics import mean_squared_error, mean_absolute_percentage_error #오늘 날짜 -200일 부터 데이터 가져오기 starttime = datetime.now() - timedelta(days=365) endtime =datetime.now() #주식 코드 input문 이용 하기 stockcode = input('한국주식 코드를 입력해주세요') stockinfo = yf.downl..

2022. 10. 21. 10:24
  • «
  • 1
  • ···
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • ···
  • 18
  • »

공지사항

전체 카테고리

  • 분류 전체보기 (103)
    • Python (44)
    • 일상 (0)
    • MYSQL (10)
    • 프로젝트 (4)
    • DeepLearning (20)
    • OpenCV (25)
애드센스 광고 영역
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

태그

  • #삼성전자
  • #while#무한루프#파이썬#반복문
  • #하이퍼파라미터
  • #주가예측
  • #python
  • #타이타닉
  • #mysql8.0
  • #주식예측
  • #한국주식
  • #파이썬
  • #활성화함수
  • #GridSearch
  • #mysql
  • #하이퍼파라미터튜닝
  • #레이어
  • #삼성주가예측
  • #모델검증
  • #PROPHET
  • #랜덤포레스트
  • #야후파이낸스api
  • #문자열 포맷
MORE

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote Copyright © Hoon's Dev Blog All rights reserved. TistoryWhaleSkin3.4

티스토리툴바