본문 바로가기

Study49

[R] R Studio, Github 연동하기 👀 내가 보려고 쓰는 글목차01. R Studio 설정02. Githhub 설정03. R에서 Github로 내보내기 01. R Studio 설정 1. Tools > Global Options 2. Git/SVN > SSH Key [Create SSH Key] 3. 다시 돌아와서 [View public key] 선택하고 key 복사하기 02. Github 설정1. 깃허브 로그인 > 우측상단 프로필 사진 > Settings 2. SSH and GPG keys 메뉴로 이동하고 [New SSH Key] 3. Title 입력하고 Key값 붙여넣기 03. R에서 Github로 내보내기1. repository 만들기 2. HTTPS 복사하기 3.. 2025. 1. 6.
[Python] ChatGPT 앱 Appstore, Google Playstore 리뷰 크롤링(App ID 확인하기) 👀 내가 보려고 쓰는 글목차01. Appstore 리뷰 가져오기02. Google Playstore 리뷰 가져오기03. 리뷰 통합 01. Appstore 리뷰 가져오기1. app_store_scraper 설치하기!pip install app_store_scraper 2. 리뷰 크롤링from app_store_scraper import AppStore# 1. AppStore Reviewdef extract_appstore_reviews(app_name: str, app_id: int): app = AppStore(country='us', app_name=app_name, app_id=app_id) # country='kr': 한국 app.review() app_reviews =.. 2024. 12. 19.
[R/Markdown] RStudio 한글 폰트 적용하기(나눔고딕) 👀 내가 보려고 쓰는 글목차01. 폰트 다운받기02. 파일 경로 찾기 01. 폰트 다운받기 1. 폰트 다운받기(네이버 글꼴 모음 : https://hangeul.naver.com/font) 02. 파일 경로 찾기 1. 작업표시줄 검색창에서 C:\Windows\Fonts 경로 입력해서 들어가기 2. 해당 경로에 다운받은 폰트 붙여넣기 + 폰트 설치 확인하기1. 콘솔에서 아래 명령어 실행하기install.packages('extrafont')library(extrafont)fonttable() 2. 폰트 설치된 항목 확인하기 📌 참고. https://funnystatistics.tistory.com/19 [R/R마크다운] R에 폰트 적용시 주의사항 및 에러/원하.. 2024. 10. 2.
[Neo4j] Neo.ClientError.Security.Unauthorized Error 해결하기(Neo4j 비밀번호 바꾸기) 🔥 오류 Visual Studio에서 Neo4j를 연동하려는데 Neo.ClientError.Security.Unauthorized Error라는 오류가 발생했다. 🔎 코드# Neo4j driver settinguri = "bolt://localhost:7687" # Neo4j instance URLusername = "neo4j" # Neo4j account namepassword = "0000" # Neo4j passworddriver = GraphDatabase.driver(uri, auth=(username, password))session = driver.session()# basic returnq = 'MATCH (n) RETURN n'nod.. 2024. 8. 7.
[Neo4j] Cypher Query 기본 문법 및 예제 목차01. 기본 문법02. 예제#1#2#3#4 01. 기본 문법 Basic returnMATCH (n)RETURN n Create a simple node with propertiesCREATE (:NodeName {name: "James Dean", age: 24}) Update return with column namesMATCH (n)RETURN n.name AS Name, n.age AS Age Delete all element in the database(delete all nodes and edges)MATCH (n)DETACH DELETE n 02. 예제 #1 Two nodes and relationship between User id 0 is interested .. 2024. 8. 6.
[Kaggle] 통신사 이탈 고객 예측 #03(Classfication Model) 목차01. Decision Tree02. Logistic Regression03. Random Forest04. Gradient Boosting05. Naive-bayse06. k-NN07. 예측 성능 비교 01. Decision Tree Decision Tree 모델 학습# library settingfrom sklearn.tree import DecisionTreeClassifier, export_graphvizimport graphviz# X와 y 변수 선택X = df_encoded[feature_names]y = df_encoded[target_name]# Splitting the datasetX_train, X_test, y_train, y_test = train_test_split(X,.. 2024. 6. 27.
[Kaggle] 통신사 이탈 고객 예측 #02(EDA, 시각화) 목차01. Summary by class02. Histogram03. Heatmap04. Scatter plot 01. Summary by class 설명변수 및 목표변수 정의(추후 모델링할 때 편하게 사용하려고 정의해 뒀다)target_name = 'target'class_names=['No', 'Yes'] #(0 = no, 1=yes)feature_names=['account_length', 'international_plan', 'voice_mail_plan', 'number_vmail_messages', 'total_day_minutes', 'total_day_cal.. 2024. 6. 27.
[Kaggle] 통신사 이탈 고객 예측 #01(데이터 불러오기, 전처리) 목차01. Introduction02. 데이터 불러오기03. 데이터 전처리 01. Introduction 지도 학습(Machine Learning) 알고리즘을 사용하여 이탈 고객 예측 모델 개발 02. 데이터 불러오기 CSV 파일 읽어오기# library settingimport ioimport openpyxlimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport plotly.express as pxfrom matplotlib.colors import ListedColormapfrom sklearn.preprocessing import LabelEncoderfrom sklea.. 2024. 6. 27.
[Kaggle] 아마존 리뷰 분석 #03(TF-IDF, Topic-Modeling) 목차01. TF-IDF02. Topic Modeling 01. TF-IDF NLTK에서 불용어 다운로드하기# NLTK에서 영어 불용어 로드nltk.download('stopwords')stop_words = set(stopwords.words('english')) TF-IDF값 계산# TF-IDF 모델 초기화tfidf = TfidfVectorizer()# 리뷰 내용을 TF-IDF로 변환tfidf_matrix = tfidf.fit_transform(df['reviewText'])# 단어 리스트와 각 단어의 TF-IDF 값을 가져옴features = tfidf.get_feature_names_out()tfidf_scores = tfidf_matrix.sum(axis=0).A1# TF-IDF 값을 기준.. 2024. 6. 23.
[Kaggle] 아마존 리뷰 분석 #02(EDA, 감정분석) 목차01. 시각화02. 감정 분석03. 워드 클라우드 01. 시각화 리뷰 평점 시각화contraints로 pie chart 색상 구분5.0점대 평점 비율이 79.8%로 가장 높음# 리뷰 평점 확인constraints = ['#4682B4', '#FF6347', '#32CD32', '#FFD700', '#8A2BE2']def categorical_variable_summary(df, column_name): plt.figure(figsize=(10, 5)) # Countplot plt.subplot(1, 2, 1) df[column_name].value_counts().plot(kind='bar', color='skyblue') plt.title('Countplot') .. 2024. 6. 23.
[Kaggle] 아마존 리뷰 분석 #01(데이터 불러오기, 전처리) 목차01. Introduction02. 데이터 불러오기03. 데이터 전처리 01. Introduction 텍스트 마이닝 기법을 활용해서 고객 리뷰를 분석하고 이를 통해 고객이 만족하는 서비스 요인과 불만족하는 서비스 요익을 파악하고자 함 02. 데이터 불러오기 Kaggle에서 제공하는 'amazon reviews' 데이터 불러오기# library setting!pip install chart_studio!pip install TextBlob!pip install plotly!pip install WordCloud!pip install cufflinks!pip install SentimentIntensityAnalyzer!pip install vaderSentiment!pip install .. 2024. 6. 21.
[Kaggle] 회사 평점 예측 #04(예측 모델) 목차01. Data Scaling02. 모델학습 및 시각화03. 결과 해석 01. Data Scaling 데이터셋 분리 후 데이터 스케일링full data set주요 변수만 추출한 data set(설명변수 9개)review 세부요인 중 'Culture(기업문화)', 'Work/Life Balance(워라벨)' data setreview 세부요인 중 'Compensation/Benefits(급여/복지)', 'Job Security/Advancement(고용 안정/승진 기회)' data sethappiness 세부요인 data set# drop unnecessary datadf = df.drop(['description'], axis=1)df = df.drop(['happiness'], axis=1.. 2024. 6. 20.
[Kaggle] 회사 평점 예측 #03(감정 분석) 목차01. 감정 분석02. 시각화 01. 감정 분석 VADER 감정 분석기 사용하여 감정 점수 계산from nltk.sentiment.vader import SentimentIntensityAnalyzerimport nltk# NLTK에서 VADER Lexicon 다운로드nltk.download('vader_lexicon')# VADER 감정 분석기sid = SentimentIntensityAnalyzer()# 감정 점수 계산df_sentiment = df.copy()df_sentiment['sentiment_scores'] = df_sentiment['description'].astype(str).apply(lambda desc: sid.polarity_scores(desc))df_sentim.. 2024. 6. 19.
[Kaggle] 회사 평점 예측 #02(EDA) 목차01. Heatmap02. Bar Chart03. Scatter 01. Heatmap 설명변수 간 상관관계 확인1에 가까울수록 양의 상관관계-1에 가까울수록 음의 상관관계plt.figure()sns.heatmap(df[['rating', 'ceo_approval', 'employees', 'revenue', 'Management', 'Compensation/Benefits', 'Job Security/Advancement', 'Culture','Work/Life Balance' ]].. 2024. 6. 19.
[Git] Github 오픈소스 가져오기 👀 내가 보려고 쓰는 글목차01. 오픈소스를 내 Github로 가져오기02. 내 Github에서 컴퓨터로 받기 01. 오픈소스를 내 Github로 가져오기 1. 가져올 오픈소스 우측 상단 있는 [Fork > Create a new fork] 누르기 2. Repository name, Description 확인하고 [Create fork] 누르기 02. 내 Github에서 컴퓨터로 받기 1. 우측 상단에 있는 [Code > Local > HTTPS] 에서 url을 복사하기 2. 명령 프롬프트 실행하기 3. 프롬프트로 Github계정 연결하기git config --global user.name (github name)git config --global user.email .. 2024. 6. 19.
728x90