<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Elias Elikem Ifeanyi Dzobo</title>
    <description>The latest articles on DEV Community by Elias Elikem Ifeanyi Dzobo (@eliasdzobo).</description>
    <link>https://dev.to/eliasdzobo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F642301%2Faf45605c-522f-43b0-989a-052d4eadccca.jpeg</url>
      <title>DEV Community: Elias Elikem Ifeanyi Dzobo</title>
      <link>https://dev.to/eliasdzobo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eliasdzobo"/>
    <language>en</language>
    <item>
      <title>The Experiment of the ML Scientist</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Mon, 26 Aug 2024 07:37:21 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/the-experiment-of-the-ml-scientist-5eoj</link>
      <guid>https://dev.to/eliasdzobo/the-experiment-of-the-ml-scientist-5eoj</guid>
      <description>&lt;p&gt;In the world of machine learning (ML), the path from data to a functioning model is not a straight line. It is an iterative, experiment-driven journey where hypotheses are tested, algorithms are refined, and results are evaluated, often multiple times, before arriving at a solution that meets the desired goals. This process is akin to the scientific method, where experiments play a crucial role in understanding the problem space, optimizing models, and ensuring robustness and accuracy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Typical ML Model Development Process
&lt;/h2&gt;

&lt;p&gt;Let’s begin by outlining the typical stages involved in developing an ML model. This will set the stage for understanding where experiments come into play:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem Definition:&lt;/strong&gt;&lt;br&gt;
The journey starts with a clear definition of the problem you're trying to solve. This includes understanding the business context, the objectives, and the specific task at hand—whether it's classification, regression, clustering, or another type of ML problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Collection and Preparation:&lt;/strong&gt;&lt;br&gt;
Once the problem is defined, the next step is to gather relevant data. This data often comes from various sources and requires significant preprocessing—cleaning, transforming, and organizing—before it can be used to train models.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exploratory Data Analysis (EDA):&lt;/strong&gt;&lt;br&gt;
With clean data in hand, an ML scientist conducts EDA to uncover patterns, correlations, and insights. This step involves visualizations and statistical analysis to understand the data's characteristics and to identify any potential issues like imbalance or outliers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feature Engineering:&lt;/strong&gt;&lt;br&gt;
After understanding the data, the focus shifts to creating features that can help the model learn. This might involve selecting relevant variables, creating new ones, or transforming existing features to better represent the underlying patterns in the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Selection and Training:&lt;/strong&gt;&lt;br&gt;
Here’s where the experimentation begins in earnest. Multiple algorithms may be tested, hyperparameters tuned, and various approaches compared. This step involves iterating through different models to find the best performing one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Evaluation:&lt;/strong&gt;&lt;br&gt;
Once a model is trained, it is evaluated using various metrics appropriate for the task (e.g., accuracy, precision, recall, F1 score for classification problems). This evaluation helps in understanding how well the model generalizes to unseen data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment and Monitoring:&lt;/strong&gt;&lt;br&gt;
After selecting the best model, it’s deployed to production. However, the process doesn’t end here. Continuous monitoring is essential to ensure that the model performs well over time and to detect any drift in data patterns.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Are Experiments in Machine Learning?
&lt;/h2&gt;

&lt;p&gt;Experiments in machine learning are systematic procedures carried out to test hypotheses about model performance. In the context of ML, an experiment might involve testing different model architectures, varying hyperparameters, or using different subsets of data to determine their impact on the model’s accuracy, robustness, and generalization.&lt;/p&gt;

&lt;p&gt;The goal of running these experiments is to optimize the model. Just as a scientist in a lab runs multiple trials to refine a hypothesis, an ML scientist runs numerous experiments to refine the model, iterating until the model meets the performance criteria.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why Are Experiments Important?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Optimization&lt;/strong&gt;: Experiments help in finding the best model architecture and hyperparameters, which are crucial for achieving optimal performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Robustness&lt;/strong&gt;: By systematically testing different variables, experiments can help ensure that the model is not just fitting the training data but can generalize well to new, unseen data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Innovation&lt;/strong&gt;: Experimentation allows ML scientists to explore new approaches and techniques, potentially leading to breakthrough improvements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reproducibility&lt;/strong&gt;: Keeping track of experiments is vital for reproducibility. Knowing what was tried, what worked, and what didn’t is essential for both improving models and for collaboration within teams.&lt;/p&gt;
&lt;h2&gt;
  
  
  Running an ML Model Experiment with MLflow
&lt;/h2&gt;

