Giter Site home page Giter Site logo

lssvr's Issues

lsmr not being used on multidimensional regression

In PR #9 for multidimensional output. scipy's lsmr only accepts b as a vector, so in this scenario, it raises a ValueError and it is completely bypassed and the more expensive pinv is used.

I think this should be addressed. I am thinking of tackling this by using numpy's lstsq that supports 2-dimensional 'b', or the other alternative would be to use lsmr on each slice of 'b'. Something like this:

try:
    if len(shape)>1:
        z = np.linalg.lstsq(D.T, t, rcond=None)[0]
    else:
        z = linalg.lsmr(D.T, t)[0]
except:
    z = np.linalg.pinv(D).T @ t

or if we stick to lsmr, something like this:

try:
    if len(shape)>1:
        z = np.column_stack([linalg.lsmr(D.T, t_slice)[0] for t_slice in t.T])
    else:
        z = linalg.lsmr(D.T, t)[0]
except:
    z = np.linalg.pinv(D).T @ t

No pip install

Hey, it seems the project isn't available through pip install!

How can i get the coef like SVR in your code(LSSVR)

Hello, when I use LSSVR for regression prediction, I will get a multiple regression coefficient equation. How can I get regression coefficients when using your code?

When i use the SVR i get it with the code :svr.coef_

svr = SVR(kernel='linear', coef0=0, C=0.5)
svr.fit(x,y)
svr.coef_

So,how can i get the coef like SVR in your code(LSSVR)? Thank u

Support for multidimensional target

Hey! I made some modifications to my fork to allow for multidimensional targets! Could you take some time to review if they are sound? As I don't fully understand the code yet. The commit with the changes is here.

I am particularly interested in the reason behind the .ravel() on line 57. I don't see the effect of it, as in your implementation t is a one-dimensional vector.

I am working on a simulation dataset and the results are sound. If you want I could share the use case.

Support for 3.6.9?

Hello again, I am trying to install this on google colab with poetry but it fails as the project requires 3.8^ . Is there any version difference that makes the package not run on <3.8?

[feature] Add Poetry as dependency management system and packaging

So, I verified that you do not use any requirements.txt file or even a pyproject.toml file.

To make your code more easily reproducible, I thought about contributing to your project adding a setup using poetry. Besides that, using poetry, you can create .whl files and distribute your package.

To solve this issue, the following points need to be resolved:

  • Create of the pyproject.toml with the necessary information about dependencies
  • Document changes into the README.md to show the package building process

fit() got an unexpected keyword argument 'kernel'

Hai!

I get an issue when i trying to use this packages when i run :
model = LSSVR()
model.fit(X_train, y_train, kernel='linear')
y_hat = model.predict(X_test)
y_hat = model.predict(X_test)
print('LSSVR\nMSE', mean_squared_error(y_test, y_hat))
print('R2 ',model.score(X_test, y_test))

i got an error like this :

TypeError Traceback (most recent call last)
in
1 model = LSSVR()
----> 2 model.fit(X_train, y_train, kernel='linear')
3 y_hat = model.predict(X_test)
4 y_hat = model.predict(X_test)
5 print('LSSVR\nMSE', mean_squared_error(y_test, y_hat))

TypeError: fit() got an unexpected keyword argument 'kernel'

how can i solve it?

thanks.

Neo LS-SVM

Hi there, since this is one of the very few LS-SVM implementations, I thought you might be interested to know that I've recently released a new LS-SVM package called Neo LS-SVM. The idea is that LS-SVMs have a lot of untapped potential, but that they could use a little more love ❤️ now that most of the attention is going to deep learning and gradient-boosted decision trees. Hope it's useful to you!

pip install warning

Thanks for your work! I met a issue as shown in following when I was trying install this library.
So I wonder that whether others have the same problem.
Uploading warning sreenshot.jpg…

Uploading warning sreenshot.jpg…

looking forward to classifier

Great work ! meanwhile I wanna see how LSSVM work in the classifier, the published LSSVR is very convenient, looking forward to LSSVC. ;D

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.