목록전체분류 (150)
The Beautiful Future
a = [41.50, -70.95]; b = [ 41.80 , -70.50]; % straight line function from a to b func = @(x)a(2) + (a(2)-b(2))/(a(1)-b(1))*(x-a(1)); % determine the x values x = linspace(a(1),b(1),50); % determine the y values y = func(x); % create the figure figure; % get a handle to a plot graphics object hPlot = plot(NaN,NaN,'ro'); % set the axes limits xlim([min(a(1),b(1)) max(a(1),b(1))]); ylim([min(a(2),b..
Ordinary Least Square Method(OLS) Ridge Regression Ridge Regression은 OLS에 L2 Regularization이 합쳐진 것이다.기본적인 Regularizaion의 좋은 점은 A의 모든 원소가 골구루 문제를 최소화하는데 기여하게 되는 것이다. 즉, 이를 unbias 되었다라고 한다. OLS는 모든 Y와 X에 대해서 최적으로 에러가 최소가 되게 하지만 Ridge Regression은 최적 최소지점을 비겨나간다.이는 가 singular한 경우를 보조하게 된다.singular한 경우는 학습데이터가 모자란경우(underdetermined)나 학습데이터에 비해 모델이 굉장히 복잡한 경우(overfitting)이다.
vs2013 설치 아래 링크 코드 수정https://hemprasad.wordpress.com/2015/04/30/building-vtk-with-visual-studio-2013/ Building VTK5 with Visual StudioDownloadDownload VTK 5.10.1 the (VTK-5.10.1.zip) to unzip the file. (C: \ VTK-5.10.1)Http://Www.Vtk.Org/VTK/resources/software.Html#previous Https://Github.Com/Kitware/VTK/tree/v5.10.1CMakeYou want to specify the destination of the input destination and solution f..
miniconda을 설치하는게 윈도우즈용으로 이미 다 빌드되있고 패키지도 들어가 있어서 편하다 http://conda.pydata.org/miniconda.html >pip install ipython>pip install ipython notebook노트북 저장 할 폴더 생성 및 이동해서>ipython notebook이렇게하면 브라우저에 jupyter가 떠야한다. scipy 설치 >conda install scipy pandas 설치 > conda install pandas 엑셀 파일 읽기 openpyxl, xlrd/xlwt 설치> pip install openpyxl/xlrd/xlwthttp://pandas.pydata.org/pandas-docs/stable/install.html ipython n..
참조 : 숙명 여대 보간법.ppt 5장 1. Spline 보간법이란?주어진 점들 사이를 함수의 구간으로 정의하고 이 사이를 저차 다항식으로 연결하는 방법.구간 연결 다항식 ~ 스플라인 함수 2. 장단점 - 일반적으로 완만하게 보간하지만 특정구역에서 급격히 변하는 경우도 있다.- 국부적으로 급격히 변화하는 함수에 우수한 근사값을 제공한다. 3. 조건주어진 구간 [a, b]가 와 같이 n-1개의 소구간 으로 이루어졌을 때 차수가 k인 spline함수 s(x)는 다음 조건을 만족해야한다.- s(x)는 소구간에서 k차 이하의 다항식으로 표현된다.- s(x), s'(x), s''(x),..등의 도함수들은 구간 [a, b]에서 연속이어야 한다.위 두 조건을 만족하는 최소의 차수는 3차로서, 모든 소구간에서 3차 다..
caffe.proto optional DetectNetGroundTruthParameter detectnet_groundtruth_param = 6801; optional DetectNetAugmentationParameter detectnet_augmentation_param = 6802; detectnet_transform_layer.hppdetectnet_coverage.hpp detectnet_transform_layer.cppdetectnet_coverage_rectangular.cpp
long LoadFileList( string _strFolderPath, vector& strvExt, vector& vFileList){string strFolderPath = _strFolderPath; // 폴더 안에 있는 모든 영상을 로드한다.WIN32_FIND_DATAFindData;HANDLEhFind= INVALID_HANDLE_VALUE;charszFindFile[MAX_PATH]= {0,};charszFileName[MAX_PATH]= {0,};charszOnlyFileName[MAX_PATH]= {0,};charszExt[MAX_PATH]= {0,};strcpy(szFindFile, strFolderPath.data());strcat( szFindFile, "\\*.*"); hFind..
find /home/file_directory > file_list.txt
refer : http://stackoverflow.com/questions/29670548/covariance-calculation-with-cuda Your code does not make any sense to me.Covariance calculation in CUDA can be easily performed by using cuBLAS in conjunction with Thrust. Considering N realizations of K random variables, the covariance estimation formula is the followingwhere qjk, j,k=1,...,K are the covariance estimate values, Xj and Xk with ..
refer : http://stackoverflow.com/questions/17401765/parallel-implementation-for-multiple-svds-using-cuda My previous answer is now out-of-date. As of February 2015, CUDA 7 (currently in release candidate version) offers full SVD capabilities in its cuSOLVER library. Below, I'm providing an example of generating the singular value decomposition using CUDA cuSOLVER.Concerning the specific issue yo..
1. Score Function 2. Loss function
이미지를 벡터로 생각하고 출력을 클래스 레이블 벡터로 생각해라. bias를 W의 마지막 열에 추가하면 아래와 같이 된다.W의 각 행은 xi와 내적되어 class score를 계산하며 유사도로 생각 할 수 있다.W을 학습하기 위해 Loss function 다른 말로는 cost function, objective function을 정의하고 최소화하는 W을 학습해야한다. Losss는 학습 모델과 label의 함수이다.아래와 같이 j번째 클래스의 점수가 조금이라도 높다면 분류를 잘 못하게 된다.즉 아래와 같이 0 보다 작은 경우 제대로 분류하게 된다.즉 0보다 작다면 Loss가 없다고 볼 수 있으며 0보다 큰 경우는 줄여야 할 Loss이다.Hinge Loss솔직히 말해서 0보다 더 작은 수보다 작으면 비슷한게 ..
윈도우즈에서 리눅스용 드라이브접근하기 http://sourceforge.net/projects/ext2fsd/files/Ext2fsd/ - 최신폴더로 들어가서 exe버전을 다운로드 후, next/next누르며 설치 - 재부팅없이 실행하면 파일시스템이 EXT3/4인 드라이브가 보임 - 그걸 더블클릭하고 -- Mount volume in readonly mode 해제(쓰기가능해짐) -- Automatically mount via Ext2Mgr 체크하고 표시 드라이브명 선택(윈도우즈에 마운트됨) -- Apply 하드웨어 및 소리->전원 옵션->전원 단추 작동 설정->현재 사용할 수 없는 설정 변경/빠른 시작 켜기(권장)을 uncheck->변경 내용 저장 2. ubuntu부팅하면 디스크들에 접근할 수 있음.
caffe::Net net_age;caffe::Blob mean_blob;std::vector input_vec; net_age.CopyTrainedLayersFrom(caffemodel);BlobProto blob_proto;ReadProtoFromBinaryFileOrDie(mean, &blob_proto);mean_blob.FromProto(blob_proto); Caffe::set_mode(Caffe::CPU); vector input_vec;Blob blob(1, 3, mImg.cols, mImg.rows); //copy image data (small_image) to blobint i, j;for (i = 0; i< mImg.cols; ++i)//height{for (j = 0; j< mIm..
// Set device id and modeCaffe::SetDevice(FLAGS_gpu);//Device IDCaffe::set_mode(Caffe::GPU);//Set up Caffe: CPU or GPUCaffe::set_phase(Caffe::TEST);//Phase설정:TRAIN or TEST // Load net Net net("./model/mnist/lenet_deploy.prototxt");net.CopyTrainedLayersFrom("./data/mnist/snapshot/lenet_iter_10000.caffemodel"); vector input_vec;Blob blob(1, 1, IMAGE_MNIST_WIDTH, IMAGE_MNIST_WIDTH); //copy image da..
1. Exponential LossExponential 함수를 이용하여 Loss를 정의한다.나중에 Loss를 최소화하는데 Exponential이 미분하기 좋기 때문이다.함수는 x = -1일때 2.7 , x = 0 일때 1, x = 1 일때 0.37 이며 x가 커질 수록 작아진다. 예측결과와 GT가 같으면 적은 Loss을 틀리면 큰 Loss을 할당한다. 2. boosted classifier아래와 같은 수식으로 표현된다.어떤 샘플하나의 중요도가 처음 이었다면 중요도는 Loss 가 곱해지면서 아래와 같이 쓸 수 있다.Exp Loss를 다시 쓰면 Samples Desired outputs Initial weights set to Error function Weak learners For in :Choose :..
*해상도 설정http://dreamlog.tistory.com/334 *업데이트sudo apt-get update *Install VBox Additionshttps://docs.oracle.com/cd/E36500_01/E36502/html/qs-guest-additions.html *Activate bidirectional clip-boardhttps://www.liberiangeek.net/2013/03/install-virtualbox-guest-additions-software-and-enable-bidirectional-clipboard-sharing-with-ubuntu-guest-machines/ *Missing recommended library: libGLU.sohttp://stacko..
The Levenberg-Marquardt algorithm(LMA), also known as the damped least-squares(DLS) method, is used to solve non-linear least squares problems. The LMA finds only a local minimum, which is not necessarily the global minimum. The LMA interpolates between the Gauss-Newton algorithm(GNA) and the method of gradient descent. The LMA is more robust than the GNA, which means that in many cases it finds..
참고 블로글 : http://www.jaemanstyle.com/blog/2012 dir /b /s > FileList.txt /b 최소 형식을 사용합니다 (머리말 정보나 요약 없음)./s 지정한 디렉터리와 하위 디렉터리를 포함하여 보여줍니다. 리다이렉션으로 로그 만들기0: stdin1: stdout2: stderrexampledir 1>filt.txt 2>&1 http://stackoverflow.com/questions/503846/how-do-i-echo-and-send-console-output-to-a-file-in-a-bat-script
m개의 x와 y가 있을때 W를 구하는 문제이다.문제를 수식으로 풀어써보면 아래와 같다. 원래 m개있던 샘플이 r개가 늘어났다. r개가 늘어남에 따라 X^tX와 X^tY의 변화를 살펴보면 아래와 같다.추가된 r부분만 gram matrix을 만들어서 더해주면 된다.이제 X^tX의 역함수 구하는 부분을 자세히 살펴보면 아래와 같다.woodbury formula을 사용하면 추가되기전 m개의 샘플로 이미 구해진 V(m)을 그대로 사용 할 수 있다.샘플이 추가되어 업데이트 할 때는 U을 계산할때만 역행렬을 구하야 한다.그리고 최종 목표인 W(m+r)의 계산도 정리를 해보면 W(m)이 중복되서 나오는 것을 알 수 있다.정리를 해보면 기존 V(m)과 W(m)을 이용해서 r개의 추가 샘플에 대해서 V(m+r)과 W(m+..