CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-orange3

Orange, a component-based data mining framework.

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

widgets.mddocs/

Visual Programming Widgets

Orange3 provides a comprehensive widget-based graphical interface for building data analysis workflows through drag-and-drop operations. Widgets are organized into categories and can be connected to create complex data processing pipelines.

Capabilities

Widget Categories

Orange3 widgets are organized into functional categories for different aspects of data analysis.

# Widget categories available through Orange Canvas:
# Orange.widgets.data - Data input/output and manipulation
# Orange.widgets.visualize - Data visualization  
# Orange.widgets.model - Machine learning models
# Orange.widgets.evaluate - Model evaluation
# Orange.widgets.unsupervised - Clustering and unsupervised learning

Data Widgets

Widgets for data input, output, and basic manipulation.

# Key data widgets (accessed through Orange Canvas GUI):
# - File: Load data from various file formats
# - Save Data: Export data to files
# - Data Table: View and edit data in tabular format
# - Select Columns: Choose which attributes to use
# - Select Rows: Filter data based on conditions
# - Data Sampler: Create random samples of data
# - Transpose: Transpose data matrix
# - Merge Data: Combine multiple datasets
# - Concatenate: Stack datasets vertically
# - Python Script: Custom Python code for data processing

Visualization Widgets

Widgets for creating various types of data visualizations.

# Key visualization widgets:
# - Scatter Plot: 2D scatter plots with various encodings
# - Box Plot: Box plots for continuous variables
# - Histogram: Distribution histograms
# - Bar Plot: Bar charts for categorical data  
# - Line Plot: Time series and line charts
# - Heat Map: Correlation and confusion matrices
# - Mosaic Display: Categorical variable relationships
# - Silhouette Plot: Clustering quality visualization
# - Tree Viewer: Decision tree visualization
# - CN2 Rule Viewer: Rule visualization
# - Nomogram: Linear model visualization
# - Linear Projection: 2D projections (PCA, LDA, etc.)
# - FreeViz: Interactive projection optimization
# - RadViz: Radial visualization
# - Distributions: Variable distribution plots
# - Statistics: Descriptive statistics tables

Model Widgets

Widgets for machine learning algorithms and model building.

# Classification widgets:
# - Tree: Decision tree classifier
# - Random Forest: Random forest classifier
# - SVM: Support vector machine
# - Naive Bayes: Naive Bayes classifier
# - Logistic Regression: Logistic regression
# - k-NN: k-nearest neighbors
# - Neural Network: Multi-layer perceptron
# - AdaBoost: AdaBoost ensemble
# - CN2 Rule Induction: Rule learning

# Regression widgets:
# - Linear Regression: Linear regression models
# - Tree: Decision tree regressor
# - Random Forest: Random forest regressor
# - SVM: Support vector regression
# - Neural Network: Neural network regression
# - Mean: Mean baseline regressor

# Model utilities:
# - Load Model: Load saved models
# - Save Model: Save trained models
# - Predictions: Apply models to make predictions

Evaluation Widgets

Widgets for model evaluation and performance assessment.

# Evaluation widgets:
# - Test and Score: Cross-validation and performance metrics
# - Predictions: Model predictions comparison
# - Confusion Matrix: Classification performance matrix
# - ROC Analysis: ROC curves and AUC scores
# - Lift Curve: Lift analysis for binary classification
# - Calibration Plot: Probability calibration assessment
# - Learning Curve: Performance vs. training size
# - Feature Importance: Feature importance scores

Unsupervised Learning Widgets

Widgets for clustering and other unsupervised learning tasks.

# Clustering widgets:
# - k-Means: k-means clustering
# - Hierarchical Clustering: Dendrogram-based clustering
# - DBSCAN: Density-based clustering
# - Louvain Clustering: Community detection

# Dimensionality reduction widgets:
# - PCA: Principal component analysis
# - Correspondence Analysis: Correspondence analysis
# - MDS: Multidimensional scaling
# - t-SNE: t-distributed stochastic neighbor embedding
# - Linear Projection: Various linear projections

# Association rules:
# - Associate: Frequent itemset mining

Data Preprocessing Widgets

Widgets for data transformation and preparation.

