2025/03 28

Naïve Bayes (나이브 배이스) Classifier - 실전 2 평가

바이너리 분류 모델에 있어서 평가 항목Confusion Matrix 샘플 결과 TP 1 FN 29 FP 0 TN 970 Accuracy (정확도) 전체 결과에 대한 True 의 비율 Accuracy = (TP + TN) / (TP + FN + FP + TN) = 971 / 1000 = 0.971 Precision (정밀도) (모델의 관점) True(=1) 이라고 예측한 것 중eldercoder.tistory.com위 링크를 참조 confusn_matrix>>> from sklearn.metrics import confusion_matrix>>> print(confusion_matrix(Y_test, prediction, labels=[0, 1]))[[ 60 47][148 431]] Accuracy : 전..

카테고리 없음 2025.03.10

Listening (Healthcare Multi-Millionaires Best Advice His Father Gave Before Passing Away)

final thing my old man died when I was 26 years old 마지막으로, 내 아버지는 내가 26살 때 돌아가셨다.he said a couple things to me which I'll share them all 그분이 나에게 몇 가지 말씀해 주셨는데, 그것들을 모두 공유하려 한다.the number one thing was he said 첫 번째로, 아버지가 이렇게 말씀하셨다.I don't care if you sell paper clips or locomotives for a living 나는 네가 종이클립을 팔든, 기관차를 팔든 상관없다.people buy from people they like 사람들은 자신이 좋아하는 사람에게서 물건을 산다.this world ha..

youtube english 2025.03.08

Naïve Bayes (나이브 배이스) Classifier - 실전 2

import numpy as npimport pandas as pddata_path = 'https://github.com/vandit15/Movielens-Data/blob/master/ml-1m/ratings.dat?raw=true'df = pd.read_csv(data_path, header=None, sep='::', engine='python')df.columns = ['user_id', 'movie_id', 'rating', 'timestamp'] n_users = df['user_id'].nunique()n_movies = df['movie_id'].nunique()def load_user_rating_data(df, n_users, n_movies):    data = np.zeros([n..

http JSON

struct 을 JSON string 으로 변환type Book struct {     Title string `json:"title"`     Author string `json:"author"` } // an instance of our Book struct book := Book{Title: "Learning Concurreny in Python", Author: "Elliot Forbes"}byteArray, err := json.Marshal(book) if err != nil {     fmt.Println(err) } fmt.Println(string(byteArray)) struct 과 struct 속의 struct 을 JSON string 으로 변환type Book struct {    ..

backend (Go) 개발 2025.03.08

Build HTTP Server

http-server 폴더생성$ mkdir http-server$ cd http-server 모듈 초기화 $ go mod init http-server  server.go 화일을 생성하여 프로그래밍listenAddr = ":8080"  : 실행하는 서버의 8080 포트를 사용핸들러(http.NewServeMux())를 생성하여 setupHandlers에 건너준뒤 api 별 처리 함수를 등록http.ListenAndServe 로 항시 감시 서브api 요구가 오면 담당 함수에서 처리 빌드$ go build -o server 실행$ ./server 확인$ curl localhost:8080/api    Hello, world! $ curl localhost:8080/healthz    ok

backend (Go) 개발 2025.03.05

환경설정

Go (aka Golang) 소개2009년 google 에 의해 web application과 network server 개발 목적으로 심플 사용편리성을 염두에 두고 개발C++과 같이 컴파일을 통해 실행되므로 빠른 실행속도와 강력한 병렬실행을 지원한다.  개발 OS 환경에 맞게 인스톨 Download and install - The Go Programming LanguageDocumentation Download and install Download and install Download and install Go quickly with the steps described here. For other content on installing, you might be interested in: Download..

backend (Go) 개발 2025.03.04

JSON 데이터 보여주기

기본 단위 JSON 구조체는 Result 이고 이를 배열로 가지고 있는 구조체로 Response 를 선언 Line 21 : 초기값없는 빈(=()) Result 배열 변수 선언Line 34 : .task 는 뷰가 표시되기 전에 딱 한번만 실행되기 된다. 이때 loadData() 를 호출한다.                비동기처리 async await 페어로 사용하며 loadData() 함수에 async를 선언하여 호출측은 await로 대기Line 40 : guard let 은 if 문 대신에 쓰이는 것으로 else 부분을 먼저 처리하는 효과를 가진다. url 이 nil 이라면 else 처리Line 45 : 예외처리 do {  } catch { }Line 46 : URLSession.shared.data(u..

Mobile/Swift 2025.03.04