반응형

전체보기 359

[MachineLearning] libFM 사용 방법

FM? Factorization Machines (FM)은 feature engineering 하는데 사용되는 generic approach large domain에서의 categorical variables 사이에 interaction을 estimating하는데 사용된다. libFM stochastic gradient descent (SGD), alternating least squares (ALS) optimization: 설치 latest release를 다운로드 받자 $ wget http://www.libfm.org/libfm-1.42.src.tar.gz $ tar xvf libfm-1.42.src.tar.gz 메뉴얼 http://www.libfm.org/libfm-1.42.manual.pdf 데..

MachineLearning 2018.03.18

[Paper] Neural Factorization Machines for Sparse Predictive Analytics

Neural Factorization Machines for Sparse Predictive Analytics Abstract web applications의 predictive tasks는 categorical variables을 modeling하는게 필요하다. categorical data user IDs demographics genders occupations standard machine learning에서는 binary features의 set으로 변환을 했다 (one-hot encoding). 결과적으로 feature vector는 highly sparse한 결과물이 생긴다. 이러한 sparse data를 효과적으로 학습하기 위해서는 features 사이에 interactions를 설명하는게..

MachineLearning 2018.03.18

[Angualr] 라우팅과 내비게이션

Angluar Routing & Navigation 라우팅과 내비게이션! SPA (Single Page Application) 단일 페이지 애플리케이션은 모던 웹의 패러다임 장점 기존의 서버 사이드 렌더링과 비교할때 배포가 간단하며 네이티브 앱과 유사한 사용자 경험을 제공 단점 link tag를 사용하는 전통적인 웹 방식은 새로운 페이지 요청 시마다 정적 리소스가 다운로드되고 전체 페이지를 다시 렌더링하는 방식으로 동작 새로고침이 발생되므로, 변경이 필요없는 부분을 포함하여 전체 페이지를 갱신하는 것으로 비효율적 SPA 웹 애플리케이션에 필요한 모든 정적 리소스를 애플리케이션 최초 기동 시에 한번만 다운로 이후 새로운 페이지 요청시 페이지 갱신에 필요한 데이터만을 전달받아 페이지를 갱신하므로 전체적인 트..

Programming/Web 2018.03.18

[Angular] If '<selector>' is an Angular component, then verify that it is part of this module

Angular에서 selector를 찾을 수 없다고 말할때 해결하는 방법 진짜 한시간동안 삽질을 한것 같다. Angular에서 모듈을 이해하는데 어려움이 있는것 같다. If my-component is an Angular component, then verify that it is part of this module. If my-component is a Web Component then add CUSTOM_ELEMENTS_SCHEMA to the @NgModule.schemas of this component to suppress this message. 위 에러를 계속 보고 있는데, 너무 답답한게 Moudle에 이미 하위 Module을 추가했는데, 찾을 수 없다는 에러가 계속 나왔다. 이 문제는 몇단..

Programming/Web 2018.03.18

[Shell] 데이터에서 구분자 변경하는 방법

데이터에서 구분자를 변경하는 방법 데이터의 delimeter가 항상 같지 않기 때ㅔ문에 알아 놓으면 좋은 방법! 1) tab을 ,로 변경하는 방법 $ sed 's/\t/,/g' inputfile > outputfile 2) ,를 tab으로 변경하는 방법 $ sed 's/,/\t/g' inputfile > outputfile $ sed 's/::/,/g' ratings.dat > ratings.csv 참고 https://stackoverflow.com/questions/3509332/how-to-convert-a-tab-separated-file-into-comma-separated-file

Programming/Shell 2018.03.18

[Linux] Zip 분할 압축 하는 방법

Linux에서 zip으로 압축하는 방법 + 분할 압! 리눅스에서 분할압축하는 방법에 대해서 설며한다. 기존에 macOS에서 분할압축하는 앱들이 많았는데, 유로로 전환했음... 일단 압축을 하려면 zip, 압축을 풀기 위해서는 unzip을 이용하면 된다. 압축하는 방법 압축하기 위해서는 아래와 같이 명령하면 된다. $ zip filelist $ zip file.zip * 만약 여기서 recursive하게 하고 싶다 (해당 폴더에 폴더가 존재한다) -r을 이용해서 다음과 같이 명령 $ zip -r * 여기서 이제 압축을 해야하는데 카카오톡 경우에는 300MB 이상인 파일은 허용하지 않기 때문에 250MB로 분할 압축 -s를 이용해서 뒤에 파일 크기를 명시적으로 적어주면 끝 여기서 만약 250이 아닌 300으..

Programming/Shell 2018.03.18

[Shell] 데이터 특정 퍼센트로 나누는 방법

데이터를 특정 퍼센트로 나누는 방법 하나의 큰 데이터를 특정 퍼센트 만큼 샘플링을 하거나, train/test 데이터셋으로 나누고 싶은 경우가 있는데, 이때 사용하면 좋다. 1) split 70% based on lines split -l $[ $(wc -l filename|cut -d" " -f1) * 70 / 100 ] filename 2) split 70% based on bytes split -b $[ $(wc -c filename|cut -d" " -f1) * 70 / 100 ] filename 참고 https://unix.stackexchange.com/questions/10219/split-how-to-split-into-different-percentages

Programming/Shell 2018.03.18

[파이썬] pickle을 사용해 dictionary 저장 및 로드

파이썬에서 pickle을 이용해 dictionary를 저장하고 로드하는 방법 중간 결과를 저장하거나, 최정 결과를 저장하기 위해 dictionary의 객체를 그대로 로컬의 디스크로 저장하는 방법은 자주 필요하다. key, map을 만드는 경우에도 중간 데이터를 생성해 놓은 뒤에, 이미 데이터가 있는 경우에는 로드해서 바로 사용하면 효율적이다. 코드 pickle을 이용해 데이터의 사이즈를 줄이고, 기존 textfile로 저장, 로드의 시간 소요가 절약된다.

Programming/Python 2018.03.18
반응형