Tag: Python
44 articles
AI Research #134: Java 2025 - Will It Decline?
In 2025, Java remains the enterprise backend and critical industry workhorse.
AI Research #133: Java vs Kotlin/Go/Rust/Python/Node 2025
Comprehensive comparison of Java 21/23 (Virtual Threads/Loom) with Kotlin 2.x, Go 1.22/1.23, Rust 1.7x, Python (PyTorch 2.x/TensorFlow 2.x), Node.js 20/22.
AI Research #131: Java 17/21/25 Complete Comparison
Java 17 (2021), Java 21 (2023), Java 25 (2025) language and JVM changes, covering Virtual Threads (Project Loom), Records/Pattern Matching (Project Amber).
sklearn KMeans Key Attributes & Evaluation: cluster_cluster_centers_、inertia_、metrics
Scenario: Using sklearn for KMeans clustering, want to explain centroids/loss and use metrics for K selection.
Big Data 216 - KMeans n_clusters Selection
KMeans nclusters selection method: calculate silhouettescore and silhouette_samples on candidate cluster numbers (e.g.
Big Data 213 - Python Hand-Written K-Means Clustering
Scenario: Hand-write K-Means using NumPy/Pandas, perform 3-class clustering on Iris.txt and output centroids with clustering results.
Big Data 214 - K-Means Clustering Practice: Self-Implemented Algorithm vs sklearn
K-Means clustering provides an engineering workflow that is 'verifiable, reproducible, and debuggable': first use 2D testSet dataset for algorithm verification.
Big Data 211 - Scikit-Learn Logistic Regression Implementation
When using Logistic Regression in Scikit-Learn, max_iter controls maximum iterations affecting model convergence speed and accuracy.
Big Data 212 - K-Means Clustering Guide
K-Means clustering algorithm, comparing supervised vs unsupervised learning (whether labels Y are needed).
Big Data 209 - Deep Understanding of Logistic Regression
Logistic Regression (LR) is an important classification algorithm in machine learning.
Big Data 207 - How to Handle Multicollinearity
When using scikit-learn for linear regression, how to handle multicollinearity in least squares method.
Big Data 205 - Linear Regression Machine Learning Perspective
Linear Regression core chain: unify prediction function y=Xw in matrix form, treat parameter vector w as only unknown
Big Data 206 - NumPy Matrix Multiplication Hand-written Multivariate Linear Regression
pandas DataFrame and NumPy matrix multiplication hand-written multivariate linear regression (linear regression implementation).
Big Data 203 - sklearn Decision Tree Pruning Parameters
Common parameters for decision tree pruning (pre-pruning) in engineering: maxdepth, minsamplesleaf, minsamplessplit, maxfeatures, minimpuritydecrease.
Big Data 204 - Confusion Matrix to ROC: Imbalanced Binary Classification Metrics in sklearn
Confusion matrix (TP, FP, FN, TN) with unified metrics: Accuracy, Precision, Recall (Sensitivity), F1 Measure, ROC curve, AUC value, and practical business interpretation...
Big Data 201 - Decision Tree from Split to Pruning
Decision tree is a tree-structured supervised learning model, commonly used for classification and regression tasks.
Big Data 202 - sklearn Decision Tree Practice: criterion, Graphviz Visualization & Pruning
Complete flow of DecisionTreeClassifier on load_wine dataset from data splitting, model evaluation to decision tree visualization (2026 version).
LangChain-26 Custom Agent Complete Tutorial: Building a Custom Agent
A Custom Agent refers to an intelligent agent program customized by users based on specific requirements, which can execute specific tasks or workflows.
LangChain-24 AgentExecutor Comprehensive Guide
This article introduces how to use the Langchain library in Python for document retrieval, load web content, configure OpenAIEmbeddings, and integrate GPT-3.
LangChain-25 ReAct Framework Detailed Explanation and Integration Practice
This article introduces ReAct, a framework that uses logical reasoning and action sequences to achieve goal-oriented tasks through LLM decision-making and operations.
LangChain-22 Text Embedding and FAISS Practical Explanation
Text Embedding involves the process of mapping high-dimensional data (such as text, images, etc.) to lower-dimensional spaces.
LangChain-23 Vector AI Semantic Search System: Vector Databases and Retrieval
Vector Storage, also known as Vector Database, is a database system specifically optimized for storing and retrieving high-dimensional vector data.
LangChain-20 Document Loaders: TextLoader, CSVLoader, PyPDFLoader and More
This article introduces various document loaders provided by the LangChain library, such as TextLoader, CSVLoader, DirectoryLoader, etc., demonstrating how to load and pr...
LangChain Text Splitter: Character, Word, HTML and Code-based Splitting
This article introduces various TextSplitters in the LangChain library, including character-based, word-based, HTML tag-based, and programming language-based splitters...
LangChain Cache Mechanism: InMemoryCache and SQLiteCache Explained
LangChain provides a comprehensive caching mechanism to significantly reduce LLM call latency and costs. Its core includes InMemoryCache (in-memory cache) and SQLiteCache...
LangChain-19 TokenUsage Callback Function Explained
Explains how to integrate OpenAI GPT-3 model in Python through LangChain library, demonstrating how to use the getopenaicallback function to obtain callbacks and execute...
LangChain-16 Using Tools: Mastering LLM Tool Calling
LangChain is a powerful open-source framework designed to help developers more efficiently build and deploy applications based on Large Language Models (LLMs).
LangChain-17 Function Calling AI Function Calling Explained
Function Calling is a core technology for Large Language Models (like GPT-4, Claude, Gemini) to interact with external systems.
LangChain-14 OpenAI Content Moderation (Moderation) Explained
Moderation refers to the process of reviewing and managing user-generated content (UGC) through manual or automated means.
LangChain-15 Intelligent Knowledge Retrieval: AgentExecutor Practice
Build an intelligent knowledge retrieval system using Wikipedia search plugin, AgentExecutor, and LangChain tools. Covers agent initialization, tool binding...
LangChain-12 Routing By Semantic Similarity
This article introduces a method using large models (like OpenAI) and Prompt templates to handle unexpected inputs in program design by calculating the similarity between...
LangChain-13 Memory ConversationBufferMemory: Conversation Context Management
This article introduces how to use tools in the LangChain library to manage conversation context of large models in Python.
LangChain-11 Code Writing FunctionCalling: Autoregressive Language Modeling
This article introduces how GPT models work based on autoregressive language modeling, which generates coherent text by predicting the probability of the next token.
LangChain 09 - Query SQL DB with RUN GPT
RUN GPT provides a powerful database query function, allowing users to input natural language to query database content.
LangChain 10 - Agents Langchainhub Guide
This article introduces how to use LangChainHub's Hub mechanism through Python code to easily access and share Prompts.
LangChain 07 - Multiple Chains
How to use Runnable and Prompts in LangChain to create chainable conversation flows for multi-stage question answering, with practical examples of sequential and parallel...
LangChain 08 - Query SQL DB with GPT
This article introduces how to use LangChain framework to import Chinook SQLite database through Python script and use GPT model to execute SQL queries, such as calculati...
LangChain 05 - RAG Enhanced Conversational Retrieval
Conversational Search is an intelligent search technology that combines natural language processing and context understanding capabilities.
LangChain 06 - RAG with Source Document
Retrieval-Augmented Generation (RAG) with Source Document is an AI technology framework that combines retrieval with large language model generation.
LangChain 03 - astream_events Streaming Output with FAISS Practice
This article introduces how to use DocArrayInMemorySearch to vectorize text data, combined with OpenAIEmbeddings and GPT-3.5 model, to implement relevant information retr...
LangChain 04 - RAG Retrieval-Augmented Generation
This article explains in detail how to use RAG technology in LangChain, combined with OpenAI's GPT-3.5 model, to improve text generation quality through retrieval and gen...
LangChain 01 - Getting Started: Quick Hello World Guide
This article introduces how to use the LangChain library with OpenAI API and GPT-3.5-turbo model to create a template for generating jokes about specific topics (like cat...
LangChain 02 - JsonOutputParser and Streaming JSON Data Processing Guide
This article explains how to install and use LangChain and OpenAI API in Python, retrieve specified country and its population data through async functions.
Python Offline Deployment: pip Dependency Management Without Internet Access
How to export Python packages in an online environment and install them in an air-gapped system using pip wheel, pip download, and requirements.txt for offline deployment.