Code Monkey home page Code Monkey logo

Comments (6)

shughestr avatar shughestr commented on June 24, 2024

ran the example code at https://mgwr.readthedocs.io/en/latest/generated/mgwr.gwr.GWR.html#mgwr.gwr.GWR
tried #basic model calibration, which is
import libpysal as ps
from mgwr.gwr import GWR
data = ps.io.open(ps.examples.get_path('GData_utm.csv'))
coords = list(zip(data.by_col('X'), data.by_col('Y')))
y = np.array(data.by_col('PctBach')).reshape((-1,1))
rural = np.array(data.by_col('PctRural')).reshape((-1,1))
pov = np.array(data.by_col('PctPov')).reshape((-1,1))
african_amer = np.array(data.by_col('PctBlack')).reshape((-1,1))
X = np.hstack([rural, pov, african_amer])
model = GWR(coords, y, X, bw=90.000, fixed=False, kernel='bisquare')

also returned: AttributeError: 'tuple' object has no attribute 'shape'

Python3.8. Any comments or suggestions?

from mgwr.

Ziqi-Li avatar Ziqi-Li commented on June 24, 2024

Hello @kkyyhh96 and @shughestr,

I locate the problem. This happened because a recent update on spreg hasn't been reflected in the mgwr. There is a current open PR #83 from @weikang9009 should fix this problem, but it hasn't been merged yet.

A temporary fix would be to pin spreg to an earlier version e.g. v.1.1.1. pip install spreg==1.1.1.

Cheers,
Ziqi

from mgwr.

shughestr avatar shughestr commented on June 24, 2024

from mgwr.

TaylorOshan avatar TaylorOshan commented on June 24, 2024

Solved in #83

from mgwr.

shughestr avatar shughestr commented on June 24, 2024

from mgwr.

Ziqi-Li avatar Ziqi-Li commented on June 24, 2024

Hi Ziqi, We are still experiencing some issues with the GWR approach/library. We wonder if you'll have time to have a quick Zoom chat with us. We have applied SVM, Ridge Regression, XGBoost on the dataset. As we are new in this field, we can really use your help and guidance. Just FYI, I am working on a pro bono basis with some graduate students in Canadian universities on a Real Estate price trend forecast project. I currently work for a Canadian government agency. Let me know. Thanks. Regards, Dave Dong

Hi Dave. I could do that, could you send me an email at liziqi1992[at]gmail.com?

from mgwr.

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.