Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Python ML Cheat Sheet Repo You'll Actually Use

Every ML beginner hits the same wall: you know what you want to do, but you can't remember the exact syntax. Is it fit_transform or transform ? Which scaler do I use for outliers? How do I plot a confusion matrix again? I got tired of Googling the same things, so I built a repo that has all of it in one place. ๐Ÿ”— github.com/Kavi274/python-ml-cheatsheets What's Inside 9 cheat sheets covering theโ€ฆ

This GitHub repository, Python-ML-CheatSheets, is a treasure trove for anyone learning machine learning. It contains nine comprehensive cheat sheets that cover every step of the ML process.

The foundation begins with NumPy, where you'll find guides on arrays, indexing, broadcasting, and linear algebra. For example, creating an array: `a = np.array([[1, 2, 3], [4, 5, 6]])`, and accessing specific elements: `a[a > 3]`, which returns `[4, 5, 6]`.

Pandas DataFrames follow, with functions like `groupby`, `merge`, and handling datetime and string operations. An example is summarizing sales and profit by city: `df.groupby('city').agg({'sales': 'sum', 'profit': 'mean'})`.

Scikit-learn's most popular models are cataloged here, along with pipelines for cross-validation and hyperparameter tuning. The repository provides ready-to-copy code for pipelines, such as:

```python

pipe = Pipeline([

('scaler', StandardScaler()),

('model', RandomForestClassifier())

])

pipe.fit(X_train, y_train)

```

Matplotlib and Seaborn are represented by visualizations like heatmaps and ROC curves, with copy-paste code provided.

The cheat sheet also covers data preprocessing, feature engineering including datetime features and SHAP-based selection, model evaluation with ROC, precision-recall curves, and calibration, and the basics of deep learning in Keras.

Lastly, there's a section on statistics for ML, from distributions and hypothesis testing to A/B testing and Bayes' theorem.

To use this resource, simply open any cheat sheet on GitHub and utilize the Ctrl+F function to find the needed information. If you prefer offline access, clone the repository with the command: `git clone https://github.com/Kavi274/python-ml-cheatsheets.git`.

The creator, Kavi, is open to contributions, especially for additional topics like PyTorch, XGBoost, LightGBM, time series, and HuggingFace Transformers. If this resource saves you from conducting Google searches, consider supporting the project by leaving a star on GitHub.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Automatic maintenance tasks controls the automatic optimizer statistics

Query to check the current state of jobs in CDB_AUTOTASK_CLIENT of the database, auto optimizer stats collection job is disabled in PDBs. SELECT COALESCE ( p .

  • Auto optimizer statistics collection disabled in PDBs by default
  • CDBAUTOTASKCLIENT view shows job disabled in PDBs
  • Only FRIDAYWINDOW enabled in PDB1, all disabled in PDB2

Charts as Epistemic Actions: Why Data Agents Need Visual Reasoning, Not Just Text Loops

Most data agents run ReAct loops that turn every intermediate reasoning step into text tokens. They query databases, summarize results, and chain tool calls, but they rarely generate or consume visualโ€ฆ

  • Charts are epistemic actions aiding agents in discovering next knowledge needs.
  • ReAct-style agents serialize intermediate states into text, missing visual reasoning.
  • Adding plotting tools to agents is simple, but getting them to use effectively is challenging.

Graphify: AST-Based Knowledge Graphs for Agent Code Navigation

Agents need to navigate codebases, SQL schemas, and documentation to answer questions like "which functions call this API endpoint?" or "what tables does this migration touch?" Vector embeddings giveโ€ฆ

  • Graphify provides AST-based knowledge graphs for agent code navigation.
  • Unlike vector embeddings, Graphify preserves structural relationships through deterministic edges.
  • The system parses code into ASTs, extracts entities, and offers query tools for agents.

More from Thursday 22 October โ†’