Open paulrougieux opened 2 months ago
Dear Paul,
your suggestion is a good one and would make ProMCDA another level of a tool. Our idea, also in line with your approval, is to publish the article with the current version of ProMCDA. However, the intention is to refactor ProMCDA so that it becomes a Python library, with its methods, so that it can also be used interactively and expose results.
Stay tuned! ;-)
@kapil-agnihotri @mspada
Python is an interactive language. It would be nice to have access to the objects and data frames used during the computation. The current version writes the scores data frames to csv files which can be then opened in a spreadsheet, but what if the user wants to open them in python for further processing or comparison with other tools?
Current status
For example the data frames scores and normalised_scores are written to csv files in utils_for_main.py#L1201. The current version runs as a standalone script as explained in the example in REAMDE.md. It then exits with the following log :
Proposal
It would be great to have direct access to the scores data frame in an interactive session. The README could explain how to run mcda in an interactive python session or notebook by importing it in python with an import statement such as
Note:
main
is probably not a good function name in this new use case. The function should be renamed tomcda_run
for example. Then it should probably refactored into an object which has properties that contain the scores data frame. For example one would access themcda_run
object properties from within the python session (or notebook) withmcda_run.scores
.