2

I want to reduce the model file size . Can we reduce it by reducing the number of digits in the weights of the model file. The number of classes in my model file is around 3800 and the number of features is around 357000. Here is some excerpt from the model file. Can I reduce the number of digits in these weights.

solver_type L2R_L2LOSS_SVC_DUAL
nr_class 3821
nr_feature 357021
bias -1.000000000000000
w
-0.6298615183549175 -0.6884816945277815 -0.9850473581929793
-0.2730180225739936 -0.4444522939544599 -0.3045368061994185 
-0.6752904784743610 -0.4936186126242763 -0.8167435931134331 
-0.8747648882598349 -0.4980187300672689 -0.8255372912521536 
-0.3329812532124196 -0.1751416471640286 -0.7447656595877303 
-0.4240569914873799 -0.9004909961812873 -0.9857813112641359 
-0.3674085365663847 -0.4819407419877990 -0.3645238468547681 
-0.5827397105860186 -0.7290781581209491 -0.8615229165775795 
-0.3975308017493017 -0.6522787326004871 -0.9846626520798610 
-0.5583216247458188 -0.9488816092738117 -0.6469158771901011 
-0.2306256734853684 -0.2940612946888093 -0.6895719661937446 
-0.3041407180695167 -0.5602587606930518 -0.4434458835686698 
-0.3960629365410545 -0.7512211790407204 -0.6082476608695304 
-1.336132842955273 -0.6057066303450040 -0.5726087731282288 
-0.4918814547677718 -0.7606578865363953 -0.2951659264868926 
-0.3881680788359501 -0.3109241231671961 -0.7078707491799914 
-0.3623625688446360 -0.4430137729068305 -0.9279271098475936 
-0.2290838088700753 -0.3870980678621480 -0.8000332693180561 
-0.7964744879675550 -0.4950551119251316 -0.5201500981458075 
-0.6654200978736288 -0.9037766341356712 -0.5921799507740539 
-0.4552915755388566 -0.8048467444625557 -0.08638961422716016 
-0.3175800991399296 -0.8889281355804046 -0.8889673432972257 
0.009443893188055608 -0.3033030733905986 -0.6063958370642328 
-0.7781676697747630 -0.9969339455729528 -0.7847641855193951 
-0.3709450948897945 -0.9293821956430142 -0.6711216076980766 
-0.6472048031763484 -0.2844660995208588 -0.4547657013618363 
-0.3093274839631762 -0.8264594986328345 -0.2693948669009715 
-0.5691246530468883 -0.5816949288414970 -0.7988407843132017 
-0.5846410991542126 -0.6102733673192773 -0.9474472897104326 
-0.4619018809588187 -0.6922626991585266 -0.8529509393486879 
-0.9341690394723746 -0.2048861760333368 -0.5763255438056814 
-0.4753823007333206 -0.9847858814169310 -0.6084670508904806 
-0.6097889096385636 -0.1558026578670219 -0.5407452525949980 
-0.8426597160875828 -0.5728578082647764 -0.6254655056167889 
-0.5002570985981800 -0.5660289375686121 -0.6966970933117435 
-0.3595184568720410 -0.8869769517170271 -0.8293060581021244 
-0.7660244640066636 -0.9191108227612158 -0.7495472111112249 
-0.3250789003708131 -0.8545862221106031 -0.9847863669982040 
-0.9862358540926807 -0.9843872487122278 -0.3764841688606632 
-0.6665806111063707 -0.6998869717621219 -0.8398491506346015 
-0.7498849663083538 -0.2584536929034274 -0.8798094698402976 
-0.8659064866640068 -0.8540212609217359 -0.4705628403387491 
-0.9848057457322186 -0.5870303872290659 -0.9105115844147157 
-0.6855534064105064 -0.7447256224770895 -0.9845164901161550 
-0.9267803381073205 -0.6874399094864110 -0.9868490844056681 
-0.9871049327408159 -0.9127271706215343 -0.8894132571749456 
-0.7481430771200624 -0.7661512147794380 -0.4619076734386954 
-0.3463253354355214 -0.7324122395130058 -0.7198934949704492 
-0.3869971300152642 -0.3580173602243875 -0.8144411145869335 
-0.4708508640578066 -0.7583061726079500 -0.6102585014526588 
-0.2323551831668570 -0.7124730357532248 -0.6407019387626708 
-0.8770555543363814 -0.7747723882503575 -0.8880529094965369 
-0.5221765657051773 -0.8927103129537772 -0.8873570244928761 
-0.6814118942525524 -0.4812414843861851 -0.07723442473878635 
-0.3004215736435181 -0.7901826925719376 -0.6000050603345796 
-0.9391488020802135 -0.6130019120301854 -0.6519260224181763 
-0.6312423953207323 -0.6236684911320279 -0.8319901021019791 
-0.9846585341126538 -0.8241847119432536 -0.9849733862258551 
0.03619613868867930 -0.9402473523400392 -0.4963043182116479 
-0.06988396609313940 -0.6160025364808686 -0.9485679374403244 
-0.9552678112333591 -0.2951058860501357 -0.9871232492575841 
-0.2801466899229405 -0.5623043303
sietschie
  • 7,425
  • 3
  • 33
  • 54
user2507447
  • 21
  • 1
  • 3
  • I am trying to solve a similar problem. Removing the digits will reduce the accuracy of the model so it's better to avoid it. The two leading alternatives I have at the moment are converting the model file to a binary format myself or using Google's protocol buffers. I'll return to update when I have an established solution. – Hatchmaster J Feb 17 '16 at 06:51

0 Answers0