Code Monkey home page Code Monkey logo

Comments (2)

nikhil003 avatar nikhil003 commented on August 22, 2024 3

Not sure if you have already solved the problem. A simple solution would be to use python csv reader or numpy and then write it as pickle. However, in saying so, it is difficult to suggest a solution without looking at the data structure.

Secondly, even if you convert it to pickle, the pickle should provide the data in a format as expected by the functions you are calling from SkillMetrics package. I think you have looked through the test cases, which use pickle as the data used is stored in such fomat.

However, if you look further below, you can see

    taylor_stats1 = sm.taylor_statistics(data.pred1,data.ref,'data')
    taylor_stats2 = sm.taylor_statistics(data.pred2,data.ref,'data')
    taylor_stats3 = sm.taylor_statistics(data.pred3,data.ref,'data')

where, it just expects 1D numpy array. I would suggest you to use numpy arrays. A simple example would be something like this

data = np.loadtxt("file.csv", delimiter=',')
taylor_stats1 = sm.taylor_statistics(data[:,1],data[:, 0],'data')

Here, I have assumed that your csv file has two columns, where first column is observed data and second column is model data. Also, I have assumed at it is comma separated.

from skillmetrics.

PeterRochford avatar PeterRochford commented on August 22, 2024

You don't need to convert your csv file to pkl. I would directly read the csv file into Python using pandas or some other package. I'm sure you can find many examples on the Internet on how to do this. Then just store your data columns into lists and pass these to the taylor_statistics function. Using the loadtxt example above this would be

taylor_stats1 = sm.taylor_statistics(data[:,1],data[:, 0])

from skillmetrics.

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.