Code Monkey home page Code Monkey logo

Comments (4)

weikang9009 avatar weikang9009 commented on September 26, 2024

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.

romass12 avatar romass12 commented on September 26, 2024

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.

weikang9009 avatar weikang9009 commented on September 26, 2024

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.

romass12 avatar romass12 commented on September 26, 2024

Thank you so much @weikang9009

from giddy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.