README.md in fasttext-0.1.2 vs README.md in fasttext-0.1.3

- old
+ new

@@ -1,10 +1,10 @@ # fastText [fastText](https://fasttext.cc) - efficient text classification and representation learning - for Ruby -[![Build Status](https://travis-ci.org/ankane/fasttext.svg?branch=master)](https://travis-ci.org/ankane/fasttext) +[![Build Status](https://travis-ci.org/ankane/fasttext.svg?branch=master)](https://travis-ci.org/ankane/fasttext) [![Build status](https://ci.appveyor.com/api/projects/status/67yby3w6mth766y9/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/fasttext/branch/master) ## Installation Add this line to your application’s Gemfile: @@ -75,10 +75,16 @@ model.labels ``` > Use `include_freq: true` to get their frequency +Search for the best hyperparameters + +```ruby +model.fit(x, y, autotune_set: [x_valid, y_valid]) +``` + Compress the model - significantly reduces size but sacrifices a little performance ```ruby model.quantize model.save_model("model.ftz") @@ -166,11 +172,15 @@ thread: 3, # number of threads lr_update_rate: 100, # change the rate of updates for the learning rate t: 0.0001, # sampling threshold label_prefix: "__label__" # label prefix verbose: 2, # verbose - pretrained_vectors: nil # pretrained word vectors (.vec file) + pretrained_vectors: nil, # pretrained word vectors (.vec file) + autotune_metric: "f1", # autotune optimization metric + autotune_predictions: 1, # autotune predictions + autotune_duration: 300, # autotune search time in seconds + autotune_model_size: nil # autotune model size, like 2M ) ``` Word representations @@ -198,11 +208,11 @@ ## Input Files Input can be read directly from files ```ruby -model.fit("train.txt") +model.fit("train.txt", autotune_set: "valid.txt") model.test("test.txt") ``` Each line should be a document @@ -258,14 +268,14 @@ - [Report bugs](https://github.com/ankane/fasttext/issues) - Fix bugs and [submit pull requests](https://github.com/ankane/fasttext/pulls) - Write, clarify, or fix documentation - Suggest or add new features -To get started with development and testing: +To get started with development: ```sh -git clone https://github.com/ankane/fasttext.git -cd fasttext +git clone https://github.com/ankane/fastText.git +cd fastText bundle install -rake compile -rake test +bundle exec rake compile +bundle exec rake test ```