&lt;p&gt;To illustrate how experiments are managed in practice, let’s walk through the process of setting up and running an ML experiment using a tool like MLflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Setting Up MLflow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MLflow is an open-source platform that helps manage the entire ML lifecycle, including experimentation, reproducibility, and deployment. It provides an interface to track experiments and log data, models, and results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install MLflow&lt;/strong&gt;:&lt;br&gt;
&lt;code&gt;pip install mlflow&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initialize an Experiment&lt;/strong&gt;: Start by initializing a new experiment in MLflow. This can be done programmatically or through the MLflow UI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import mlflow

mlflow.set_experiment("My First Experiment")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Logging Parameters and Metrics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;During your model training process, you can log parameters (like hyperparameters), metrics (like accuracy), and artifacts (like model files) to MLflow.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import mlflow.sklearn
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score

with mlflow.start_run():
    # Log parameters
    n_estimators = 100
    mlflow.log_param("n_estimators", n_estimators)

    # Train model
    model = RandomForestClassifier(n_estimators=n_estimators)
    model.fit(X_train, y_train)

    # Log metrics
    predictions = model.predict(X_test)
    accuracy = accuracy_score(y_test, predictions)
    mlflow.log_metric("accuracy", accuracy)

    # Log the model
    mlflow.sklearn.log_model(model, "model")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Comparing Experiments&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve logged multiple experiments, MLflow allows you to compare them easily. You can view all the experiments in the MLflow UI, where you can compare different runs based on metrics, parameters, and artifacts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Reproducibility and Deployment&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the powerful features of MLflow is its ability to ensure reproducibility. Since all the details of each experiment are logged, it’s easy to reproduce any experiment, down to the specific environment and dependencies.&lt;/p&gt;

&lt;p&gt;MLflow also supports model deployment, allowing you to transition from experimentation to production smoothly. You can deploy models to different platforms directly from MLflow, ensuring consistency between your development and production environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Experimentation is at the heart of successful machine learning. By systematically testing and refining models through experiments, ML scientists can optimize performance, ensure robustness, and push the boundaries of what their models can achieve. Tools like MLflow provide a structured and efficient way to manage these experiments, making it easier to track, compare, and deploy ML models. As machine learning continues to evolve, the ability to run effective experiments will remain a key skill for any ML practitioner.&lt;/p&gt;

</description>
      <category>mlops</category>
      <category>mlflow</category>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Piping Hot Features: How Feature Stores Keep Your ML Sizzling</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Wed, 14 Aug 2024 09:12:22 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/piping-hot-features-how-feature-stores-keep-your-ml-sizzling-4e47</link>
      <guid>https://dev.to/eliasdzobo/piping-hot-features-how-feature-stores-keep-your-ml-sizzling-4e47</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As machine learning (ML) systems evolve from experimental projects to production-grade applications, the need for robust infrastructure becomes paramount. One crucial component in the MLOps (Machine Learning Operations) lifecycle is the feature store. In this article, we'll explore what feature stores are, where they fit in the MLOps lifecycle, why they are important, and provide a hands-on tutorial on how to create and use a feature store in your ML projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Feature Store?
&lt;/h2&gt;

&lt;p&gt;A feature store is a centralized repository for storing, managing, and serving features—individual measurable properties or characteristics used as inputs in machine learning models. It ensures consistency and reusability of features across different models and teams.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Feature Stores Fit in the MLOps Lifecycle
&lt;/h2&gt;

&lt;p&gt;Feature stores sit at the heart of the data engineering and model training phases of the MLOps lifecycle:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Ingestion&lt;/strong&gt;: Raw data is collected from various sources (databases, APIs, sensors) and ingested into the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feature Engineering&lt;/strong&gt;: This is where feature stores come into play. Engineers transform raw data into meaningful features and store them in the feature store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Training&lt;/strong&gt;: Models are trained using features stored in the feature store, ensuring consistency across training and serving environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Serving&lt;/strong&gt;: During inference, the same features are retrieved from the feature store, ensuring the model receives consistent inputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring and Management&lt;/strong&gt;: Feature stores also support monitoring feature usage and quality, aiding in model performance management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Feature Stores are Important
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Consistency&lt;/strong&gt;: Ensures that the same features are used during training and inference, reducing discrepancies.&lt;br&gt;
&lt;strong&gt;Reusability&lt;/strong&gt;: Facilitates reuse of features across different models and teams, speeding up the development process.&lt;br&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Handles large volumes of feature data efficiently.&lt;br&gt;
&lt;strong&gt;Versioning&lt;/strong&gt;: Maintains versioning of features, allowing reproducibility of models.&lt;br&gt;
&lt;strong&gt;Monitoring&lt;/strong&gt;: Enables tracking and monitoring of feature performance and quality.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tutorial: Creating and Using a Feature Store
&lt;/h2&gt;

