Gerardo Gonzále Aguilar

Gerardo Gonzále Aguilar

$15/hr
Chemist and IT trainee
Reply rate:
60.0%
Availability:
Hourly ($/hour)
Location:
Maia, Porto, Portugal
Experience:
34 years
Gerardo González Aguilar GitHub: https://github.com/g-gle-a | LinkedIn: https://www.linkedin.com/in/gerardogleza RPubs: https://rpubs.com/g_glez | ORCID: https://orcid.org/- ResearcherID: https://publons.com/researcher/-/gerardo-gonzalez/ | Scopus: https://www.scopus.com/authid/detail.uri?authorId=- Nationality: Cuban/Portuguese | Born: June 19, 1968, Camagüey, Cuba Professional Summary Analytical and research-driven professional with over 20 years of experience spanning chemistry, materials science, and data analytics. Skilled in statistical modeling, machine learning, and programming (R, C, Python), with a strong foundation in scientific research and experimental data interpretation. Adept at applying quantitative methods and automation to problem-solving across R&D, IT, and analytics environments. Core Competencies • Data Analytics & Machine Learning: Data wrangling, exploratory analysis, regression/classification, visualization, predictive modeling (R, Python). • Programming: R, C, Python, Pascal, Assembler, SQL, Bash scripting. • Statistical Tools & Libraries: R (caret, ggplot2, dplyr), pandas, scikit-learn, NumPy. • Software & Systems: Linux, Windows, LaTeX, Microsoft Office, Arduino, Raspberry Pi, USB-GPIB data acquisition. • Other Areas: Experimental design, biosensors, chemometrics, materials characterization. Professional Experience • Foundever, Portugal — Customer Support (Data-Oriented Technical Role) (2025 – Present) Provide analytical and technical support for digital systems and customer processes. Leverage programming and data analysis skills for diagnostics and workflow optimization. • INESC TEC, Porto, Portugal — Senior Researcher (2007 – 2019) Led and contributed to national and EU-funded R&D projects integrating data acquisition, machine learning, and sensor analytics. Developed platforms using Arduino and Raspberry Pi. Supervised research on optical sensors and environmental monitoring. • University of Camagüey, Cuba — Instructor / Assistant Professor (1994 – 2001) Taught courses in organic chemistry and computational analysis. Conducted applied research in phytochemistry and medicinal compounds. • LABIOFAM, Cuba — Researcher & Head of Medicinal Plants Facility (1993 – 1994) Managed R&D in medicinal plant extraction and analysis. • Empresa Nacional de Projectos para la Agricultura (ENPA), Cuba — Software Developer (1991 – 1993) Developed software tools for data processing and laboratory automation in agricultural projects. Education • B.Sc. in Mathematics and Applications (in progress) – Open University, Portugal (2025) • Ph.D. in Materials Science and Engineering – University of Aveiro, Portugal (2007). Dissertation: “Preparation and properties of SrBi₂M₂O₉ (M = Ta, Nb) thin films” • M.Sc. in Organic Chemistry – University of Havana, Cuba (1999) • B.Sc. in Chemistry – University Central de Las Villas, Cuba (1991) Certifications & Training • Google/Coursera – IT Support, Data Analytics -) • IBM/Coursera – Rexx and z/OS Programming (2022) • Advanced NATO Summer School (2002) – Scanning Probe Microscopy • Specialized Courses: Machine Learning, Organic Synthesis, QSAR, ComputerAssisted Synthesis Selected Research & Technical Projects • SNIFFER (EU FP7) – Sensory devices network for food supply chain security (Task Coordinator) • AquaMonitor (FCT Portugal) – Optical fiber sensors for water quality monitoring (Research Fellow) • CORAL & e-Têxtil Projects (Portugal) – Conductive polymers for health monitoring (Principal Researcher) • Automation of Physical Measurements – GPIB-based communication for laboratory instrumentation. Awards & Grants • FCT Ph.D. Scholarship (SFRH/BD/11943/2002, Portugal) • Visiting Grant, CSIC Spain (2005) • Gulbenkian Research Incentive Award (2011, as Supervisor) • National Science Awards in Cuba -) Languages • Portuguese: Fluent • English: Fluent • Spanish: Native Small R/Quarto Markdown Code demonstrating the use of AI ollama using minimax to generate code and report at the same time. Note: I have a similar Python/Markdown Code written as a Jupyter notebook --title: "R and ollama, Analizing Diabetes" author: "Gerardo González Aguilar" format: html self-contained: true editor: visual echo: true --## Quarto Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see . ## Running Code When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this: ```{r} #| echo: false #| output: false # library(ellmer) library(ollamar) #library(ggcorrplot) ollamar::pull("codellama") ``` ```{r} #Read the data mydata <- read.csv("~/Databases/HeartStroke/diabetes_data.csv", header=TRUE, sep=",",row.names=NULL) ``` ```{r} #| output: false chat <- chat_ollama("Be terse", model = "minimax-m2.5:cloud") #chat$chat("Design a program to classified the data of a given dataset by using PCA in R") ``` ```{r} #| echo: false #| output: false # Load necessary library for K-Nearest Neighbors library(class) library(caret) library(gmodels) library(rpart) library(rpart.plot) ``` ```{r} #| echo: false # --------------------------------------------------------# 1. LOAD & PREPARE DATA # --------------------------------------------------------set.seed(123) # For reproducibility # Split data: 70% Train, 30% Test train_index <- sample(1:nrow(mydata), 0.7 * nrow(mydata)) train_set <- mydata[train_index, ] test_set <- mydata[-train_index, ] # Separate Features (X) and Target (y) # Assumes the last column is the target variable X_train <- train_set[, -ncol(train_set)] X_test <- test_set[, -ncol(test_set)] y_train <- train_set[, ncol(train_set)] y_test <- test_set[, ncol(test_set)] # --------------------------------------------------------# 2. TRAIN PCA (Dimensionality Reduction) # --------------------------------------------------------# Calculate PCA on the training data with scaling enabled # scale. = TRUE standardizes the variables (crucial for PCA) pca_model <- prcomp(X_train, scale. = TRUE) # View variance explained to choose number of components summary(pca_model) # --------------------------------------------------------# 3. TRANSFORM DATA # --------------------------------------------------------# Project test and train data onto the first 2 Principal Components # (We use 'predict' to apply the PCA rotation learned from training data) n_components <- 3 train_pca <- predict(pca_model, X_train)[, 1:n_components] test_pca <- predict(pca_model, X_test)[, 1:n_components] # --------------------------------------------------------# 4. CLASSIFY (Using k-Nearest Neighbors) # --------------------------------------------------------k <- 5 # Number of neighbors predictions <- knn(train_pca, test_pca, cl = y_train, k = k) # --------------------------------------------------------# 5. EVALUATE # --------------------------------------------------------# Calculate Accuracy accuracy <- mean(predictions == y_test) # Print Results #cat("Confusion Matrix:\n") #print( CrossTable(y_test, predictions, prop.chisq = FALSE, prop.t = FALSE, prop.r = FALSE)) #conf_matrix <- table(y_test, predictions) # Visualize the confusion matrix using heatmap #heatmap(conf_matrix, main = "Confusion Matrix", # xlab = "Predicted", # ylab = "Actual", # col = heat.colors(10), scale = "column", margins = c(5, 5)) plot(y_test, predictions, main = "Actual vs Predicted Diabetes characterization", xlab = "Actual", ylab = "Predicted", col = "blue", pch = 19) #abline(0, 1, col = "red", lwd = 2)# Calculate Accuracy cat("\nAccuracy Score:", round(accuracy * 100, 2), "%\n") ``` ```{r} #| output: false #chat$chat("Design a program to classified the data of a given dataset by usingDecission trees in R") ``` ```{r} #| echo: false # 5. BUILD THE DECISION TREE MODEL # Formula: Target Variable ~ Predictor Variables (separated by +) # Method = "class" indicates this is a classification problem tree_model <- rpart(y_train ~ ., data = X_train, method = "class") # 6. VIEW THE MODEL SUMMARY print(tree_model) #printcp(tree_model) # View complexity parameter # 7. VISUALIZE THE TREE (Base R) rpart.plot(tree_model) #text(tree_model, use.n = TRUE, pretty = 1) # 8. MAKE PREDICTIONS ON TEST DATA # type = "class" returns the predicted category predictions <- predict(tree_model, test_set, type = "class") # 9. EVALUATE THE MODEL # Create a Confusion Matrix confusion_matrix <- table(predictions, y_train) #print(confusion_matrix) plot(y_test, predictions, main = "Actual vs Predicted Diabetes characterization", xlab = "Actual", ylab = "Predicted", col = "blue", pch = 19) #abline(0, 1, col = "red", lwd = 2)# Calculate Accuracy accuracy <- sum(diag(confusion_matrix)) / sum(confusion_matrix) cat("Model Accuracy:", round(accuracy * 100, 2), "%\n") ``` ```{r} #| output: false #chat$chat("Design a program to classified the data of a given dataset by using Random Forest in R") ``` ```{r} #| echo: false #| output: false #| library (randomForest) ``` ```{r} #| echo: false # 4. Train the Random Forest Model # Formula: TargetVariable ~ Predictor1 + Predictor2 ... # Here, we use all features (.) to predict 'Species' #rf_model <- randomForest(y_train ~ ., data = X_train, #ntree = 100, # Number of trees # mtry = 4, # Number of variables randomly sampled at each split # importance = TRUE)# Track variable importance # Print model summary #print(rf_model) # 5. Make Predictions on the Test Data # We use the model to predict the class for the testing set #predictions <- predict(rf_model, test_set) # 6. Evaluate the Model Performance # Create a Confusion Matrix to see results #confusion_matrix <- table(Predicted = predictions, Actual = y_test) #print(confusion_matrix) # Calculate Accuracy #accuracy <- sum(diag(confusion_matrix)) / sum(confusion_matrix) #cat("\nModel Accuracy:", round(accuracy * 100, 2), "%\n") # (Optional) Variable Importance Plot #varImpPlot(rf_model) #plot(y_test, predictions, main = "Actual vs Predicted Credit Card default", # xlab = "Actual", ylab = "Predicted", col = "blue", pch = 19) #abline(0, 1, col = "red", lwd = 2) ``` ```{r} #| echo: false #| output: false library(pls) ``` ```{r} #| echo: false plsr_model <- plsr(y_train ~ ., data = X_train, ncomp = 5, validation = "CV") summary(plsr_model) validationplot(plsr_model, val.type = "MSEP") predictions <- predict(plsr_model, ncomp = 2, newdata = X_test) #print(pred) # Calculate Accuracy #accuracy <- sum(diag(confusion_matrix)) / sum(confusion_matrix) #cat("\nModel Accuracy:", round(accuracy * 100, 2), "%\n") plot(plsr_model, plottype = "scores", comps = 1:2) plot(y_test, predictions, main = "Actual vs Predicted Diabetes characterization", xlab = "Actual", ylab = "Predicted", col = "blue", pch = 19) abline(0, 1, col = "red", lwd = 2) ``` ```{r} chat$chat("Design a binary classifier program the data of a given dataset in R") ``` Python Code demonstrating the use of an agentic program for crypto analysis. import requests import pandas as pd import numpy as np import time from sklearn.linear_model import LinearRegression # ----------------------------# 1. DATA AGENT # ----------------------------class DataAgent: def fetch(self, coin="bitcoin", days=30): url = f"https://api.coingecko.com/api/v3/coins/{coin}/market_chart" params = {"vs_currency": "eur", "days": days} data = requests.get(url, params=params).json() df = pd.DataFrame(data["prices"], columns=["ts", "price"]) df["date"] = pd.to_datetime(df["ts"], unit="ms") return df[["date", "price"]] # ----------------------------# 2. ANALYSIS AGENT (INDICATORS) # ----------------------------class AnalysisAgent: def indicators(self, df): df["SMA_5"] = df["price"].rolling(5).mean() df["SMA_10"] = df["price"].rolling(10).mean() # RSI delta = df["price"].diff() gain = (delta.where(delta > 0, 0)).rolling(14).mean() loss = (-delta.where(delta < 0, 0)).rolling(14).mean() rs = gain / loss df["RSI"] = 100 - (100 / (1 + rs)) # MACD ema12 = df["price"].ewm(span=12).mean() ema26 = df["price"].ewm(span=26).mean() df["MACD"] = ema12 - ema26 return df def trend(self, df): return "UP" if df["SMA_5"].iloc[-1] > df["SMA_10"].iloc[-1] else "DOWN" # ----------------------------# 3. PREDICTION AGENT # ----------------------------class PredictionAgent: def predict(self, df): df = df.dropna() df["t"] = np.arange(len(df)) X = df[["t"]] y = df["price"] model = LinearRegression() model.fit(X, y) return model.predict([[len(df)]])[0] # ----------------------------# 4. RISK MANAGEMENT AGENT # ----------------------------class RiskAgent: def levels(self, price): stop_loss = price * 0.92 take_profit = price * 1.15 return stop_loss, take_profit # ----------------------------# 5. DECISION AGENT # ----------------------------class DecisionAgent: def decide(self, df, prediction, trend): price = df["price"].iloc[-1] rsi = df["RSI"].iloc[-1] macd = df["MACD"].iloc[-1] change = (prediction - price) / price if trend == "UP" and rsi < 70 and macd > 0 and change > 0.02: 📈" elif trend == "DOWN" and rsi > 30 and change < -0.02: return "SELL 📉" else: return "HOLD 🤝" return "BUY # ----------------------------# 6. ALERT AGENT # ----------------------------class AlertAgent: def alert(self, decision, coin): if "BUY" in decision: 🚨 ALERT: BUY signal for {coin.upper()}!") elif "SELL" in decision: print(f"⚠️ ALERT: SELL signal for {coin.upper()}!") print(f" # ----------------------------# 7. MASTER AGENT # ----------------------------class CryptoAgent: def __init__(self): self.data = DataAgent() self.analysis = AnalysisAgent() self.predictor = PredictionAgent() self.risk = RiskAgent() self.decision = DecisionAgent() self.alert = AlertAgent() def run(self, coin): df = self.data.fetch(coin) df = self.analysis.indicators(df) trend = self.analysis.trend(df) prediction = self.predictor.predict(df) decision = self.decision.decide(df, prediction, trend) price = df["price"].iloc[-1] stop_loss, take_profit = self.risk.levels(price) 🪙 {coin.upper()}") print(f"💰 Price: {price:.2f} €") print(f"🔮 Prediction: {prediction:.2f} €") print(f"📈 Trend: {trend}") print(f"📊 RSI: {df['RSI'].iloc[-1]:.2f}") print(f"⚡ MACD: {df['MACD'].iloc[-1]:.4f}") print(f"💡 Decision: {decision}") print(f"🛑 Stop Loss: {stop_loss:.2f} €") print(f"🎯 Take Profit: {take_profit:.2f} €") print(f"\n self.alert.alert(decision, coin) # ----------------------------# 8. REAL-TIME LOOP # ----------------------------if __name__ == "__main__": agent = CryptoAgent() coins = ["bitcoin", "ethereum", "solana"] while True: for coin in coins: agent.run(coin) print("\n ⏳ Waiting 60 seconds...\n") time.sleep(60)
Get your freelancer profile up and running. View the step by step guide to set up a freelancer profile so you can land your dream job.