Comments (4)
The init_fm parameter is initialized with value 0.2:
model = FM_FTRL(alpha=0.01, beta=0.01, L1=0.00001, L2=0.1, D=sparse_merge.shape[1], alpha_fm=0.01, L2_fm=0.1, init_fm=0.2, D_fm=200, e_noise=0.0001, iters=17, inv_link="identity", threads=4)
If i call model.__getstate__()
just after the initialization I get init_fm=0 but the z array is randomly initialized:
log
The interesting fact is that the Nan came out dependently on the training set:
model.fit(train)
-->converge
model.fit(train.sign())
--> get Nan values
from wordbatch.
I think this is an issue with your parameters.
" 1.0, 0.0, 1020688".. the 0.0 parameter in the middle means you've initialized the factor weights as 0. A init_fm=value of 0.01-0.001 usually works well.
from wordbatch.
I have the same problem
If i call model.getstate() just after the initialization I get init_fm=0
All predict values are nan
from wordbatch.
I could replicate this now. The problem is not with init_fm, that one you could set as 0, but with bad results. The issue is alpha_fm set too high compared to feature values, leading the updates to overflow. Try normalizing the input rows, or starting with very low alpha_fm, <0.01.
This could be fixed by gradient clipping, but in general you would still get low quality models in cases where this is happening. You should normalize the input rows or lower alpha_fm.
from wordbatch.
Related Issues (20)
- WordVec extractor failing due to decode error HOT 1
- cannot install on windows 8.1 HOT 4
- "Illegal operation" when importing wordbatch.extractors HOT 2
- Licensing for commercial use without open source? HOT 1
- Tried to pickle the fitted wordbatch model, but bumped into this Error: AttributeError: 'function' object has no attribute 'im_self' HOT 3
- Import FTRL fails HOT 1
- Error on trying to import FM_FTRL HOT 1
- predict() takes a very long time HOT 1
- from wordbatch.data_utils import * HOT 3
- IndexError: too many indices for array HOT 1
- Illegal instruction (core dumped) HOT 1
- TypeError: only size-1 arrays can be converted to Python scalars (Windows, Python 3.5) HOT 1
- Multiprocessing Hanging in Python 3.6+ HOT 7
- are this times normal? HOT 2
- AttributeError: Can't get attribute 'normalize_text' on <module '__main__'> HOT 1
- About Wordbatch HOT 2
- pip install wordbatch on macos---error: command 'gcc-7' failed with exit status 1
- 'tuple' object has no attribute 'transform' HOT 3
- cross validation and grid search HOT 3
- will it work for Windows ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordbatch.