dynamicslab / pysensors Goto Github PK
View Code? Open in Web Editor NEWPySensors is a Python package for sparse sensor placement
Home Page: http://python-sensors.readthedocs.io/
License: MIT License
PySensors is a Python package for sparse sensor placement
Home Page: http://python-sensors.readthedocs.io/
License: MIT License
In the cost_constrained_qr algorithms, there must be an assertion or an IOError if the number of sensors is greater than the number of samples, this will cause the current implementation after the sensors exceed the number of samples (i.e., after 300 in the notebook example) will start ignoring the constrained area. Of course, this is a rare occasion, primarily since the whole idea is based on sparsity, but some users might have limited samples and might still try this.
To reproduce this issue, go to the ./examples/cost_constrained_qr.ipynb
and change n_sensors
to 350, you will see sensors start to be placed in the constrained areas.
Dear team,
Firstly, many thanks for your fantastic work on SSPOC and also for providing this package. This is indeed a beneficial resource.
I am currently using PySensors to find the minimal sensors required for a classification task. However, instead of running this directly on the actual sensor count, I intend to input the extracted features and then select the number of sensors.
Specifically, I have data from 20 sensors, and I calculate 100 features/sensor. This results in a matrix with 2000 columns. In other words, the SSPOC algorithm treats this as a problem with 2000 sensors. While the 'selected_sensors' lists the particular feature that can be traced back to the corresponding sensor. I would be grateful if you could please link me to any inbuilt function for grouping the sensors or any other voting mechanism that I may use or implement?
Thanks a lot for your time.
Is there any package update? I tried to use cross validation as your example but no 'SensorSelector' module is assigned to pysensor.
Dear team,
Thank you for the extensive work that has gone into this package. I wanted to try and clarify the Vandermonde example (polynomial interpolation) in the documentation so that I may better understand the functionality of this package.
Thank you for your time and help.
-Kennan Hodovic
While reviewing your toolbox for JOSS I found out that the reconstruction example in the README.rst is outdated:
>>> model = pysensors.Sensorselector(n_sensors=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'pysensors' has no attribute 'Sensorselector'
I think pysensors.Sensorselector
has been renamed to pysensors.reconstruction.SSPOR()
.
Hello, as I have seen in example pysensor supports sklearn based parameters optimization. In the example, it is shown how the parameter tuning is performed for SSPOR. However, I would like to perform it for SSPOC, but for now I was unable to do so. At the end of optimization it throws me an error: ValueError: w must be a 1D vector; received a vector of dimension 0
which is implemented in pysensors\utils\_optimizers.py
. Furthermore, scores which are calculated during grid search are all nan values.
I am attaching simple code snippet in case anyone could help. I hope I will not have to code grid search manually.
model_clf = LinearDiscriminantAnalysis()
model_cs = SSPOC(classifier=model_clf)
param_grid = {
"basis": [ps.basis.Identity(), ps.basis.SVD(), ps.basis.RandomProjection()],
"basis__n_basis_modes": [1,2,3,4,5],
"n_sensors": [5,2,3]
}
cross_val = RepeatedStratifiedKFold(n_splits=5, n_repeats=3, random_state=1)
search = GridSearchCV(estimator = model_cs,
param_grid = param_grid,
scoring = "balanced_accuracy",
n_jobs = -1,
cv = cross_val,
refit = True,
verbose = 0,
)
search.fit(X_train, y_train)
print("---------------------------------------")
print("Best parameters:")
for k, v in search.best_params_.items():
print(f"{k}: {v}")
print("")
Awesome work you guys do in your research groupπππ
I am looking into a case quite similar to what I have seen from your group - The von Karman example.
Suppose I have the von Karman example of flow past a cylinder and wish to do SSPOR based on a minimal number of sensors. The challenge in my case is that I have an additional dimension to my data. Basically, I have the spatial-temporal snapshots for a bunch of different boundary conditions (or flow points if you like) and I am looking to find the best sensor placement to reconstruct the entire transient pressure field (for a given sensor input) and not just an instance. Can pySensor handle that?
Hope it makes sense
Dear developer team
First of all, many thanks for the Py Sensors packages and the detailed and very clear examples! I am using SSPOR to optimize a hydrographs observation network. My data set consists of 480 sensors with 1304 features each. Now I would like to make reconstruction with more than 480 SVD basis modes (p>r). In the paper of Manohar e al (2018) I have found out that the oversampled case can be handled with ΟrΟrT. This should allow a maximum of 1304 basis modes?! Is there a possibility to integrate this into the SSPOR functionality?
Thanks for your help!
Marc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.