Giter VIP home page Giter VIP logo

picasso's People

Contributors

dvukolov avatar hmjianggatech avatar jasonge27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picasso's Issues

Two bugs spotted!

  1. in the python interface, size_act is set to size of (nlambda, d), however, it should be set to size (nlambda).
  2. in c code actgd.cpp, model_intercept is updated whatever use_intercept is set to true or false!

Link scale for Poisson models?

I was wondering what link scale is assumed for Poisson models? Is this a log link? If so, I was wondering if it would be hard to also support Poisson models with an identity link? I am asking because I am dealing with models where my noise is Poisson but where my covariates act additively rather than multiplicatively...

Threshold operator of MCP Reg

In

double threshold(double x) {
if (fabs(x) > fabs(m_gamma * m_lambda)) {
return x;
} else {
if (fabs(x) > fabs(2 * m_lambda)) {
return threshold_l1(x, m_gamma * m_lambda / (m_gamma - 1)) /
(1 - 1 / (m_gamma - 1));
} else {
return threshold_l1(x, m_lambda);
}
}
}

Shouldn't it be like this:
`double soft_thresh_mcp(double y, double lamb, double gamma){

if(fabs(y)>fabs(gamma*lamb)) {
    return y;
}else{
    return soft_thresh_l1(y, lamb)/(1-1/gamma);
}

}`

Support box or nonnegativity constraints?

Would it be possible for picasso in the future to also support box constraints on the fitted coefficients by any chance, similar to what glmnet can do using arguments lower.limits and upper.limits? E.g. to support nonnegativity constraints?

Running predict modifies the model

HI,

First off, thank you for putting this together. It has helped me understand SCAD and play around with the model.

I noted that after fitting the model using the Python module, running predict multiple times will change the model.

For example

>>> scadpath.result['beta'][4]
[ 6.56925953e-02  1.01571611e+03 -3.36603532e-11  3.20955197e-03
  4.31731825e+03 -7.09569678e-03 -9.05913159e-01  2.02699282e-17]
>>> predictionPath = scadpath.predict(X_train, lambdidx=4)
>>> scadpath.result['beta'][4]
[ 5.28674587e-02  2.13116762e+03 -4.48672601e-12  2.19283383e-03
  1.02795980e+04 -5.06569449e-03 -1.27797957e+00  6.91764767e-19]

Please let me know if I am misinterpreting the results in any way.

Thank you,

predictionScad = scad.predict(X_train)

Not working with big data

Thanks for such a fast package. I am using the python pycasso on a subset of big data for design matrix X. It works for X with dimensions 210,000 x 123,916 , but it fails with Segmentation fault for X with dimensions 235,495 x 123,916 (X is always a subset of the same data). Debugging with gdb shows
pycasso_bug

In the python the error is thrown in pycasso/core.py, line 209 in wrapper.
What do you suggest?

Default stopping precision

I've accidentally noticed that the default stopping precision differs across the files. The documentation states that the default value is 1e-7. At the same time the python package and some of the R routines set it to 1e-4. What should the default value be?

Any possibility to support long vectors?

I'm wondering if there's any possiblity that picasso supports long vectors so that it works with big matrices of many columns and rows (.e.g 22000000 rows, 120 columns, more elements than max integer).

It is unfortunate that glmnet does not support long vectors since it's not trivial to adapt its Fortran implementation to work with long vectors that uses double length.

Regularizer mapping is different in c_api and python interface

Greetings.

According to python-package/pycasso/lib/core.py, the mapping of regularizer is as follows:

  • MCP = 2, SCAD = 3, and 1 for others

However, in src/c_api/c_api.cpp, the mapping of regularizer is as follows:

  • L1 = 1, MCP = 2, SCAP for all the others

This will cause incompatible situations. An exception should be raised for number not in 1~3, and mapping logic should be the same.

On the other hand, when it comes to ActGDSolver::solve(), regfunc is determined by enum defined in include/picasso/solver_params.hpp. However, according to the cpp standard, the default value of enum is set to 0, which means L1 = 0, SCAD =1 and MCP = 2, and this will cause wrong regfunc to be applied.

Please correct me if I was wrong, thank you.
Wenny

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.