stem/CS/Languages/Python.md
Andy Pack ccb8dbed5b vault backup: 2023-12-27 18:21:52
Affected files:
.obsidian/graph.json
.obsidian/workspace.json
Projects/Dev Options.md
Projects/Mixonomer.md
Projects/Projects.md
Projects/Selector.md
STEM/CS/Languages/Python.md
STEM/To Read About.md
2023-12-27 18:21:52 +00:00

1.8 KiB

tags
dev
py

pip freeze | %{$_.split('==')[0]} | %{pip install --upgrade $_}

From <https://www.activestate.com/resources/quick-reads/how-to-update-all-python-packages/>

poetry cheat sheet

Twisted #net

Network engine

numpy scipy jupyterlab matplotlib pandas scikit-learn

Nuitka

Compiler

Plotly

Publication-quality Graphs

NLTK #ai NLP

If you are not getting good results, you should first check that you are using the right classification algorithm (is your data well fit to be classified by a linear SVM?) and that you have enough training data. Practically, that means you might consider visualizing your dataset through PCA or t-SNE to see how "clustered" your classes are, and checking how your classification metrics evolve with the amount of data your classifier is given.

If you then confirm that investing in tweaking your linear SVM is the right way to approach your problem, you can look at modifying the class weights. Note then that what you suggest as weights is probably the opposite of what you want to do: you are giving more weights to less frequent classes, marginalizing them further - said differently, you typically want to use weights that are inversely proportional to class frequencies. You can calculate these manually, or you can let sklearn do it automatically for you by specificing class_weight='balanced'.

From <https://stats.stackexchange.com/questions/254779/optimal-class-weight-for-svc>