Closed giuseppedelnapalle closed 5 years ago
Hi,
I tried to use NSForest and I encountered the same issue.
In the dataframe NSForest_Results_Table_Fin
, the column f-measure
has type str, instead of float64, which results in the ranking function to fail in the following line:
NSForest_Results_Table_Fin["f-measureRank"] = NSForest_Results_Table_Fin.groupby(by="clusterName")["f-measure"].rank(ascending=False)
I solved this by not casting this column to str, ie I replaced the line
f1_store_1D_df = pd.DataFrame.from_dict(f1_store_1D, orient='index', dtype=str)
with
f1_store_1D_df = pd.DataFrame.from_dict(f1_store_1D, orient='index')
Thank you @Etienne92 for resolving this issue! I wasn't paying attention to the issues section, and I wasnt notified by email strangely. This issue was brought to my attention as well by co-worker, and it seems that the behavior of python2.7 when used as virtual env in python3 seems to not be identical to having an independent python 2.7 install. I am releasing a newer version of NS-Forest thats in python3 in an attempt to avoid these types of issues.
Hi,
I had an error when I ran the codes in cell 3 of the script 'NS_Forest_v2.ipynb' on Jupyter Notebook. Codes in cell 1 & 2 went smoothly. The following messages were printed on the screen.
What I did: I followed the Prerequisites in the README.md to install the modules and create the input file. A glance of the input file was shown below.
Software information: OS: Windows 10 Python version: 2.7.15
In addition, I tried running the script in CentOS 7 system and got the same error.
Would anyone help solve the issue? Any suggestion is welcome. Thanks!