Sunday, July 26, 2026

Sentiment Analysis of Robotic Surgery System using Data from Website 'OpenAlex'

 



Sentiment Analysis of Robotic Surgery Research Using OpenAlex

Robotic surgery has become one of the most exciting advancements in modern medicine. Systems like the da Vinci, Versius, and Senhance promise greater precision, smaller incisions, and faster patient recovery. But how is the research community truly reacting to this technology? To find out, we can use two powerful open tools: Sentiment Analysis and OpenAlex.What is Sentiment Analysis?Sentiment Analysis is a branch of Natural Language Processing (NLP) that automatically determines whether a piece of text expresses a positive, negative, or neutral tone. In research and healthcare, it helps us understand overall academic and clinical opinion without manually reading hundreds of papers.What is OpenAlex?OpenAlex is a free, massive, open catalog of the world’s scientific literature. It indexes millions of research papers, authors, and citations. Its public API allows anyone to search and retrieve the latest academic publications — making it an excellent resource for real-time research intelligence.What Did We Find About Robotic Surgery Systems?We analyzed the 10 most recent research articles related to robotic surgery systems using OpenAlex and VADER sentiment analysis. 

Key Observations:

While many papers continue to highlight the advantages of robotic surgery — such as improved precision, better ergonomics for surgeons, and enhanced visualization — the overall sentiment in the latest research leans mixed to cautious.

Common Concerns Highlighted in Recent Papers:

  • High acquisition and maintenance costs, limiting accessibility especially in developing countries and smaller hospitals.
  • Steep learning curve for surgical teams, which can affect initial patient outcomes.
  • Need for more long-term clinical data on safety, effectiveness, and cost-effectiveness.
  • Technical limitations in certain complex procedures.
This reflects a healthy stage in the technology’s development: the initial hype is giving way to critical evaluation and calls for more rigorous evidence.Why This Approach Is ValuableCombining OpenAlex with Sentiment Analysis offers a fast, data-driven way to monitor how emerging medical technologies are perceived by the scientific community. It helps:
  • Medical device companies identify improvement areas
  • Hospitals make informed purchasing decisions
  • Researchers spot gaps for future studies
As robotic surgery continues to evolve, keeping a pulse on research sentiment will be crucial for responsible innovation.



Python Code used

import requests
import pandas as pd
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from datetime import datetime

# Initialize Sentiment Analyzer
analyzer = SentimentIntensityAnalyzer()

def get_latest_robotic_surgery_articles(per_page=10):
    url = "https://api.openalex.org/works"
    
    params = {
        "search": "robotic surgery OR da vinci OR versius OR senhance OR robotic-assisted surgery",
        "per_page": per_page,
        "sort": "publication_date:desc",   # Latest first
        "filter": "type:article"
    }
    
    response = requests.get(url, params=params)
    
    if response.status_code != 200:
        print("API Error:", response.status_code)
        print(response.text)
        return None
    
    data = response.json()
    results = []
    
    for paper in data.get('results', []):
        abstract = paper.get('abstract') or "No abstract available"
        
        # Sentiment Analysis
        scores = analyzer.polarity_scores(abstract)
        compound = scores['compound']
        
        if compound >= 0.05:
            sentiment = "Positive"
        elif compound <= -0.05:
            sentiment = "Negative"
        else:
            sentiment = "Neutral"
        
        results.append({
            'OpenAlex_ID': paper.get('id', 'N/A').split('/')[-1],
            'Full_Title': paper.get('title', 'No title'),
            'Publication_Date': paper.get('publication_date'),
            'Year': paper.get('publication_year'),
            'Citations': paper.get('cited_by_count', 0),
            'Sentiment': sentiment,
            'Sentiment_Score': round(compound, 3),
            'Abstract': abstract[:380] + "..." if len(abstract) > 380 else abstract
        })
    
    df = pd.DataFrame(results)
    return df

# ========================
# Run Analysis
# ========================

print("🔍 Fetching the 10 Latest Articles on Robotic Surgery Systems...\n")

df = get_latest_robotic_surgery_articles(per_page=10)

if df is not None and not df.empty:
    # Display results
    pd.set_option('display.max_colwidth', None)
    display(df[['OpenAlex_ID', 'Full_Title', 'Publication_Date', 'Citations', 'Sentiment', 'Sentiment_Score']])
    
    print("\n" + "="*65)
    print("OVERALL SENTIMENT SUMMARY (Latest 10 Articles)")
    print("="*65)
    print(df['Sentiment'].value_counts())
    print(f"Average Sentiment Score: {df['Sentiment_Score'].mean():.3f}")
    
    # Optional: Save to CSV
    df.to_csv("latest_robotic_surgery_articles.csv", index=False)
    print("\n✅ Results saved to 'latest_robotic_surgery_articles.csv'")
else:
    print("No articles found.")


Thursday, May 14, 2026

Try to Understand Boundary Conditions in FEM Using a Simple 1D Bar


In Finite Element Method (FEM), boundary conditions define how a structure interacts with its surroundings. They are essential because, without them, the FEM system cannot produce a unique physical solution.

Consider a simple 1D bar with 3 nodes and 2 elements:

Node 1        Node 2        Node 3
|-------------|-------------|

In this example:

  • the left end is fixed,
  • and a force is applied at the right end.

Dirichlet Boundary Condition

At Node 1:

u1=0u_1 = 0

This means the displacement is fixed to zero. This is called a Dirichlet boundary condition because the displacement value is prescribed directly.

In the Python code:

fixed_dofs = [0]

This prevents the bar from moving freely.


Neumann Boundary Condition

At Node 3:

F3=1000 NF_3 = 1000\text{ N}

This specifies an external force acting on the bar. This is called a Neumann boundary condition.

In the code:

F = np.array([0, 0, 1000.0])

FEM Equation

The FEM system is written as:

[K]{u}={F}[K]\{u\} = \{F\}

where:

  • [K] is the stiffness matrix,
  • {u} is the displacement vector,
  • {F} is the load vector.

The local stiffness matrix for each element is:



The Python code assembles these into the global matrix and solves for the unknown displacements.


Why Boundary Conditions Matter

Without the fixed support, the entire bar could move freely, making the stiffness matrix singular and the FEM problem unsolvable.

Boundary conditions:

  • define supports and loads,
  • remove rigid body motion,
  • and ensure a meaningful solution.

In this simple example:

  • the fixed support is a Dirichlet condition,
  • the applied force is a Neumann condition.

Understanding these concepts is fundamental to learning FEM.

Friday, May 8, 2026

Understanding Nodal Interpolation vs L² Projection in Finite Element Method (FEM)




                                                        Figure 1: 2D Comparison



Figure 2: 1D Comparison


When solving engineering problems using the Finite Element Method (FEM), we often need to represent a continuous physical field (temperature, stress, velocity, etc.) on a discrete mesh. Two common ways to do this are nodal interpolation and L² projection.

The Exact FunctionFor demonstration, we used the following 2D oscillatory function as our "true" or exact solution:
f(x,y)=sin(2πx)cos(2πy)+0.8sin(4πx)sin(4πy)

This function contains multiple waves, making it a good test case to see how well different approximation techniques perform.1. Nodal InterpolationNodal interpolation is the simplest approach. We evaluate the exact function only at the mesh nodes and then use linear shape functions to create a piecewise linear surface across each triangle.
Characteristics:
  • The approximated surface passes exactly through the nodal values.
  • Easy to implement.
  • Can be "peaky" or overshoot/undershoot between nodes, especially on coarse meshes.
2. L² ProjectionL² projection finds the best possible piecewise linear function (in the finite element space) that approximates the exact function in the least squares sense.Mathematically, it minimizes the L² norm of the error:


This is achieved by solving a linear system involving the mass matrix M and the load vector b.Characteristics:
  • Does not necessarily pass exactly through the nodal values of the exact function.
  • Usually provides a smoother and more accurate overall approximation.
  • Better at capturing average behavior across each element.
Visual ComparisonI generated three 3D plots for the same coarse triangular mesh:
  • Left: Exact function — smooth and wavy.
  • Middle: Nodal Interpolation — follows the nodes but shows visible faceting and local inaccuracies.
  • Right: L² Projection — visibly smoother and closer to the true surface in the least-squares sense.
Even with a relatively coarse mesh, the difference between simple interpolation and L² projection is noticeable. L² projection generally reduces the overall error when representing continuous fields in FEM.Why Does This Matter?In real FEM simulations, we rarely have the "exact" solution. However, understanding these concepts helps engineers:
  • Choose proper post-processing techniques
  • Reduce approximation errors
  • Better interpret results from simulation software
Takeaway:
While nodal interpolation is fast and intuitive, L² projection often gives a superior representation of the solution — especially when accuracy across the entire domain is important.


References:
1. Larson, M. G., & Bengzon, F. (2013). The Finite Element Method: Theory, implementation, and applications. In Texts in computational science and engineering. https://doi.org/10.1007/978-3-642-33287-6
2. Grok