2017-05-22 8 views
2

감독 분류를 위해 paper on fasttext에서 저자는 몇 가지 매개 변수를 변경하여 다양한 숨겨진 단위 수량을 지정했습니다 (h는 페이지 3,4에있는 것임 - 표 1에서 "It has it 10 개의 숨겨진 유닛과 우리는 bigrams의 유무에 관계없이 그것을 평가합니다. ") 그러나 the documentation을 읽은 후에는 변경할"숨겨진 유닛 "매개 변수가 나타나지 않습니다. 숨겨진 유닛 수를 지정하는 방법이 있습니까? 또는 -dim 옵션을 지정하는 것과 동일합니까?페이스 북에서 숨겨진 단위 수 지정

+0

: 나는이 분류 Fasttext를 사용하는 경우, 묻고 싶다, 어떤 노드의 수는 신경망이 softmax에 사용됩니까? - softmax 레이어의 노드 수는 클래스 수와 같습니다 (또는 계층 적 softmax의 경우 조금 더). 그러면 크기가 당신 (위트 - 짐)에 의해 설정된 숨겨진 층이 있습니다. 이것은 아래의 대답과 일치하므로 받아들입니다. –

답변

0

k은 없습니다. https://arxiv.org/pdf/1607.01759v3.pdf

의 섹션 2.1에서 클래스

의보다 정확하게 계산 복잡도는 O (KH) K 클래스와 H 텍스트 표현의 차원의 수이다.


하면 docs에서, 텍스트 분류의 클래스를 예측하는 경우 :

인자 k는 선택 사항이며, 기본적으로 1과 같다. k 개의 텍스트의 조각에 대한 가장 가능성이 레이블을 얻기 위해 사용 :

$ 예측 ./fasttext model.bin있는 test.txt K


모델 훈련 , 이것은 __label__* 태그로 감독 된 훈련을 수행 할 때 훈련 데이터에 내재적으로 지정됩니다. example tutorial에서

: 페이스 북 그룹 페이지에서

$ wget https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz && tar xvzf cooking.stackexchange.tar.gz 
--2017-05-23 09:03:26-- https://s3-us-west-1.amazonaws.com/fasttext-vectors/cooking.stackexchange.tar.gz 
Resolving s3-us-west-1.amazonaws.com... 54.231.236.45 
Connecting to s3-us-west-1.amazonaws.com|54.231.236.45|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 457609 (447K) [application/x-gzip] 
Saving to: ‘cooking.stackexchange.tar.gz.1’ 

cooking.stackexchange.tar.gz.1  100%[================================================================>] 446.88K 385KB/s in 1.2s  

2017-05-23 09:03:28 (385 KB/s) - ‘cooking.stackexchange.tar.gz.1’ saved [457609/457609] 

x cooking.stackexchange.id 
x cooking.stackexchange.txt 
x readme.txt 


$ cat readme.txt 
The data in this archive is derived from the user-contributed content on the 
Cooking Stack Exchange website (https://cooking.stackexchange.com/), used under 
CC-BY-SA 3.0 (http://creativecommons.org/licenses/by-sa/3.0/). 

The original data dump can be downloaded from: 
https://archive.org/download/stackexchange/cooking.stackexchange.com.7z 
and details about the dump obtained from: 
https://archive.org/details/stackexchange 

We distribute two files, under CC-BY-SA 3.0: 

- cooking.stackexchange.txt, which contains all question titles and 
    their associated tags (one question per line, tags are prefixed by 
    the string "__label__") ; 

- cooking.stackexchange.id, which contains the corresponding row IDs, 
    from the original data dump.