&lt;p&gt;We'll use feast (Feature Store), an open-source feature store for this tutorial. Let's walk through the steps of creating and using a feature store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Install Feast&lt;/strong&gt;&lt;br&gt;
First, install feast:&lt;br&gt;
&lt;code&gt;pip install feast&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Define Your Feature Store&lt;/strong&gt;&lt;br&gt;
Create a new directory for your feature store project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir my_feature_store
cd my_feature_store

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Initialize a Feast repository&lt;/em&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feast init my_feature_repo
cd my_feature_repo

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Define Your Feature Definitions&lt;/strong&gt;&lt;br&gt;
Edit the feature_store.yaml to configure your feature store. In the my_feature_repo directory, create a new file driver_stats.py and define your feature definitions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from datetime import timedelta
from feast import Entity, Feature, FeatureView, FileSource
from feast.types import Float32, Int64

# Define an entity for the driver. You can think of an entity as a primary key used to fetch features.
driver = Entity(name="driver_id", description="driver id")

# Read data from parquet files. Parquet is convenient for local development because it supports nested data.
driver_stats_source = FileSource(
    path="data/driver_stats.parquet",
    event_timestamp_column="event_timestamp",
    created_timestamp_column="created",
)

# Define a Feature View. A Feature View defines a logical group of features to be served to models.
driver_stats_view = FeatureView(
    name="driver_stats",
    entities=["driver_id"],
    ttl=timedelta(days=1),
    features=[
        Feature(name="conv_rate", dtype=Float32),
        Feature(name="acc_rate", dtype=Float32),
        Feature(name="avg_daily_trips", dtype=Int64),
    ],
    online=True,
    batch_source=driver_stats_source,
    tags={"team": "driver_performance"},
)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 4: Register the Feature Definitions&lt;/strong&gt;&lt;br&gt;
Run the following command to apply the feature definitions to the feature store:&lt;br&gt;
&lt;code&gt;feast apply&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Ingest Data into the Feature Store&lt;/strong&gt;&lt;br&gt;
Create a data directory and add a sample driver_stats.parquet file with your driver statistics data.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Ingest the data&lt;/em&gt;:&lt;br&gt;
&lt;code&gt;feast materialize-incremental $(date +%Y-%m-%d)&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6: Retrieve Features for Training&lt;/strong&gt;&lt;br&gt;
To retrieve features for training, create a new script retrieve_training_data.py:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from feast import FeatureStore
import pandas as pd

# Initialize the feature store
fs = FeatureStore(repo_path=".")

# Define the entities we want to retrieve features for
entity_df = pd.DataFrame(
    {"driver_id": [1001, 1002, 1003], "event_timestamp": pd.to_datetime(["2024-08-05", "2024-08-05", "2024-08-05"])}
)

# Retrieve features from the feature store
training_df = fs.get_historical_features(
    entity_df=entity_df,
    feature_refs=["driver_stats:conv_rate", "driver_stats:acc_rate", "driver_stats:avg_daily_trips"]
).to_df()

print(training_df)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the script to retrieve the features:&lt;br&gt;
&lt;code&gt;python retrieve_training_data.py&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7: Use Features for Model Serving&lt;/strong&gt;&lt;br&gt;
To retrieve features for online serving, create a new script retrieve_online_features.py:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from feast import FeatureStore

# Initialize the feature store
fs = FeatureStore(repo_path=".")

# Define the entities we want to retrieve features for
entity_rows = [{"driver_id": 1001}, {"driver_id": 1002}, {"driver_id": 1003}]

# Retrieve features from the feature store
online_features = fs.get_online_features(
    features=["driver_stats:conv_rate", "driver_stats:acc_rate", "driver_stats:avg_daily_trips"],
    entity_rows=entity_rows,
).to_dict()

print(online_features)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the script to retrieve the features:&lt;br&gt;
&lt;code&gt;python retrieve_online_features.py&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Feature stores are a vital component in the MLOps lifecycle, providing consistency, reusability, scalability, versioning, and monitoring of features. By centralizing feature management, feature stores like Feast enable efficient and reliable machine learning workflows from data ingestion to model serving. With the hands-on tutorial above, you now have a basic understanding of how to create and use a feature store in your ML projects. Happy experimenting!&lt;/p&gt;

</description>
      <category>featurestores</category>
      <category>mlops</category>
    </item>
    <item>
      <title>Pandas to Pipelines</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Mon, 05 Aug 2024 09:06:00 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/pandas-to-pipelines-1nl5</link>
      <guid>https://dev.to/eliasdzobo/pandas-to-pipelines-1nl5</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;If you've ever wrangled data using pandas, you know it's a powerful tool. But as your projects grow, so do the challenges. Enter: pipelines. Think of moving from pandas to pipelines as upgrading from riding a bicycle to driving a car on a highway. It's all about efficiency, scalability, and getting to your destination faster. Let's explore how data preparation evolves from pandas to pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Pandas Approach: Manual Labor
&lt;/h2&gt;

&lt;p&gt;Using pandas for data preparation is like cooking a meal from scratch every single time. You chop the veggies, sauté the onions, and season to taste. It's a hands-on process that works well for small, one-off tasks. With pandas, you load your data, clean it, transform it, and merge it all within a few lines of code. For a single data scientist working on a small project, this might seem just fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Drawbacks
&lt;/h2&gt;

&lt;p&gt;However, as your project scales, the drawbacks of this approach become apparent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Repetition: Every time you run your analysis, you have to manually execute the same steps. This repetition is not only time-consuming but also error-prone.&lt;/li&gt;
&lt;li&gt;Lack of Modularity: Your code can become a tangled mess of transformations, making it hard to maintain and debug.&lt;/li&gt;
&lt;li&gt;Scalability Issues: Pandas operates in-memory, which can be a bottleneck when dealing with large datasets.&lt;/li&gt;
&lt;li&gt;Collaboration Challenges: Sharing your work with others or deploying it in a production environment can be cumbersome without a structured workflow.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Enter Pipelines: Automation and Efficiency
&lt;/h2&gt;

&lt;p&gt;Pipelines are like having a professional kitchen with a team of chefs, each responsible for a specific task, working in harmony to prepare a gourmet meal. In the context of ML, a pipeline automates the sequence of data processing steps, ensuring each step is executed correctly and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Pipelines Transform Your Workflow
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Automation: Pipelines automate repetitive tasks, reducing manual intervention and minimizing errors.&lt;/li&gt;
&lt;li&gt;Modularity: Each step in a pipeline is a separate component, making your code more organized and easier to debug.&lt;/li&gt;
&lt;li&gt;Scalability: Pipelines can handle large datasets by processing data in chunks or leveraging distributed computing.&lt;/li&gt;
&lt;li&gt;Collaboration and Deployment: Pipelines provide a clear structure, making it easier for teams to collaborate and deploy models in production environments.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lets transform a data preparation script into a beautiful pipeline using Prefect &lt;/p&gt;

&lt;h2&gt;
  
  
  Transforming a Data Preparation Script into a Pipeline Script Using Prefect
&lt;/h2&gt;

&lt;p&gt;Here's a simple script that reads a CSV file, cleans the data, and saves the cleaned data to a new CSV file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Original Pandas Script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd

# Load data
data = pd.read_csv('data.csv')

# Clean data
data.dropna(inplace=True)  # Drop missing values
data['date'] = pd.to_datetime(data['date'])  # Convert date column to datetime
data = data[data['value'] &amp;gt; 0]  # Filter out non-positive values

