Thief of Wealth
what is morgan? (morgan이란?)
개발/Web Programming 2019. 9. 30. 20:35

https://www.npmjs.com/package/morgan morgan은 http request에 대해서 log를 남겨주는 일종의 logger이다. import morgan from "morgan"; app = express(); app.ues( morgan('dev') );

babel 이란?
개발/Web Programming 2019. 9. 30. 20:09

https://babeljs.io/docs/en/ Babel is a toolchain that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript in current and older browsers or environments. babel은 ECMAScript 2015+ 의 코드를 최신 자바스크립트로 만들어주는 컴파일러 역할을한다. 예를들어 express 를 사용하고 싶다고 했을때 기존에는 const express = required("express"); 로만 썻어야했지만 import express from "express"; 로 모던하게 쓸 수 있다. package.json을 ..

article thumbnail
Mac 듀얼(더블)모니터 전체화면(풀스크린) 시 검은화면 뜨는 경우
개발/Mac 2019. 9. 30. 08:13

Mac 듀얼(더블)모니터 전체화면(풀스크린) 시 검은화면 뜨는 경우 한쪽에 풀스크린하면 다른 화면에 검은화면이 뜰경우에는 셜정에서 , 미션컨트롤해서 아래와 같은 그림으로 셋팅하고 컴퓨터를 로그아웃했다가 다시 로그인하면 된다.

C++ error: no matching constructor for initialization of
개발/C,C++ 2019. 9. 29. 15:59

Class나 Struct에 기본 빈 생성자를 만들어주면 해결~

notebook image 불러와서 표시하기
개발/ML+ Data Science 2019. 9. 29. 13:00

from IPython.display import ImageImage(filename='/kaggle/input/kmeans2/kmeans.png')

C++ 입력길이 모를떄 모두 받기
개발/C,C++ 2019. 9. 29. 10:42

while( scanf("%d", &a) >= 0 ){ cout

Kmeans알고리즘 elbow그래프 그려서 구하기
개발/ML+ Data Science 2019. 9. 29. 09:58

from scipy.spatial.distance import cdistdistortions = []K = range(1,10)for k in K: kmeanModel = KMeans(n_clusters=k).fit(X_train) distortions.append(sum(np.min(cdist(X_train, kmeanModel.cluster_centers_, 'euclidean'), axis=1)) / X_train.shape[0])# Plot the elbowplt.plot(K, distortions, 'bx-')plt.xlabel('k')plt.ylabel('Distortion')plt.title('The Elbow Method showing the optimal k')plt.show()

ROC curve 그리기
개발/ML+ Data Science 2019. 9. 28. 22:48

from sklearn.metrics import roc_curve cm = confusion_matrix(y_test, predict)print(cm)print( "accuracy : ", accuracy_score( y_test, predict ) ) # (cm[0][0]+cm[1][1])/(cm[0][0]+cm[1][1]+cm[1][0]+cm[0][1])print( "recall(detection rate) : ", recall_score( y_test, predict ) )print( "fallout (false alarm rate) : ",cm[1][0]/(cm[1][0]+cm[1][1]) )print( "f1_score : ", f1_score(y_test, predict) )print( "r..

profile on loading

Loading...