Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use SCC or PCC #36

Open
sk-mohiuddin opened this issue May 16, 2023 · 3 comments
Open

Unable to use SCC or PCC #36

sk-mohiuddin opened this issue May 16, 2023 · 3 comments

Comments

@sk-mohiuddin
Copy link

from Py_FS.filter import SCC
fs=SCC(x.values,target)
print(fs.scores)

Above code shows 'None'. Is there anything that needs to change? How to calculate the score for either SCC or PCC?

@Ritam-Guha
Copy link
Owner

Thanks for the issue. I have published a new version: 0.2.1. Please install the new version and check. Please let me know if you find any problem with the new version.

@sk-mohiuddin
Copy link
Author

sk-mohiuddin commented May 17, 2023 via email

@SafwanAlselwi
Copy link

SafwanAlselwi commented Dec 29, 2023

#Need to add "results." before "solution" in binary classification otherwise you'll get
AttributeError: 'SCC' object has no attribute 'best_agent'

if(len(np.unique(test_Y))) == 2:
  # if it is binary classification, you will get a precision, recall and f1_score for each of the labels
  eval_result = evaluate(train_X, test_X, train_Y, test_Y, agent=results.solution.best_agent, classifier='knn', save_conf_mat=True)
else:
  # for a multi-class problem, you will get a avreaged precision, recall and f1_score
  # Options for averaging:
  # 1. macro
  # 2. weighted
  # 3. samples
  eval_result = evaluate(train_X, test_X, train_Y, test_Y, agent=results.solution.best_agent, classifier='knn', save_conf_mat=True, averaging="weighted")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants