Comments (4)
Hi @romass12! Thank you for reporting this.
Could you please provide the output (error message) in a screenshot and possibly how your data (rpci) look like so that we can help you debug?
from giddy.
Hi @weikang9009
Yes, the rpci shape is (23,203) with 4 classes.
The distribution of 3 classes where the event occurs and is divided into classes are,
1 -> 1300
2 -> 587
3 -> 379
The rest is '0' class, where the event did not occur.
array([[1, 1, 0, ..., 0, 0, 0], [0, 0, 2, ..., 1, 2, 0], [2, 0, 0, ..., 2, 1, 1], ..., [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0], [0, 0, 0, ..., 0, 0, 0]])
Spatial_markov is quantizing the input even though I have already binned the data
The output says:
/usr/local/lib/python3.7/dist-packages/mapclassify/classifiers.py:239: UserWarning: Warning: Not enough unique values in array to form k classes "Warning: Not enough unique values in array to form k classes", UserWarning /usr/local/lib/python3.7/dist-packages/mapclassify/classifiers.py:241: UserWarning: Warning: setting k to 2 Warn("Warning: setting k to %d" % k_q, UserWarning)
from giddy.
Hi @romass12, thank you for the description of your data.
Since your data has been discretized/classified, you should set the parameter discrete=True
when initializing the Spatial_Markov
class. The spatial lag will be calculated as the most common category among neighboring observations. Please refer to the Spatial_Markov
API documentation and pay special attention to the parameter discrete
and look at the example (4) where the discrete case is handled.
from giddy.
Thank you so much @weikang9009
from giddy.
Related Issues (20)
- update supported for Python version HOT 3
- How to use spatial_markov model by adopting my own data HOT 1
- how use my own data HOT 1
- notebook links are returning 404 HOT 2
- fail gracefully when `splot` not installed
- swap out `setup.py` for `pyproject.toml`
- giddy import fails due to numba missing `generated_jit` HOT 5
- environment.yml out of date
- Notebook links on landing page are broken HOT 1
- exposing the package version HOT 16
- np.int depreceated HOT 10
- Not a bug and not a request BUT is giddy.markov.Spatial_Markov stochastic? HOT 6
- the spatial lags : related to issue 215 HOT 4
- failing tests (numpy outputting data type in addition to the value) HOT 4
- adopt `ruff` for both linting & formatting
- add explicit Mac intel testing environment
- CI maint for standard naming, oldest dependencies, & Python 3.12
- drop 3.9 as minimally support Python version? HOT 1
- update chat from `gitter` to `discord` HOT 3
- some linting adjustments [2024-07-15]
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 giddy.