Coder Social home page Coder Social logo

Grid search with SSPOC about pysensors HOT 6 CLOSED

dynamicslab avatar dynamicslab commented on July 4, 2024
Grid search with SSPOC

from pysensors.

Comments (6)

briandesilva avatar briandesilva commented on July 4, 2024 1

I think you've got it right—use sklearn grid search when the search space is small enough that grid search is feasible and use ray tune when the search space is larger. I'd recommend taking a look at section 5 of our paper for some practical tips (only a few paragraphs long).

from pysensors.

briandesilva avatar briandesilva commented on July 4, 2024

I'll look into this and get back to you in the next few days.

from pysensors.

janezlapajne avatar janezlapajne commented on July 4, 2024

Perfect, thank you! If you need anything else (data, more code etc.) let me know.

from pysensors.

briandesilva avatar briandesilva commented on July 4, 2024

I was able to reproduce the error, but I am not yet sure what the cause is. It might take me some time to get to the bottom of this. If you are blocked in the meantime, I'd recommend using a tool like Tune for hyperparameter optimization.

from pysensors.

briandesilva avatar briandesilva commented on July 4, 2024

@janezlapajne, try downloading the latest pysensors release—I just pushed a minor fix—and then replacing

search.fit(X_train, y_train)

with

search.fit(X_train, y_train, refit=False)

I think what's going wrong is the SSPOC model is failing to actually refit the classifier for new parameter combinations, and so it passes measurements of varying dimension to the same fixed classifier (SSPOC typically picks a different number of relevant sensors for each set of hyperparameters).

from pysensors.

janezlapajne avatar janezlapajne commented on July 4, 2024

Hello, thank you for your response. I installed a new version and the score is now available. Grid search seems to accurately find the best set of hyperparameters.

Also, thank you for a recommendation of the ray tune library. I personally use it when the set of hyperparameters is extensive enough. In case of simple tuning tasks and smaller datasets, I usually just directly use sklearn grid search (I find it easier to use). Do you think I should always just use tune? Anyways, if you have any additional recommendations about the tuning, I will really appreciate it! For the time being, I have an article on my bucket list, titled: PySensors: A Python Package for Sparse Sensor Placement, for which I am still waiting for the time to be able to read it.

from pysensors.

Related Issues (8)

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.