fabianp / mord

Ordinal regression algorithms
Other
263 stars 71 forks source link

datasets package is not installed #4

Open languitar opened 7 years ago

languitar commented 7 years ago

After

pip install -U 'git+https://github.com/fabianp/mord'

This happens:

ImportError                               Traceback (most recent call last)
<ipython-input-1-a8a4fbc902d0> in <module>()
      1 import mord
----> 2 from mord.datasets.base import load_housing
      3 from sklearn import linear_model, metrics, preprocessing
      4 
      5 data = load_housing()

ImportError: No module named datasets.base

Seems the datasets package is not installed.

APandaInFjord commented 6 years ago

Me too!

boshokor commented 6 years ago

so am I

S-Sanaz commented 6 years ago

Same goes for me!

jeffols commented 6 years ago

This should be fixed. Please verify.

S-Sanaz commented 6 years ago

Now I get this error:


TypeError Traceback (most recent call last)

in () 3 from sklearn import linear_model, metrics, preprocessing 4 ----> 5 data = load_housing() 6 features = data.data 7 /home/sanaz/anaconda2/lib/python2.7/site-packages/mord/datasets/base.pyc in load_housing() 48 ''' 49 index = np.asarray(range(0, data.shape[0])).\ ---> 50 repeat(data.ix[:,'Freq'].values) 51 data = data.ix[index,:] 52 features = ('Infl', 'Type', 'Cont') TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
extrospective commented 5 years ago

If I use "pip install mord" then I will get this error still. Version 0.6

If I run "pip install -U 'git+https://github.com/fabianp/mord'" then I do not get this error. Version 0.6.

Does it make sense to bump the version # so it is clear that the version from github is not matching what is found with pip install?

kengentenerende commented 5 years ago

change the path of the file where it can access the mord.datasets.base

fabianp commented 5 years ago

pull requests welcome

On Sun, Dec 23, 2018 at 12:49 AM kengentenerende notifications@github.com wrote:

change the path of the file where it can access the mord.datasets.base

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fabianp/mord/issues/4#issuecomment-449616203, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQ8hwKUELwucYgJe_xLkgQMktNXJCjiks5u7xl4gaJpZM4NqR7Y .

zysNLP commented 4 years ago

I solved this problem, this is the way: First, download this github repo alone and modify the document "mord" to "mords". Make sure you are in a python IDE not terminal. Second, find mord-master/mords/datasets/base.py in your computer and save words like "/home/zys/Documents/works/githubs/mord-master/mords/datasets/", you know what I mean. Copy these to base.py line 32 and replace "file" with them, we don' t need whatever file! Then execute all base.py so get funtion load_housing. Lastly, turn your work path to your examples/houring.py and comment out line 2. So be it!

Alternatively, I modify line 2 to "from mords.datasets.tests.base import load_housing" attention this mords but still ModuleNotFoundError: No module named 'mords.datasets.tests.base'. I think there maybe better ways to realize this.

SysuCharon commented 4 years ago

In project root dir cp examples/housing.py . python housing.py