Coder Social home page Coder Social logo

onpls's People

Contributors

tomlof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

onpls's Issues

Some questions

Hi, Tommy,
(1) I used the example in resampling.grid_search() by Python 3.5.2:


np.random.seed(42)
n, p_1, p_2, p_3 = 4, 3, 4, 5
t = np.sort(np.random.randn(n, 1), axis=0)
p1 = np.sort(np.random.randn(p_1, 1), axis=0)
p2 = np.sort(np.random.randn(p_2, 1), axis=0)
p3 = np.sort(np.random.randn(p_3, 1), axis=0)
X1 = np.dot(t, p1.T) + 0.1 * np.random.randn(n, p_1)
X2 = np.dot(t, p2.T) + 0.1 * np.random.randn(n, p_2)
X3 = np.dot(t, p3.T) + 0.1 * np.random.randn(n, p_3)
X = [X1, X2, X3]

predComp = [[0, 1, 1], [1, 0, 1], [1, 1, 0]]
orthComp = [1, 1, 1]
onpls = OnPLS.estimators.OnPLS(predComp, orthComp)

params_grid = OnPLS.utils.list_product([0, 0, 0], [3, 3, 3])
OnPLS.resampling.grid_search(onpls, X,{"orthComp": params_grid})

it gave the following error:

Traceback (most recent call last):

  File "<ipython-input-12-6849f3f121c7>", line 17, in <module>
    OnPLS.resampling.grid_search(onpls, X,{"orthComp": params_grid})

  File "E:/Hai Windows/work/softwares/python_package/OnPLS-master\OnPLS\resampling.py", line 181, in grid_search
    name = names[i]

TypeError: 'dict_keys' object does not support indexing

(2) The same example in (1) works by Python 2.7.11, it gave the result below:
(<OnPLS.estimators.OnPLS at 0xa489128>, 0.88410078722573182, {'orthComp': [2, 2, 1]})

I was wondering how to tuning predComp and orthComp together by resampling.grid_search() ?

Thanks.

tests error

I download the package and run the test. it reports

FAIL: test_comparison_to_nPLS (tests.test_OnPLS.TestOnPLS)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/bioguo/Desktop/OnPLS/tests/test_OnPLS.py", line 86, in test_comparison_to_nPLS
    assert(np.linalg.norm(Xhat[0] - np.dot(t, p3.T)) < 5e-14)
AssertionError

get global, local and unique variance

I've been running your script and it seems that it runs without problems with my data. My question is: How can I get global, local and unique variance from the OnPLS model? (so far I'm including 3 tables but the idea is to use 7 - my main aim is to estimate the local variance between 1 table and the rest - I guess this can reduce the computing time, isn't it?)

OnPLS new version methods

Dear Prof.Tommy,
I was so excited to read your OnPLS paper and methods and I really want to use your package to do data analysis because this methods is very suitable for my data and study. But I have a question, if you have new version package for the methods, because it is hard to use python 3.4.3 for me. Thanks very much.

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.