sebhaan / DoEgen

DoEgen: A Python Library for Optimised Design of Experiment Generation and Evaluation
Other
76 stars 15 forks source link

DataFrame' object has no attribute 'to_markdown #1

Closed saraemp closed 3 years ago

saraemp commented 3 years ago

I managed to install DoEgen but when I ran $ python -m doegen.doeval test/settings_expresults_test.yaml

I got an error saying AttributeError: 'DataFrame' object has no attribute 'to_markdown'

Please find below the complete output

(base) 6250L-135716-M:DoEgen smoron$ python -m doegen.doegen test/settings_design_test.yaml using settings in: 'test/settings_design_test.yaml' Number of total combinations (Full Factorial): 2916 Perfect time for a cup of tea. Total estimated runtime: 3.33minutes

Optimizing array for 12 runs ... Niteration: 7187 /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) Center Balance : 100.00 Level Balance : 100.00 Orthogonal Balance: 5.59 Two Level interaction Balance: 55.75 Two Level Interaction Minimum One: 92.66 D-efficiency : 0.00 D1-efficiency : 55.39 D2-efficiency : 0.00 A-efficiency : 23.42 A1-efficiency : 36.63 A2-efficiency : 100.00 Average Canonical Corr: 0.22 Maximum Canonical Corr : 0.67

Optimizing array for 18 runs ... Niteration: 6609 /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) /usr/local/anaconda3/lib/python3.7/site-packages/sklearn/crossdecomposition/pls.py:338: RuntimeWarning: invalid value encountered in true_divide / np.dot(y_scores.T, y_scores)) Center Balance : 96.30 Level Balance : 97.22 Orthogonal Balance: 70.26 Two Level interaction Balance: 93.25 Two Level Interaction Minimum One: 100.00 D-efficiency : 0.00 D1-efficiency : 73.09 D2-efficiency : 0.00 A-efficiency : 37.50 A1-efficiency : 68.29 A2-efficiency : 100.00 Average Canonical Corr: 0.07 Maximum Canonical Corr : 0.17


Finished optimising all possible run sizes. Saving efficiencies and design arrays as csv files.... Finding minimum, optimal and best designs... Saving minimum, optimal, and best design as experiment design tables...

RESULTS OVERVIEW:

Best Exp Design Runsize: 18

Efficiencies:

Traceback (most recent call last): File "/usr/local/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/usr/local/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/smoron/DoEgen/doegen/doegen.py", line 1013, in main_cli() File "/Users/smoron/DoEgen/doegen/doegen.py", line 1009, in main_cli main(**cfg) File "/Users/smoron/DoEgen/doegen/doegen.py", line 990, in main print_designselection_summary(results) File "/Users/smoron/DoEgen/doegen/doegen.py", line 781, in print_designselection_summary print(dfsummary.to_markdown(), file=fout) File "/usr/local/anaconda3/lib/python3.7/site-packages/pandas/core/generic.py", line 5179, in getattr return object.getattribute(self, name) AttributeError: 'DataFrame' object has no attribute 'to_markdown'

sebhaan commented 3 years ago

This seems to be due to happen with an old version of pandas and should be solved by updating pandas. The pandas.DataFrame.to_markdown is new since Pandas version 1.0.0. See DoEgen requirements.txt for the dependency version.