Coder Social home page Coder Social logo

No dataset found for examples about keras-gp HOT 5 CLOSED

mathDR avatar mathDR commented on May 16, 2024
No dataset found for examples

from keras-gp.

Comments (5)

alshedivat avatar alshedivat commented on May 16, 2024 1

Dan, Alexis, thanks for bringing this up. Sorry for the DATA_PATH-related issue -- on my machines, I usually keep all the data in a dedicated folder to which DATA_PATH is pointing. I agree that for the examples such a set up is an overkill and shouldn't be a requirement.

Dan, thanks for the code snippets. Similarly to what you suggested, I will update the data utils to allow automatic data retrieving in case it is not found. It's a little bit trickier when you want to support both Python 2 and 3, since pickle formats differ. I will push the updates during the coming week.

You are more than welcome to open a PR with the setup instructions for mac.

from keras-gp.

alexisylchan avatar alexisylchan commented on May 16, 2024

Hi the following worked for me

  1. get actuator.mat from http://www.iau.dtu.dk/nnbook/systems.html
  2. make sysid directory in kgp/kgp/datasets/ ( i.e. kgp/kgp/datasets/sysid/)
  3. load the mat file in python and save it as actuator.pkl (I have to save 'u' as 'X' and 'p' as 'Y') in this directory kgp/datasets/sysid/
  4. set your environment variable DATA_PATH to point to kgp/kgp/datasets (full path)

from keras-gp.

mathDR avatar mathDR commented on May 16, 2024

Thanks! I wrote a little script to transform the mat file, but it is trivial:

import scipy.io as sio
import cPickle

data = sio.loadmat('actuator.mat')
X = data['u']
Y = data['p']
newdata = {}
newdata['X'] = X
newdata['Y'] = Y
f = file('actuator.pkl', 'wb')
cPickle.dump(newdata, f, protocol=cPickle.HIGHEST_PROTOCOL)
f.close()

but that (of course) just dumps to the local directory (so you have to mkdir the sysid folder structure first and use it there).

Better yet would be to use something like the above and also get the data automatically:

import urllib
urllib.urlretrieve("http://www.iau.dtu.dk/nnbook/Files/actuator.mat","actuator.mat")

and run this in the setup file (with constructing the directory folder structure).

Let me know if you'd think this would be helpful (I could write a PR for it).

Also, I am currently running the example on my mac (10.11.6 El Capitan), so if you'd like setup instructions for doing so, I could provide them in the PR.

Dan

from keras-gp.

XYLee01 avatar XYLee01 commented on May 16, 2024

Hey Maruan, I run the programs in example directory, the same error occurs in each program

"Cannot find DATA_PATH variable in the environment. DATA_PATH should be the folder that contains kin40k/ directory with the data. Please export DATA_PATH before loading the data "

i cannot download any data from the example, could you tell where and how can i get those needed data?

from keras-gp.

alshedivat avatar alshedivat commented on May 16, 2024

@XYLee01, examples that use sysid data should run (they automatically retrieve and preprocess the data). If you want to run examples on kin40k, the data loader assumes that you already have that dataset (and DATA_PATH should correctly point to it). You can download kin40k data from Andrew Wilson's page (also, follow the instructions there on how to preprocess the dataset).

Of course, it would be nice to have an automatic data loader for kin40k that takes care of all preprocessing. I very much welcome contributions!

from keras-gp.

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.