<jupyter_start><jupyter_text>Conditions<jupyter_code>from numpy import array
import pandas
# from hillfit import HillFit
%run ../hillfit/fitting.py
%matplotlib inline

# import and prepare the mohfing data
data = pandas.read_csv(open(r'processed_data.csv'))
xs = [x for x in data['time (hr)'] if x != 0]
ys = [y for y in data['oxidation_proportion'] if y != 0]

# execute the Hillfit module
hf = HillFit(xs, ys)
x_label = 'hours'
y_label = 'reduction'<jupyter_output><empty_output><jupyter_text>Logarithmic x-axis<jupyter_code># execute the fit
title = 'Linear fitted Hill equation for porphyrin PDI'
hf.fitting(x_label, y_label, title, log_x = True)
hf.export(export_name = 'hillfit-reg-logarithmic')
print(hf.equation)

# evaluate the outputs
x = 6.4
print(f'eval() prediction at {x} hours:', eval(hf.equation))
print('R\N{superscript two}:',hf.r_2)
print('\ntop:', hf.top)
print('bottom:', hf.bottom)
print('ec50:', hf.ec50)
print('nH:', hf.nH)<jupyter_output>C:\Users\<NAME>\Dropbox\My PC (DESKTOP-M302P50)\Documents\UVic Civil Engineering\PDIpy\hillfit\hillfit\fitting.py:95: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
  self.figure.show()<jupyter_text>Linear x-axis<jupyter_code># execute the fit
hf = HillFit(xs, ys)
y_label = 'log-reduction'
title = 'Linear fitted Hill equation for porphyrin PDI'
hf.fitting(x_label, y_label, title, log_x = False)
hf.export(export_name = 'hillfit-log-regression')
print(hf.equation)

# evaluate the outputs
x = 6.4
print(f'eval() prediction at {x} hours:', eval(hf.equation))
print('R\N{superscript two}:',hf.r_2)
print('\ntop:', hf.top)
print('bottom:', hf.bottom)
print('ec50:', hf.ec50)
print('nH:', hf.nH)<jupyter_output>C:\Users\<NAME>\Dropbox\My PC (DESKTOP-M302P50)\Documents\UVic Civil Engineering\PDIpy\hillfit\hillfit\fitting.py:95: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
  self.figure.show()
{'fraction_non_alphanumeric': 0.1474767270945615, 'fraction_numerical': 0.014698677119059285, 'mean_word_length': 6.041379310344827, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '379975', 'license': 'MIT', 'n_tokens_mistral': 794, 'n_tokens_neox': 764, 'n_words': 183, 'path': 'examples/modeling_data.ipynb', 'repo_name': 'bilalshaikh42/hillfit', 'size': '2063'}