# Save cleaned data
data.to_csv('cleaned_data.csv', index=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Install Prefect
&lt;/h2&gt;

&lt;p&gt;First, install Prefect if you haven't already:&lt;br&gt;
&lt;code&gt;pip install prefect&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 3: Transform the Script into a Prefect Flow
&lt;/h2&gt;

&lt;p&gt;We'll break down the script into individual tasks and then combine them into a Prefect flow.&lt;/p&gt;
&lt;h2&gt;
  
  
  Import Prefect and Define Tasks
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd
from prefect import task, Flow
from prefect.schedules import IntervalSchedule
from datetime import timedelta

# Define tasks
@task
def load_data(filepath):
    data = pd.read_csv(filepath)
    return data

@task
def clean_data(data):
    data.dropna(inplace=True)
    data['date'] = pd.to_datetime(data['date'])
    data = data[data['value'] &amp;gt; 0]
    return data

@task
def save_data(data, output_filepath):
    data.to_csv(output_filepath, index=False)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Create a Prefect Flow
&lt;/h2&gt;

&lt;p&gt;Now, we'll create a Prefect flow that chains these tasks together.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create a Prefect flow
@flow
def run():
    filepath = 'data.csv'
    output_filepath = 'cleaned_data.csv'

    data = load_data(filepath)
    cleaned_data = clean_data(data)
    save_data(cleaned_data, output_filepath)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5: Register and Run the Flow
&lt;/h2&gt;

&lt;p&gt;Finally, register and run your flow. You can run the flow locally or use Prefect Cloud for additional features like monitoring and logging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run Locally
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if __name__ == "__main__":
    run()

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can then use Prefect's UI to monitor and manage your flow.&lt;br&gt;
By transforming your pandas script into a Prefect flow, you gain automation, scalability, and improved error handling. Prefect makes it easy to manage your data workflows and integrate them into production environments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: From Pandas to Pipelines
&lt;/h2&gt;

&lt;p&gt;Transitioning from pandas to pipelines is like moving from a bicycle to a car—it's about embracing efficiency, scalability, and the ability to tackle bigger challenges. By investing in pipeline tools like Airflow, Mage, and Prefect, you're setting yourself up for success in the world of machine learning production.&lt;/p&gt;

&lt;p&gt;So, the next time you're prepping your data, remember: you can chop those veggies yourself, or you can let a team of chefs handle it for you. Happy coding, and stay tuned for more insights on bringing your ML projects to life in production!&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>aiops</category>
      <category>mlops</category>
      <category>mlpipelines</category>
    </item>
    <item>
      <title>zkML: Evolving the Intelligence of Smart Contracts Through Zero-Knowledge Cryptography</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Sun, 11 Jun 2023 20:14:39 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/zkml-evolving-the-intelligence-of-smart-contracts-through-zero-knowledge-cryptography-h17</link>
      <guid>https://dev.to/eliasdzobo/zkml-evolving-the-intelligence-of-smart-contracts-through-zero-knowledge-cryptography-h17</guid>
      <description>&lt;h2&gt;
  
  
  Introduction:
&lt;/h2&gt;

&lt;p&gt;Machine learning (ML) has become a powerful tool in various domains, but its integration with smart contracts has been limited due to computational challenges. However, the emergence of zkML (zero-knowledge machine learning) is set to change this landscape. By leveraging zero-knowledge cryptography, zkML enables the verification of ML model inferences on the blockchain, opening up new possibilities for autonomous and intelligent smart contracts. In this article, we will explore the potential applications, challenges, and emerging projects in the field of zkML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enhancing Smart Contracts with ML:
&lt;/h2&gt;

&lt;p&gt;Smart contracts, which are self-executing agreements with predefined rules, have revolutionized decentralized applications (dApps) and blockchain-based systems. However, they often rely on static rules and lack the ability to adapt to real-time data. By integrating ML capabilities, smart contracts can become more autonomous and dynamic, making decisions based on real-time on-chain data. This evolution enables increased automation, accuracy, efficiency, and flexibility in smart contract execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Challenges of On-Chain ML:
&lt;/h2&gt;

&lt;p&gt;One of the main obstacles to incorporating ML models into smart contracts is the high computational cost of running these models on-chain. The resource-intensive nature of ML computations, such as training and inference, makes it infeasible to directly execute them on the Ethereum Virtual Machine (EVM) or similar blockchain platforms. However, the focus of zkML is primarily on the inference phase of ML models, which is more amenable to verification using zero-knowledge proofs.&lt;/p&gt;

&lt;h2&gt;
  
  
  zkSNARKs: Enabling zkML:
&lt;/h2&gt;

&lt;p&gt;Zero-knowledge Succinct Non-Interactive Arguments of Knowledge (zkSNARKs) provide a solution to the computational complexity of running ML models on-chain. With zkSNARKs, anyone can run an ML model off-chain, generate a verifiable proof of the model's inference, and publish it on-chain. This approach allows smart contracts to leverage the intelligence of ML models without directly executing them on the blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applications and Opportunities:
&lt;/h2&gt;

&lt;p&gt;zkML opens up a wide range of applications and opportunities across various domains. In the decentralized finance (DeFi) space, verifiable off-chain ML oracles can be used to settle real-world prediction markets, insurance protocols, and more. ML-parameterized DeFi applications can automate lending protocols and update parameters in real-time. zkML also offers solutions for fraud monitoring, decentralized prompt marketplaces for generative AI, identity management, web3 social media filtering, and personalized advertising, among others.&lt;/p&gt;

&lt;h2&gt;
  
  
  Emerging Projects and Infrastructure:
&lt;/h2&gt;

&lt;p&gt;The zkML ecosystem is rapidly evolving, with several projects and infrastructure components emerging to support its development. Model-to-proof compilers, such as EZKL, circomlib-ml, LinearA's Tachikoma and Uchikoma, and zkml, enable the translation of ML models into verifiable computational circuits. Generalized proving systems like Halo2 and Plonky2 provide the necessary tools to handle non-linearities in ML models through lookup tables and custom gates. These advancements pave the way for the integration of zkML into various applications and use cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion:
&lt;/h2&gt;

&lt;p&gt;zkML represents a significant advancement in the integration of ML with smart contracts and blockchain-based systems. By leveraging zero-knowledge cryptography and zkSNARKs, zkML enables the verification of ML model inferences on-chain, enhancing the intelligence and flexibility of smart contracts. The potential applications and opportunities for zkML span across DeFi, security, traditional ML, identity, web3 social, and the creator economy. As the zkML ecosystem continues to grow and mature, we can expect further innovations and real-world implementations that harness the power of ML in decentralized systems.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Data Analytics: Blockchain Edition</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Thu, 27 Apr 2023 21:12:34 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/data-analytics-blockchain-edition-3gl6</link>
      <guid>https://dev.to/eliasdzobo/data-analytics-blockchain-edition-3gl6</guid>
      <description>&lt;p&gt;Blockchain technology has been gaining popularity in recent years due to its unique features such as transparency, immutability, and decentralization. One of the main reasons behind the growth of blockchain technology is its potential to create new and innovative applications that can transform various industries.&lt;/p&gt;

&lt;p&gt;However, with the growth of blockchain technology, new challenges have emerged in analyzing the data on blockchain networks. This article provides an overview of the unique challenges and opportunities in analyzing data on blockchain networks, including the use of distributed ledger technology and smart contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blockchain Analytics – An Overview
&lt;/h2&gt;

&lt;p&gt;Blockchain is a distributed ledger technology that records transactions in a secure, transparent, and immutable way. Each transaction is added to a block, which is then added to the blockchain. This creates a chain of blocks that cannot be altered without the consensus of the network.&lt;/p&gt;

&lt;p&gt;Blockchain analytics refers to the process of analyzing data on blockchain networks. This includes analyzing transaction data, network activity, and the behavior of network participants. Blockchain analytics can provide valuable insights into how blockchain networks are being used, and help identify potential risks and opportunities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges in Analyzing Blockchain Data
&lt;/h2&gt;

&lt;p&gt;One of the main challenges in analyzing blockchain data is the complexity of the data. Blockchain data is structured differently from traditional data sources, making it difficult to analyze using traditional data analytics tools and techniques.&lt;/p&gt;

&lt;p&gt;Another challenge is the size of the data. Blockchain networks generate a large amount of data, and storing, processing, and analyzing this data can be expensive and time-consuming.&lt;/p&gt;

&lt;p&gt;Furthermore, blockchain networks are decentralized, which means that data is distributed across multiple nodes. This can make it challenging to access and analyze data, as each node has its own copy of the blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Opportunities in Analyzing Blockchain Data
&lt;/h2&gt;

&lt;p&gt;Despite the challenges, analyzing blockchain data presents unique opportunities. For example, blockchain data is inherently transparent, which means that it can be used to provide a comprehensive view of network activity.&lt;/p&gt;

&lt;p&gt;Blockchain analytics can also be used to identify patterns and trends in network activity. This can help to identify potential risks and opportunities, such as identifying fraudulent transactions or predicting market trends.&lt;/p&gt;

&lt;p&gt;Another opportunity is the use of smart contracts. Smart contracts are self-executing contracts that are programmed to automatically execute when certain conditions are met. These contracts are stored on the blockchain, which means that they are transparent and immutable. Smart contract analytics can be used to identify patterns in smart contract usage, and identify potential risks and opportunities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, blockchain analytics presents both unique challenges and opportunities. While analyzing blockchain data can be complex and expensive, it can provide valuable insights into how blockchain networks are being used, and help identify potential risks and opportunities. As blockchain technology continues to evolve, the importance of blockchain analytics is likely to grow, and new tools and techniques will need to be developed to address the unique challenges and opportunities presented by blockchain data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Developing a Program with Test Driven Development</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Mon, 24 Apr 2023 20:40:23 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/developing-a-program-withtest-driven-development-dd9</link>
      <guid>https://dev.to/eliasdzobo/developing-a-program-withtest-driven-development-dd9</guid>
      <description>&lt;p&gt;Test-driven development (TDD) is a software development process that emphasizes writing automated tests before writing code. In this approach, the developer writes a failing test case that specifies the behavior they want to implement, and then writes the minimum amount of code needed to make the test pass. The process is then repeated, with new test cases being added and the code being updated to pass them.&lt;/p&gt;

&lt;p&gt;One of the key benefits of TDD is that it helps ensure that code is reliable and meets the intended specifications. By writing tests first, the developer is forced to think carefully about the expected behavior of their code and to consider edge cases and potential errors. This can help catch bugs early in the development process, when they are easier and cheaper to fix.&lt;/p&gt;

&lt;p&gt;Using a Test Driven Development approach, we would be implementing a program that collates news feeds on particular topics of interest. Considering the fast pace at which technology improves, staying up to date with the latest news and updates is a must, however it can be quite tasking to check for news articles daily. In this article, we’ll be exploring developing a program to collate news articles using newsapi and a test driven development approach.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up an Environment
&lt;/h3&gt;

&lt;p&gt;The first step is setting up a development environment. We’ll be using python to develop this program so we’ll be setting a virtual environment to develop in. Setting up a Python virtual environment is a best practice for developing Python applications. It helps to isolate dependencies, avoid conflicts between different versions of libraries, and keep the system Python environment clean. Here are the steps to set up a Python virtual environment:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open a terminal or command prompt on your computer.&lt;/li&gt;
&lt;li&gt;Install the virtualenv package by typing the following command and pressing Enter:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install virtualenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Create a new folder where you want to keep your virtual environment, and navigate to that folder using the &lt;strong&gt;&lt;code&gt;cd&lt;/code&gt;&lt;/strong&gt; command.&lt;/li&gt;
&lt;li&gt;Create a virtual environment by typing the following command and pressing Enter:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;virtualenv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new folder called &lt;strong&gt;&lt;code&gt;venv&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
 in the current directory, containing a fresh Python installation and a &lt;strong&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
 executable for installing packages.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Activate the virtual environment by typing the following command and pressing Enter:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;On Windows, the command is slightly different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;venv\Scripts\activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Activating the virtual environment will modify your system's &lt;strong&gt;&lt;code&gt;PATH&lt;/code&gt;&lt;/strong&gt; environment variable to use the Python installation and packages in the virtual environment.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can now install packages using &lt;strong&gt;&lt;code&gt;pip&lt;/code&gt;&lt;/strong&gt; as usual, and they will be installed only in the virtual environment, not globally on your system. For example, to install the &lt;strong&gt;&lt;code&gt;newsapi&lt;/code&gt;&lt;/strong&gt; package, type the following command and press Enter:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install newsapi-python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Writing our Test cases
&lt;/h3&gt;

&lt;p&gt;The next step is to write the test cases that will define the functionality of our program. Test-driven development (TDD) is a software development approach that emphasizes writing tests before writing the actual code. This approach helps ensure that the code meets the intended specifications and catches any issues early in the development process.&lt;/p&gt;

&lt;p&gt;For our program, we'll define a set of test cases that cover the following functionality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieving news articles on a specific topic&lt;/li&gt;
&lt;li&gt;Sorting news articles by date&lt;/li&gt;
&lt;li&gt;Filtering news articles by source&lt;/li&gt;
&lt;li&gt;Limiting the number of articles returned&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here's an example of a test case that retrieves news articles on a specific topic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import unittest
from newsapi import NewsApiClient

class NewsAPITestCase(unittest.TestCase):

    def setUp(self):
        self.api_key = 'your_api_key_here'
        self.newsapi = NewsApiClient(api_key=self.api_key)

    def test_retrieve_news_articles(self):
        topic = 'artificial intelligence'
        response = self.newsapi.get_everything(q=topic)
        articles = response['articles']
        self.assertTrue(len(articles) &amp;gt; 0, f"No news articles found on {topic}")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This test case checks that the API returns at least one news article when searching for articles related to 'artificial intelligence'.&lt;/p&gt;

&lt;h3&gt;
  
  
  Writing the Code
&lt;/h3&gt;

&lt;p&gt;With our test cases defined, we can now write the code to implement the desired functionality. For each test case, we'll write the minimum amount of code necessary to make the test pass. This iterative process of writing tests and then implementing the code is the foundation of TDD.&lt;/p&gt;

&lt;p&gt;Here's an example implementation of the test case we defined earlier:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def get_news_articles(topic, sources=None, sort_by='publishedAt', limit=None):
    response = newsapi.get_everything(q=topic, sources=sources, sort_by=sort_by, page_size=limit)
    articles = response['articles']
    return articles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This function takes a topic as input and returns a list of news articles that match the topic. If sources are specified, it filters the results to only include articles from those sources. The articles are sorted by the published date, with the most recent articles appearing first. Finally, if a limit is specified, it only returns that number of articles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Running the Tests
&lt;/h3&gt;

&lt;p&gt;With our code implemented, we can now run the test suite to ensure that everything is working correctly. To do this, we'll use a testing framework such as unittest to run our tests.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if __name__ == '__main__':
    unittest.main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running the test suite should produce output similar to the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;----------------------------------------------------------------------
Ran 1 test in 0.058s

OK
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this article, we explored using Test Driven Development to create a program that collates news articles about a particular topic.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The Ethics of Artificial Intelligence</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Sun, 23 Apr 2023 20:58:27 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/the-ethics-of-artificial-intelligence-5dh</link>
      <guid>https://dev.to/eliasdzobo/the-ethics-of-artificial-intelligence-5dh</guid>
      <description>&lt;p&gt;Artificial intelligence (AI) is changing the world as we know it. From self-driving cars to automated medical diagnoses, AI has the potential to revolutionize nearly every aspect of our lives. However, as with any powerful technology, there are ethical implications to consider. In this article, we will discuss the ethics of artificial intelligence, including topics such as algorithmic bias and the impact of AI on job displacement.&lt;/p&gt;

&lt;h2&gt;
  
  
  Algorithmic Bias
&lt;/h2&gt;

&lt;p&gt;One of the most pressing ethical concerns regarding AI is algorithmic bias. AI algorithms are designed to make decisions based on patterns found in large datasets. However, if these datasets are biased, the algorithms can produce biased results. For example, an AI algorithm used in hiring decisions may learn to favour male candidates over female candidates if the training data is biased towards men.&lt;/p&gt;

&lt;p&gt;In 2018, Amazon scrapped an AI recruiting tool after it was found to be biased against women. The algorithm was trained on resumes submitted to the company over a 10-year period, and it learned to associate certain words and phrases with male candidates. As a result, the algorithm penalized resumes that contained words like "women's" or "female."&lt;/p&gt;

&lt;p&gt;Another example of algorithmic bias is facial recognition technology. Studies have shown that facial recognition algorithms are less accurate when identifying people with darker skin tones. This can lead to harmful outcomes, such as wrongful arrests or police violence against people of colour.&lt;/p&gt;

&lt;h2&gt;
  
  
  Job Displacement
&lt;/h2&gt;

&lt;p&gt;Another ethical concern related to AI is the impact it may have on job displacement. As AI technology becomes more advanced, many jobs that were previously performed by humans may become automated. This could lead to significant job losses, particularly in industries such as manufacturing and transportation.&lt;/p&gt;

&lt;p&gt;For example, the rise of self-driving trucks could lead to the displacement of millions of truck drivers worldwide. Similarly, the growth of AI-powered chatbots and virtual assistants could lead to job losses for customer service representatives.&lt;/p&gt;

&lt;p&gt;A 2019 report from the Brookings Institution found that up to 36 million Americans could face job displacement due to AI and automation in the coming years. This could exacerbate income inequality and lead to economic instability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;AI has the potential to transform our world in countless ways, but it also raises important ethical questions that must be addressed. Algorithmic bias and job displacement are just two of the many ethical concerns surrounding AI. As AI technology continues to advance, it is important that we consider the potential impacts on society and take steps to mitigate any harmful effects. Only then can we ensure that AI is used for the benefit of all.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Data Analysis with Blockchain Data</title>
      <dc:creator>Elias Elikem Ifeanyi Dzobo</dc:creator>
      <pubDate>Sun, 23 Apr 2023 20:55:02 +0000</pubDate>
      <link>https://dev.to/eliasdzobo/data-analysis-with-blockchain-data-1mn4</link>
      <guid>https://dev.to/eliasdzobo/data-analysis-with-blockchain-data-1mn4</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Doing onchain analysis has been quite popping up, especially in the DeFi space. We’ve seen tons of threads on how to make money by following “smart money” meaning basically copying the trades of whales and venture capitalists, the folks with the big money.&lt;/p&gt;

&lt;p&gt;A huge aspect of the blockchain is its transparency meaning that every trade anyone takes is visible to the general public, at least on public blockchains that is, meaning that if you can find the wallets of the whales who “magically”😵👀 know when to buy and sell and copy their trades you can make money&lt;/p&gt;

&lt;p&gt;The first step is to find a token that has had a massive increase in value in the last 7 days and CoinGecko provides us with that information. We can then find the date the token started pumping and get all the transactions before the date on the blockchain explorer. Find the token, get the token chain, get the token address and we’ve got work to do!&lt;/p&gt;

&lt;p&gt;We found RocketX Exchange, ticket symbol RVF which went from $0.05 on April 4th to $0.15 currently, around a 200% increase in a week with token address 0xdc8af07a7861bedd104b8093ae3e9376fc8596d2&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Collection
&lt;/h2&gt;

&lt;p&gt;By searching the token address on the blockchain explorer we can find all the transactions of that token to ever occur. Etherscan makes it easy to filter transactions to take place of the buy and sell transactions and then you can download the resultant data as a CSV file. You can even filter out the data range before downloading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Preprocessing
&lt;/h2&gt;

&lt;p&gt;Load the data into a data frame using pandas and do some data preprocessing. Change the date time column to a date time object allowing us to choose rows between a specific timeframe.&lt;/p&gt;

&lt;p&gt;Drop columns that add little value to the insights we are trying to get, in this case, the Timestamp in Unix and block number of the transaction.&lt;/p&gt;

&lt;p&gt;For the token RVF we notice that April 5th was when the token started gaining momentum so we want to find buy transactions in huge volume before that date.&lt;/p&gt;

&lt;p&gt;We can create a new dataframe for all the buy transactions using the pandas: data[data[‘action’] == ‘Buy’] and further look for only transactions over a specific amount, in this case, I chose buy orders over 1 ETH.&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;p&gt;After filtering out 36 valid buy transactions over 1eth, I discovered that there were 3 particular wallet addresses with over $100,000 in their portfolio that bought a huge amount of RVF tokens in the weeks leading up to April 4th. One wallet which had been dcaing into RVF that week sold a portion of their holding netting a profit of over $4500.&lt;/p&gt;

&lt;h2&gt;
  
  
  PS: Disclaimer
&lt;/h2&gt;

&lt;p&gt;This is not an endorsement of the token RVF, just a way of applying data analytics to onchain data and drawing conclusions and results based on the data and insights shown.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
