Connect with us

AI in Travel

Setting Up a Machine Learning Pipeline on Google Cloud Platform

Published

on


Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud PlatformImage by Editor | ChatGPT

 

Introduction

 
Machine learning has become an integral part of many companies, and businesses that don’t utilize it risk being left behind. Given how critical models are in providing a competitive advantage, it’s natural that many companies want to integrate them into their systems.

There are many ways to set up a machine learning pipeline system to help a business, and one option is to host it with a cloud provider. There are many advantages to developing and deploying machine learning models in the cloud, including scalability, cost-efficiency, and simplified processes compared to building the entire pipeline in-house.

The cloud provider selection is up to the business, but in this article, we will explore how to set up a machine learning pipeline on the Google Cloud Platform (GCP).

Let’s get started.

 

Preparation

 
You must have a Google Account before proceeding, as we will be using the GCP. Once you’ve created an account, access the Google Cloud Console.

Once in the console, create a new project.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Then, before anything else, you need to set up your Billing configuration. The GCP platform requires you to register your payment information before you can do most things on the platform, even with a free trial account. You don’t need to worry, though, as the example we’ll use won’t consume much of your free credit.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Please include all the billing information required to start the project. You might also need your tax information and a credit card to ensure they are ready.

With everything in place, let’s start building our machine learning pipeline with GCP.

 

Machine Learning Pipeline with Google Cloud Platform

 
To build our machine learning pipeline, we will need an example dataset. We will use the Heart Attack Prediction dataset from Kaggle for this tutorial. Download the data and store it somewhere for now.

Next, we must set up data storage for our dataset, which the machine learning pipeline will use. To do that, we must create a storage bucket for our dataset. Search for ‘Cloud Storage’ to create a bucket. It must have a unique global name. For now, you don’t need to change any of the default settings; just click the create button.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Once the bucket is created, upload your CSV file to it. If you’ve done this correctly, you will see the dataset inside the bucket.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Next, we’ll create a new table that we can query using the BigQuery service. Search for ‘BigQuery’ and click ‘Add Data’. Choose ‘Google Cloud Storage’ and select the CSV file from the bucket we created earlier.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Fill out the information, especially the project destination, the dataset form (create a new dataset or select an existing one), and the table name. For the schema, select ‘Auto-detect’ and then create the table.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

If you’ve created it successfully, you can query the table to see if you can access the dataset.

Next, search for Vertex AI and enable all the recommended APIs. Once that’s finished, select ‘Colab Enterprise’.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Select ‘Create Notebook’ to create the notebook we’ll use for our simple machine learning pipeline.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

If you are familiar with Google Colab, the interface will look very similar. You can import a notebook from an external source if you want.

With the notebook ready, connect to a runtime. For now, the default machine type will suffice as we don’t need many resources.

Let’s start our machine learning pipeline development by querying data from our BigQuery table. First, we need to initialize the BigQuery client with the following code.

from google.cloud import bigquery

client = bigquery.Client()

 

Then, let’s query our dataset in the BigQuery table using the following code. Change the project ID, dataset, and table name to match what you created previously.

# TODO: Replace with your project ID, dataset, and table name
query = """
SELECT *
FROM `your-project-id.your_dataset.heart_attack`
LIMIT 1000
"""
query_job = client.query(query)

df = query_job.to_dataframe()

 

The data is now in a pandas DataFrame in our notebook. Let’s transform our target variable (‘Outcome’) into a numerical label.

import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score

df['Outcome'] = df['Outcome'].apply(lambda x: 1 if x == 'Heart Attack' else 0)

 

Next, let’s prepare our training and testing datasets.

df = df.select_dtypes('number')

X = df.drop('Outcome', axis=1)
y = df['Outcome']

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=42)

 

⚠️ Note: df = df.select_dtypes('number') is used to simplify the example by dropping all non-numeric columns. In a real-world scenario, this is an aggressive step that could discard useful categorical features. This is done here for simplicity, and normally feature engineering or encoding would typically be considered.

Once the data is ready, let’s train a model and evaluate its performance.

model = LogisticRegression()
model.fit(X_train, y_train)

y_pred = model.predict(X_test)
print(f"Model Accuracy: {accuracy_score(y_test, y_pred)}")

 

The model accuracy is only around 0.5. This could certainly be improved, but for this example, we’ll proceed with this simple model.

Now, let’s use our model to make predictions and prepare the results.

result_df = X_test.copy()
result_df['actual'] = y_test.values
result_df['predicted'] = y_pred
result_df.reset_index(inplace=True)

 

