Code Monkey home page Code Monkey logo

krlennon / mastercurves Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 2.0 1.93 MB

Python package for automatically superimposing data sets to create a master curve, using Gaussian process regression and maximum a posteriori estimation.

Home Page: https://krlennon-mastercurves.readthedocs.io/en/latest/

License: GNU General Public License v3.0

Python 100.00%
automation data-analysis gaussian-processes interpreatable-ai machine-learning maximum-a-posteriori python statistical-analysis uncertainty-quantification

mastercurves's People

Contributors

krlennon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mastercurves's Issues

Warning raised while executing mc.superpose()

Hi!

Thanks a lot for this piece of code and your presentation of it at the last AERC.

It works beautifully with my own data but I have a list of warnings raised when calling the superpose function.
They all look like these:

C:\Python39\lib\site-packages\sklearn\gaussian_process\kernels.py:430: ConvergenceWarning: The optimal value found for dimension 0 of parameter k1__k1__k1__k1__alpha is close to the specified upper bound 100000.0. Increasing the bound and calling fit again may find a better value.

C:\Python39\lib\site-packages\sklearn\gaussian_process\kernels.py:420: ConvergenceWarning: The optimal value found for dimension 0 of parameter k1__k1__k2__constant_value is close to the specified lower bound 1e-05. Decreasing the bound and calling fit again may find a better value.

Do you think it would be worth changing these bounds? I couldn't find where they are in mc.py

Convergence warning

Hello,

I have an issue when superposing some creep data with mastercurves. I optimized the kernel and transform parameters but on some date I get the following error message :
"C:\ProgramData\Anaconda3\lib\site-packages\sklearn\gaussian_process_gpr.py:659: ConvergenceWarning: lbfgs failed to converge (status=2):
ABNORMAL_TERMINATION_IN_LNSRCH.

Increase the number of iterations (max_iter) or scale the data as shown in:
https://scikit-learn.org/stable/modules/preprocessing.html
_check_optimize_result("lbfgs", opt_res)"

I tried to check how to increase maximum number of iterations in sklearn but I don't see how to implement this on the mastercurves module. I am supposed to modify "LogisticRegression()" by adding the argument "max_iter" with its new value.

I have to admit that I am quite new at coding with pyhton and I am a bit lost. Could you help me changing those parameters or solving this issue ?

Thanks in advance.

Installation Problem

Dear developer,
I would like to thank you for developing this package. I have an issue with installing it. I have tried to install the package on Windows 10, Visual Studio Code using "pip install mastercurves" in terminal and got this error:
image

I have python 3.9 installed on my laptop.
I would appreciate if you could help me to solve the problem. Thank you in advance.
Regards,
Javad

Feedback and questions

This repo is terrific! Neat work. I am trying to generate master curves using this tool for my research. A few initial thoughts:

  • Examples from the "demos" folder do not have labels for the plots generated by "mc.plot()". That makes it challenging to recognize the plots and associated transformations initially.
  • Can you add more documentation/manual for the code for beginners? E.g., what variables to access to get the scaling parameter value?
  • I am facing issues with replicating the diffusion from the point source example in the paper. I have attached my code. It would be great if you could help me replicate the example, pointing me in the right direction to use this tool.
import matplotlib
from matplotlib import pyplot as plt
from mastercurves.transforms import Multiply
from mastercurves import MasterCurve

def func(x,t):
	c = (1/np.sqrt(4*np.pi*t))*np.exp(-(x**2)/4*t)
	return c

x1 = np.linspace(0.1,2)
ct1 = np.array([func(i, 1) for i in x1])
ct2 = np.array([func(i, 2) for i in x1])
ct3 = np.array([func(i, 3) for i in x1])
ct4 = np.array([func(i, 4) for i in x1])

dataX = [x1, x1, x1, x1]
dataY = [ct1, ct2, ct3, ct4]

dataX_log = [np.log(i) for i in dataX]
dataY_log = [np.log(i) for i in dataY]

t_states = [1,2,3,4]

mc = MasterCurve()
mc.add_data(dataX_log, dataY_log, t_states)
mc.set_gp_kernel(mc.kernel)
# mc.add_vtransform(Multiply())
mc.add_htransform(Multiply())
mc.superpose()
mc.plot()
plt.show()

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.