# Preprocessing widgets:
# - Preprocess: Multiple preprocessing options
# - Discretize: Convert continuous to discrete
# - Continuize: Convert discrete to continuous
# - Normalize: Feature scaling and normalization
# - Randomize: Shuffle data randomly
# - Feature Constructor: Create new features
# - Select Attributes: Feature selection methods
# - Rank: Rank features by importance
# - Impute: Handle missing values

Widget Infrastructure

Core classes and utilities for widget development.

class OWWidget:
    """Base class for all Orange widgets."""
    name = ""
    description = ""
    category = ""
    icon = ""
    
    def __init__(self): ...
    
    def set_data(self, data):
        """Set input data for the widget."""
        
    def commit(self):
        """Process data and send outputs."""

class Input:
    """Widget input definition."""
    def __init__(self, name, type, handler, **kwargs): ...

class Output:
    """Widget output definition."""
    def __init__(self, name, type, **kwargs): ...

def widget_discovery():
    """Entry point for widget discovery system."""

Widget Settings Management

Persistent storage for widget configurations.

# Settings are managed automatically for widgets
# Key setting types:
# - Setting: Basic persistent setting
# - ContextSetting: Setting that depends on data context
# - DomainContextHandler: Handler for domain-dependent settings
# - PerfectDomainContextHandler: Handler for exact domain matches

Usage Examples

# Orange3 widgets are primarily used through the Orange Canvas GUI
# However, widgets can be instantiated programmatically:

# Example of using a widget programmatically (not typical usage):
from Orange.widgets.data.owfile import OWFile
from Orange.widgets.model.owtree import OWTreeLearner

# Create file widget (normally done through GUI)
file_widget = OWFile()

# Load data (normally done by connecting widgets)
# file_widget.load_data("iris.tab")

# Create tree learner widget
tree_widget = OWTreeLearner()

# Set parameters (normally done through widget interface)
# tree_widget.max_depth = 5

# In the Orange Canvas GUI workflow:
# 1. Drag widgets from toolbox to canvas
# 2. Connect widgets by drawing lines between compatible inputs/outputs
# 3. Configure widget parameters through their interfaces
# 4. Data flows automatically through connections
# 5. Results update in real-time as parameters change

# Typical widget workflow in Orange Canvas:
# File → Data Table → [Preprocess] → [Feature Selection] → 
# [Split Data] → [Learner] → [Predictions] → [Test & Score]

# Widget connections example:
# - File.Data → Data Table.Data (view loaded data)
# - File.Data → Tree.Data (train decision tree)
# - Tree.Model → Predictions.Model (make predictions)
# - File.Data → Predictions.Data (data for predictions)
# - Predictions.Predictions → Confusion Matrix.Data (evaluate results)

# Custom widget example structure:
"""
from Orange.widgets import widget, gui
from Orange.widgets.settings import Setting

class MyCustomWidget(widget.OWWidget):
    name = "My Custom Widget"
    description = "Custom data processing widget"
    category = "Custom"
    
    # Widget inputs/outputs
    class Inputs:
        data = Input("Data", Table)
    
    class Outputs:
        processed_data = Output("Processed Data", Table)
    
    # Settings
    parameter = Setting(default_value=1.0)
    
    def __init__(self):
        super().__init__()
        
        # GUI elements
        box = gui.widgetBox(self.controlArea, "Parameters")
        gui.doubleSpin(box, self, "parameter", 0, 100, step=0.1,
                      label="Parameter:", callback=self.commit)
    
    @Inputs.data
    def set_data(self, data):
        self.data = data
        self.commit()
    
    def commit(self):
        if self.data is not None:
            # Process data based on parameter
            processed = self.process_data(self.data)
            self.Outputs.processed_data.send(processed)
    
    def process_data(self, data):
        # Custom processing logic
        return data
"""

print("Orange3 widgets are best used through the Orange Canvas GUI")
print("Launch Orange Canvas with: python -m Orange.canvas")
print("Widget categories: Data, Visualize, Model, Evaluate, Unsupervised")

Install with Tessl CLI

npx tessl i tessl/pypi-orange3

docs

classification.md

clustering.md

data-handling.md

distance.md

evaluation.md

index.md

preprocessing.md

projection.md

regression.md

widgets.md

tile.json