Finally, we will save our model’s predictions to a new BigQuery table. Note that the following code will overwrite the destination table if it already exists, rather than appending to it.

# TODO: Replace with your project ID and destination dataset/table
destination_table = "your-project-id.your_dataset.heart_attack_predictions"
job_config = bigquery.LoadJobConfig(write_disposition=bigquery.WriteDisposition.WRITE_TRUNCATE)
load_job = client.load_table_from_dataframe(result_df, destination_table, job_config=job_config)
load_job.result()

 

With that, you have created a simple machine learning pipeline inside a Vertex AI Notebook.

To streamline this process, you can schedule the notebook to run automatically. Go to your notebook’s actions and select ‘Schedule’.

 
Setting Up a Machine Learning Pipeline on Google Cloud PlatformSetting Up a Machine Learning Pipeline on Google Cloud Platform
 

Select the frequency you need for the notebook to run, for example, every Tuesday or on the first day of the month. This is a simple way to ensure the machine learning pipeline runs as required.

That’s it for setting up a simple machine learning pipeline on GCP. There are many other, more production-ready ways to set up a pipeline, such as using Kubeflow Pipelines (KFP) or the more integrated Vertex AI Pipelines service.

 

Conclusion

 
Google Cloud Platform provides an easy way for users to set up a machine learning pipeline. In this article, we learned how to set up a pipeline using various cloud services like Cloud Storage, BigQuery, and Vertex AI. By creating the pipeline in notebook form and scheduling it to run automatically, we can create a simple, functional pipeline.

I hope this has helped!
 
 

Cornellius Yudha Wijaya is a data science assistant manager and data writer. While working full-time at Allianz Indonesia, he loves to share Python and data tips via social media and writing media. Cornellius writes on a variety of AI and machine learning topics.



Source link

Continue Reading
Click to comment

You must be logged in to post a comment Login

Leave a Reply

AI in Travel

What if Airbnb Builds the Killer AI Travel Search App?

Published

on


Airbnb is preparing to rebuild its internal search engine with generative AI at the core. In a recent job posting for a search infrastructure engineer, the company outlined plans for a “next generation search platform” designed to support “generative AI (large language model) use cases.” 

Candidates with expertise in search and recommendation systems are encouraged to apply, and experience with GenAI or LLMs is listed as a preferred qualification.

Search is one of the most critical components of Airbnb’s business. It determines how guests discover homes and experiences, and how hosts reach customers. And while Airbnb has not made any public announcements about an AI-native search product, the technical scope and job description point to ambitions beyond incremental improvements. 

The listing suggests Airbnb is looking to reconstruct its core search product to accommodate AI. The new platform is described as one that will “power different products at Airbnb,” suggesting that generative AI could become a foundational layer across the company’s marketplace. 

In response to a request for comment, an Airbnb spokesperson said the company is “always working to enhance the overall Airbnb experience” and is “actively seeking talented individuals who share our mission to transform the way people travel.”

Give Me a Room With a View

If Airbnb succeeds in launching a functional AI-powered search system, the move could change how travelers interact with the platform. Traditional travel search engines rely on structured inputs: location, dates, price filters, and a fixed set of amenities. Generative AI has the potential to interpret natural language queries, understand user context, and return relevant results with fewer steps and less manual sorting.

For example, instead of filtering by location and bedroom count, a guest might enter a query such as “a quiet place in the mountains with fast Wi-Fi, a hot tub, and a view” – and receive listings that match even if the keywords don’t align exactly. 

Several other travel companies have begun integrating AI tools into their platforms, including chat-based trip planning assistants and personalization features.

When Data is King

But Airbnb may be in a stronger position than some of its competitors to make that shift. The company has access to a large volume of structured and unstructured data: millions of listings with detailed attributes, user-generated reviews, booking behavior, search history, and messaging between hosts and guests. This data could support the training or fine-tuning of models capable of delivering more personalized and accurate search outcomes.

Airbnb also owns its entire supply-side platform. Unlike online travel agencies that depend on inventory from third-party providers and hotel chains, Airbnb’s listings are user-generated and directly managed on its system. That vertical integration provides a cleaner dataset and more flexibility in how results are ranked and surfaced, key advantages for any machine learning application.

The introduction of a new AI-native search system could also create competitive pressure in the broader travel sector. Google, Booking Holdings, and Expedia Group have all made recent announcements about generative AI experiments, including itinerary generation and trip planning tools. 

