Training a vowpalwabbit model with --dump_json_weights_include_feature_names_experimental, and --invert_hash enabled outputs a text file containing feature names and feature weights say sample.txt which is as expected. However, after saving and loading it from a file, model json_weights() does not output weights in human-readable with feature names similar to sample.txt. Is there a way to get feature weights similar to sample.txt
Is there a way to load vowpalwabbit model and output json_weights() with feature names
79 Views Asked by MrE At
1
Right now there is no native way of doing this: "--invert_hash" is only maintaining runtime map from feature names to hashes, but they are not getting saved into model.
Possible workaround: If you have static features schema, single prediction on example will recover the whole map (without changing the weights):