Airbnb CEO Brian Chesky has previously hinted at AI’s potential role in product discovery, referring in past earnings calls to a vision of Airbnb as a kind of intelligent travel concierge. A generative AI system could take that vision further, allowing for contextual, conversational discovery that adapts to different user intents in real time.

The company has not disclosed what timeline it is working toward, what specific models it may be using, or whether it intends to partner with external AI vendors or develop proprietary solutions. The job posting does not mention OpenAI, Anthropic, Google, or any of the major LLM providers by name.

Beyond the Short-Term Rental

What if Airbnb is thinking bigger than site search? There’s a huge world of travel beyond short-term rental listings and its new experiences product. 

Airbnb’s focus on design and its ability to attract talent put it in a position to compete in ways that other travel brands can’t. 

Chesky also has a strong relationship with Sam Altman, CEO of OpenAI. They’ve known each other since the 2000s, first at Y Combinator, the startup accelerator. And Altman has talked about the counsel Chesky gave him at OpenAI.  

Airbnb has always had ambitions beyond booking a room, and the focus on AI search will help it compete against players like Expedia when it comes to airline search or any other part of the travel journey.



Source link

Continue Reading

AI in Travel

Summer holidays are being hijacked by bots scraping fares, hoarding tickets, and causing online chaos

Published

on



  • Bots now dominate the threat landscape for travel platforms during peak booking periods
  • Fake demand created by bots leads to inflated prices and fewer options for real users
  • SMS pumping attacks are draining funds and delaying key notifications for travelers

As summer travel hits its peak, a new concern is emerging that has little to do with rising fuel costs or demand-driven pricing.

A growing volume of automated traffic is now being blamed for driving up flight prices, disrupting bookings, and damaging the experience for travelers, experts have warned.



Source link

Continue Reading

AI in Travel

With focus on AI, sustainable travel Arya Niwas organises Openscapes 2025 in New Delhi

Published

on


The opportunities and challenges that issues like artificial intelligence, sustainability and experiential travel pose to the tourism industry in India and overseas were highlighted at Openscapes 2025, a travel conclave in New Delhi on Saturday.

Organised by Arya Niwas, a hospitality group based in Jaipur, the conclave served as a participative platform to explore transformative ideas for the tourism sector, addressing pressing issues such as sustainability, experiential curation, the role of artificial intelligence (AI), and the integration of responsible practices into the travel experience.

Drawing stakeholders from across India’s hospitality industry, the conclave was organised with the core theme of Projecting India and Rajasthan with a stronger, more meaningful narrative.

“This is the first conclave. It is called Openscapes. We hope that we will be having more such dialogue-based conclaves on travel. There is a need for us to behave as one in the travel industry and to move forward together because the ultimate aim is to serve the guests and make the guests win,” Pooja Bansal, Owner and General Manager, Arya Niwas, told India & You on the sidelines of the event.

The urgency of the issues raised at the meeting was underscored by leading tour operators, who highlighted that Indian tourism, particularly in recent years, “has not been sustainable and things have gone really, really bad.”

The conclave drew stakeholders from across India’s hospitality industry

“When we talk about sustainability with experiential tourism, the experience at the grassroot level, meeting local people with a bit of sustainability, offers eye-opening encounters. Yet, there are challenges,” Navneet Arora, Managing Director, VINString Holidays, a travel agency in New Delhi, told India & You.

The meeting illustrated both obstacles and achievements in rural and urban experiential tourism. Operators cited instances where visitors’ immersion in heritage neighbourhoods and private homes fostered mutual pride among locals and tourists. However, they also warned against approaches that leave rural residents feeling like “monkeys in the zoo,” underscoring the necessity of responsible, respectful interaction, something now addressed by ensuring a share of tour proceeds benefit the communities involved. Sustainability, participants argued, extends well beyond eco-friendly rhetoric.

The conclave highlighted innovative tour formats, slow tourism, creative workshops and direct engagement with artisans, as pathways for deeper, more rewarding guest experiences.

“I think that is the call for the future, because automation has to come in. If we are not doing automation today, we are backwards. AI is important. The event opens up eyes for a lot of people. Difficult, but yes, AI and sustainability are important and doable,” Arora added.

“The interpretation of sustainability has become very cliché. This was a session to break that,” said Bansal.

Participants at the Openscapes 2025 called for a sustained dialogue, with suggestions for sector-wide conventions and targetted sessions on marketing and AI and more collaborative initiatives.



Source link

Continue Reading

Trending

Copyright © 2025 AISTORIZ. For enquiries email at prompt@travelstoriz.com