Connect with us

AI

Build patient outcome prediction applications using Amazon HealthLake and Amazon SageMaker

Published

on

Healthcare data can be challenging to work with and AWS customers have been looking for solutions to solve certain business challenges with the help of data and machine learning (ML) techniques. Some of the data is structured, such as birthday, gender, and marital status, but most of the data is unstructured, such as diagnosis codes or physician’s notes. This data is designed for human beings to understand, but not for computers to comprehend. The key challenges of using healthcare data are as follows:

  • How to effectively use both structured and unstructured data to get a complete view of the data
  • How to intuitively interpret the prediction results

With the rise of AI/ML technologies, solving these challenges became possible.

One relevant use case is patient outcome prediction, which includes acute or chronic condition-triggered hospital visits or readmission predictions, disease progression predictions within a certain observation window, and so on. Healthcare providers, payors, and pharmaceutical companies can use prediction results to recommend early intervention, improve outreach communication, improve patient care experience, and reduce overall cost.

In this post, we show you an example of building a deep learning based patient outcome prediction model. We build the model in Amazon SageMaker with MIMIC-III data stored in Amazon HealthLake and turn it into a lightweight application for visualization and interpretability. The prediction target for this example is mortality prediction within 90 days after ICU discharge. You can modify the target variable to suit your needs.

Amazon HealthLake helps make sense of health data

HealthLake is a HIPAA-eligible service that enables healthcare providers, health insurance companies, and pharmaceutical companies to store, transform, query, and analyze health data at petabyte scale.

The data source we exported from the HealthLake API is called MIMIC-III [1]. It’s a large, freely available database comprised of deidentified health-related data associated with over 40,000 patients who stayed in critical care units. The database includes information such as demographics, vital signs, lab test results, procedures, medications, caregiver notes, imaging reports, and mortality. We can’t share the data in this post due to license restrictions, but you can visit MIMIC’s official website to request data access.

HealthLake automatically extracts clinical entities and links ICD-10-CM and RxNorm codes to unstructured text such as discharge notes when the text is stored in HealthLake as a Fast Healthcare Interoperable Resource (FHIR) DocumentReference type. The extracted entities are added back onto the FHIR DocumentReference resource as a FHIR extension. Text embedded in the DocumentReference should be base64 encoded. When building the predictive models, we can combine the extracted information with other structured data and get a more holistic view of the patient’s medical history.

Overview of solution

The following architecture diagram illustrates the model training pipeline, inference pipeline, and information-rendering front end.

We use the HealthLake export API to export the normalized data to an Amazon Simple Storage Service (Amazon S3) bucket. Then we use an AWS Glue crawler to create a Data Catalog. We can use Amazon Athena with the Data Catalog to run SQL-like queries against the exported data. Unstructured data of patient records gets processed separately to extract indexed data and combine it with other structured information. Then we use a SageMaker notebook with TensorFlow containers to train a custom convolutional neural network model. The model artifact is saved to an S3 bucket and later is used to test model performance on unseen data. Finally, we run inference on the model using SageMaker batch transform and save the results to Amazon S3. We also develop visualization components and render them via Amazon API Gateway to improve the model’s interpretability.

In this post, we walk you through the following steps:

  1. Create training and testing datasets.
  2. Use embedding techniques for a richer representation of the unstructured data.
  3. Train the model.
  4. Evaluate our results.
  5. Visualize the results with custom UI components.

Create training and testing datasets

First, we create a binary variable for the target—mortality within a 90-day window after discharge. A patient may have multiple records with the target variable value as 0 before this patient’s mortality status is set to 1. This situation also applies to many other patient outcome prediction target variables. We therefore split the data by patient_id into training, validation, and testing datasets to prevent information leakage. This way, a single patient’s multiple records don’t appear in more than one dataset category.

We first put aside 20% of the patients for testing purposes, and treat these patient records as never seen by the algorithm. Among the remaining 80% patients, we take another 80% of the data for training and 20% for validation. We upload these datasets to our S3 bucket for later use.

Use embedding techniques

Traditional ML methods may use frequency count based encoding techniques such as term frequency-inverse document frequency (TF-IDF). In this post, we use embedding techniques that take advantage of a richer representation of the unstructured data by learning relationships between different medical codes.

We first take in a sequence of medical codes and use skip-gram to learn the relationships between different codes. The learned embedding for each medical code is typically an n-length vector (such as 300) that characterizes the individual element. These dimensions usually don’t have explicit meanings, however, similar medical concepts should be projected closer to one another in the feature space. We learned such vectors for all the vocabularies during training and stacked them together as a matrix. We later use this embedding matrix to train a convolutional neural network model and perform testing on unseen data.

Train the model

We first define the structure of the neural network and then use a SageMaker-hosted TensorFlow training image to train our model. The layers are defined as follows:

  • Embedding layer – Takes in raw medical code sequences and converts each individual code into embeddings
  • Convolutional layer – Takes in the embeddings and convolves with tunable filters
  • Pooling layer – Applies aggregation computations to reduce the size for the next layers’ input
  • Dropout layer – Randomly turns off connections to reduce overfitting
  • Concatenation layer – Combines the processed information from the previous layers with structured information such as patient age or gender
  • Fully connected layer with sigmoid activation – Outputs the final prediction probabilities

During training, we use these prediction probabilities to calculate metrics and guide the direction of the training process. During testing, these probabilities are output as a file on Amazon S3.

When the training process is complete, we save the model artifact and upload it to an S3 bucket for later use.

Review results

The following visualization shows the ROC (Receiver Operating Characteristics) curve and classification report on the test data.

The ROC curve shows the model’s performance at different thresholds. The AUC (Area Under the Curve) for the ROC curve is 0.82, which measures the model’s ability to separate different target classes. The classification report gives you an overview of the model’s precision, recall, and F1 score for each class. The weighted average F1 score for the model is 0.74.

Visualization with custom UI components

We can visualize the prediction results in many ways. For this post, we only demonstrate how to render SHAP (SHapley Additive exPlanations) values to improve the model’s interpretability. SHAP is a game theoretic approach to explain the output of an ML model. The visualization can show the details of each prediction’s contributing factors so that you can intuitively understand what features are pushing the predicted probability higher (towards 1) or lower (towards 0) from the base value.

We first define an HTML template and keep adding visualization components into the template. We then upload the HTML file to an S3 bucket and set up an AWS Lambda function to retrieve the HTML content, and the content is sent to an API Gateway to render a webpage.

Set up HTML templates

We can define an HTML template with empty code blocks in it with the following code:

<div>
<h1>Dashboard</h1>
<div> <h2>Indicators</h2> {shap_value} </div>
</div>

We can generate the {<html-code-block>} later via Python or JavaScript libraries and plug the code into the blocks.

Create visualization components

An example of creating a SHAP value visualization might look like the following code:

explainer = shap.KernelExplainer (tf_model, X_train)
shap_values = explainer.shap_values(X_test, nsamples=100)
shap.initjs()
shap.force_plot(explainer.expected_value[0], shap_values[0][0,:], X_test.iloc[0,:])

This can generate an intuitive explanation of drivers behind the predictions. As shown in the following visualization, the red tickers are driving the probability of a patient’s outcome prediction to the higher end (towards 1), and the blue tickers are driving the probability to the lower end (towards 0). As a result, this patient has a probability of 0.34 compared to the training cohort base value of 0.4481. Therefore, this patient has a lower chance of being positive on the target variable.

Create a Lambda function to parse the HTML file

An example Lambda function can be as simple as the following code:

import json
import boto3
def lambda_handler(event, context): s3 = boto3.client('s3') response = s3.get_object(Bucket='<bucket>', Key='<key>') return response['Body'].read().decode('utf-8')

The purpose of this function is to retrieve the information that needs to be rendered without exposing the Amazon S3 resources to the public, and send the information to an API Gateway.

Create an API Gateway to render the HTML file

We can use the AWS Cloud Development Kit (AWS CDK) to automate these settings. For example:

api = apigw.LambdaRestApi( self, ‘visualization’, handler=lambda_handler, proxy=False) integration = apigw.LambdaIntegration( lambda_handler, proxy=False,
passthrough_behavior=apigw.PassthroughBehavior.WHEN_NO_TEMPLATES, integration_responses=[{ "statusCode": "200", "responseTemplates": {"text/html": "$input.path('$')"}, "responseParameters": { "method.response.header.Content-Type": "'text/html'"}
}])

The integration_responses part ensures that the returned content is rendered correctly as HTML by API Gateway. When the API Gateway is deployed, you get an invoke URL. You can copy and paste this URL into a web browser to check the visualization result.

Conclusion

In this post, we demonstrated how to use Amazon SageMaker and Amazon HealthLake to build a deep learning model to solve a healthcare and life sciences challenge and interpret the results via visualization techniques. With this solution, hospitals can better care for patients and provide appropriate intervention by predicting patient outcomes. We demonstrated this solution for a mortality prediction within 90 days after ICU discharge, you can apply the same method to other patient outcome prediction use cases.

HealthLake makes it easy to work with health data and extract relevant data points from unstructured clinical texts. Deep learning modeling techniques give us options to build more accurate models with less feature engineering effort, and AWS technologies make it possible to visualize model interpretations with a lightweight front-end solution.

To learn more about HealthLake, see Amazon HealthLake resources and Making sense of your health data with Amazon HealthLake. For a hands-on tutorial, visit our Amazon HealthLake workshop. For more examples using HealthLake and population health, see Population health applications with Amazon HealthLake – Part 1: Analytics and monitoring using Amazon QuickSight.

References

[1] MIMIC-III, a freely accessible critical care database. Johnson AEW, Pollard TJ, Shen L, Lehman L, Feng M, Ghassemi M, Moody B, Szolovits P, Celi LA, and Mark RG. Scientific Data (2016). DOI: 10.1038/sdata.2016.35. Available from: http://www.nature.com/articles/sdata201635


About the Authors

 Shuai Cao is a Data Scientist in the Professional Services team at Amazon Web Services. His expertise is building machine learning applications at scale for healthcare and life sciences customers. Outside of work, he loves traveling around the world and playing dozens of different instruments.

Garin Kessler is a Senior Data Science Manager at Amazon Web Services, where he leads teams of data scientists and application architects to deliver bespoke machine learning applications for customers. Outside of AWS, he lectures on machine learning and neural language models at Georgetown. When not working, he enjoys listening to (and making) music of questionable quality with friends and family.

Kartik Kannapur is a Data Scientist with AWS Professional Services. He holds a master’s degree in Applied Mathematics and Statistics from Stony Brook University and focuses on using machine learning to solve customer business problems.

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://aws.amazon.com/blogs/machine-learning/build-patient-outcome-prediction-applications-using-amazon-healthlake-and-amazon-sagemaker/

AI

What is the Freedom Phone and Should You Buy It?

Published

on

If you haven’t yet heard of it, the Freedom Phone is a much-hyped new device that promises “free speech and privacy” to its users. Funded by Erik Finman, the self-made Bitcoin millionaire who bought $1,000 worth of the cryptocurrency when it was just $12 a coin. That investment was made when Finman was 12; by the time he turned 18, he was a millionaire. Now 22, Finman is promoting the Freedom Phone as “a free speech and privacy first focused phone. With features like tracking blockers and an uncensorable app store.”

Critics (mostly security experts) say that the phone is little more than a re-vamped budget phone from China but priced like an iPhone XR. Very little is known about the features or even the OS at this point but the phone is clearly being marketing to ‘conservative America’ as a device that is all about “Not just making America great. But also making a great phone.”

The Freedom Phone website offers very little information but is loaded with Buy buttons. The site promotes high-level features such as tracking blockers, an “uncensored App Store”, “Pre-loaded Apps”, a mobile OS based on free speech, “Large Storage”, a 6-inch screen, easy phone switching, etc. but fails to go any deeper into the actual specs of the phone or the operating system.

Although the site claims that the device ships in August, it’s surprising that not much information is available about the device or its performance so close to its release.

Some speculate that the phone is merely a bid by a newfound millionaire to take advantage of conservatives who are irked by ex-President Donald Trump being blocked from social media platforms like Twitter and Facebook. Although Trump is slowly losing support within the party, millions of Americans are still behind him:

According to a new NBC News poll, 44% of Republicans say they support the former president more than they support the Republican Party. That is a decline from 50% and the first time since July 2019 that party supporters outnumbered Trump supporters.

We don’t know what the pre-order levels look like with the Freedom Phone, but we suspect that it’s not entirely an unpopular device among conservatives who still expect Trump to make another bid for the White House. Even celebrities like Caitlyn Jenner, ex-Olympian and gubernatorial candidate for California, have pledged their support should he decide to run in 2024.

As for the Freedom Phone itself, there are too many questions left unanswered, such as whether or not it works with 5G networks, what kind of internal specs it offers, and what the specific privacy implementations are. Should you buy it? Well, if you have $500 to burn, go for it. However, since none of the critical information we typically use to assess the worth and value of a phone is available, we don’t recommend it.

From the image, it looks like any other budget Android phone. Is there more to it than that? Follow this story on 1redDrop as we track the story around the Freedom Phone.

Recommended Products

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.
Click here to access.

Source: https://1reddrop.com/2021/07/24/what-is-the-freedom-phone-and-should-you-buy-it/?utm_source=rss&utm_medium=rss&utm_campaign=what-is-the-freedom-phone-and-should-you-buy-it

Continue Reading

AI

Nigeria to Launch a Pilot for Its CBDC in October

Published

on

Amazon seems determined to maintain its reputation as an innovative company and is looking to experiment with cryptocurrencies through a digital currency payment and blockchain unit.

According to an announcement posted on Thursday, Amazon is looking for a blockchain specialist to lead its Digital Currency and Blockchain strategy.

The Payments Acceptance & Experience team is seeking an experienced product leader to develop Amazon’s Digital Currency and Blockchain strategy and product roadmap … You will work closely with teams across Amazon, including AWS, to develop the roadmap, including the customer experience, technical strategy and capabilities as well as the launch strategy.

What Amazon is Looking For

The expert must have at least an MBA or equivalent degree, 10+ years of business or technology experience, team management skills, understanding of data and metrics, and good communication skills.

The corporation did not disclose any salary offer. The person must be based on or willing to move to Seattle, Washington.

Amazon seems to be convinced of the need to innovate in the field of payments and finance. The cryptocurrency and blockchain development team is a sign of the company’s interest in exploring these emerging technologies to offer better financial products.


ADVERTISEMENT

According to an email shared by Business Insider, Amazon’s team confirmed its interest in exploring an approach to the world of cryptocurrencies. Still, they did not specify whether it would be through the development of a proprietary currency or through the acceptance of cryptocurrencies as a means of payment:

“We’re inspired by the innovation happening in the cryptocurrency space and are exploring what this could look like on Amazon … We believe the future will be built on new technologies that enable modern, fast, and inexpensive payments, and hope to bring that future to Amazon customers as soon as possible.”

An Old Relationship With Crypto

Amazon’s interest in the world of cryptocurrencies isn’t new. Back in 2017, it purchased, at least preemptively, a number of domains linking its brand to cryptocurrencies, including amazoncryptocurrency.com, amazoncryptocurrencies.com, and even amazonethereum.com.

However, at the time, Patrick Gauthier told CNBC that the e-commerce giant did not have much interest in cryptocurrencies and had no plans to support crypto payments.

In fact, the Pay With Moon plugin that allowed payments on Amazon with Bitcoin through Lightning Network had to change its business model to instead allow its users to purchase virtual credit cards instead of paying directly on Amazon’s site.

Also, as Cryptopotato reported in February this year, Amazon launched a job offer for a new payments system involving “Digital and Emerging Payments (DEP),” although they did not mention a direct relationship with Bitcoin or any cryptocurrency either.

This time, however, Amazon seems more willing to go public with its casual relationship with cryptos.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter POTATO50 code to get 50% free bonus on any deposit up to 1 BTC.

You Might Also Like:

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.
Click here to access.

Source: https://coingenius.news/nigeria-to-launch-a-pilot-for-its-cbdc-in-october-49/?utm_source=rss&utm_medium=rss&utm_campaign=nigeria-to-launch-a-pilot-for-its-cbdc-in-october-49

Continue Reading

AI

Amazon Wants a Leader For Its Digital Currency and Blockchain Product Unit

Published

on

Amazon seems determined to maintain its reputation as an innovative company and is looking to experiment with cryptocurrencies through a digital currency payment and blockchain unit.

According to an announcement posted on Thursday, Amazon is looking for a blockchain specialist to lead its Digital Currency and Blockchain strategy.

The Payments Acceptance & Experience team is seeking an experienced product leader to develop Amazon’s Digital Currency and Blockchain strategy and product roadmap … You will work closely with teams across Amazon, including AWS, to develop the roadmap, including the customer experience, technical strategy and capabilities as well as the launch strategy.

What Amazon is Looking For

The expert must have at least an MBA or equivalent degree, 10+ years of business or technology experience, team management skills, understanding of data and metrics, and good communication skills.

The corporation did not disclose any salary offer. The person must be based on or willing to move to Seattle, Washington.

Amazon seems to be convinced of the need to innovate in the field of payments and finance. The cryptocurrency and blockchain development team is a sign of the company’s interest in exploring these emerging technologies to offer better financial products.


ADVERTISEMENT

According to an email shared by Business Insider, Amazon’s team confirmed its interest in exploring an approach to the world of cryptocurrencies. Still, they did not specify whether it would be through the development of a proprietary currency or through the acceptance of cryptocurrencies as a means of payment:

“We’re inspired by the innovation happening in the cryptocurrency space and are exploring what this could look like on Amazon … We believe the future will be built on new technologies that enable modern, fast, and inexpensive payments, and hope to bring that future to Amazon customers as soon as possible.”

An Old Relationship With Crypto

Amazon’s interest in the world of cryptocurrencies isn’t new. Back in 2017, it purchased, at least preemptively, a number of domains linking its brand to cryptocurrencies, including amazoncryptocurrency.com, amazoncryptocurrencies.com, and even amazonethereum.com.

However, at the time, Patrick Gauthier told CNBC that the e-commerce giant did not have much interest in cryptocurrencies and had no plans to support crypto payments.

In fact, the Pay With Moon plugin that allowed payments on Amazon with Bitcoin through Lightning Network had to change its business model to instead allow its users to purchase virtual credit cards instead of paying directly on Amazon’s site.

Also, as Cryptopotato reported in February this year, Amazon launched a job offer for a new payments system involving “Digital and Emerging Payments (DEP),” although they did not mention a direct relationship with Bitcoin or any cryptocurrency either.

This time, however, Amazon seems more willing to go public with its casual relationship with cryptos.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter POTATO50 code to get 50% free bonus on any deposit up to 1 BTC.

You Might Also Like:

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.
Click here to access.

Source: https://coingenius.news/amazon-wants-a-leader-for-its-digital-currency-and-blockchain-product-unit-38/?utm_source=rss&utm_medium=rss&utm_campaign=amazon-wants-a-leader-for-its-digital-currency-and-blockchain-product-unit-38

Continue Reading

AI

Fintech Giant Zip Co to Provide Cryptocurrency Trading Services

Published

on

Amazon seems determined to maintain its reputation as an innovative company and is looking to experiment with cryptocurrencies through a digital currency payment and blockchain unit.

According to an announcement posted on Thursday, Amazon is looking for a blockchain specialist to lead its Digital Currency and Blockchain strategy.

The Payments Acceptance & Experience team is seeking an experienced product leader to develop Amazon’s Digital Currency and Blockchain strategy and product roadmap … You will work closely with teams across Amazon, including AWS, to develop the roadmap, including the customer experience, technical strategy and capabilities as well as the launch strategy.

What Amazon is Looking For

The expert must have at least an MBA or equivalent degree, 10+ years of business or technology experience, team management skills, understanding of data and metrics, and good communication skills.

The corporation did not disclose any salary offer. The person must be based on or willing to move to Seattle, Washington.

Amazon seems to be convinced of the need to innovate in the field of payments and finance. The cryptocurrency and blockchain development team is a sign of the company’s interest in exploring these emerging technologies to offer better financial products.


ADVERTISEMENT

According to an email shared by Business Insider, Amazon’s team confirmed its interest in exploring an approach to the world of cryptocurrencies. Still, they did not specify whether it would be through the development of a proprietary currency or through the acceptance of cryptocurrencies as a means of payment:

“We’re inspired by the innovation happening in the cryptocurrency space and are exploring what this could look like on Amazon … We believe the future will be built on new technologies that enable modern, fast, and inexpensive payments, and hope to bring that future to Amazon customers as soon as possible.”

An Old Relationship With Crypto

Amazon’s interest in the world of cryptocurrencies isn’t new. Back in 2017, it purchased, at least preemptively, a number of domains linking its brand to cryptocurrencies, including amazoncryptocurrency.com, amazoncryptocurrencies.com, and even amazonethereum.com.

However, at the time, Patrick Gauthier told CNBC that the e-commerce giant did not have much interest in cryptocurrencies and had no plans to support crypto payments.

In fact, the Pay With Moon plugin that allowed payments on Amazon with Bitcoin through Lightning Network had to change its business model to instead allow its users to purchase virtual credit cards instead of paying directly on Amazon’s site.

Also, as Cryptopotato reported in February this year, Amazon launched a job offer for a new payments system involving “Digital and Emerging Payments (DEP),” although they did not mention a direct relationship with Bitcoin or any cryptocurrency either.

This time, however, Amazon seems more willing to go public with its casual relationship with cryptos.

SPECIAL OFFER (Sponsored)

Binance Futures 50 USDT FREE Voucher: Use this link to register & get 10% off fees and 50 USDT when trading 500 USDT (limited offer).

PrimeXBT Special Offer: Use this link to register & enter POTATO50 code to get 50% free bonus on any deposit up to 1 BTC.

You Might Also Like:

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.

PlatoAi. Web3 Reimagined. Data Intelligence Amplified.
Click here to access.

Source: https://coingenius.news/fintech-giant-zip-co-to-provide-cryptocurrency-trading-services-24/?utm_source=rss&utm_medium=rss&utm_campaign=fintech-giant-zip-co-to-provide-cryptocurrency-trading-services-24

Continue Reading
Esports4 days ago

How to reduce lag and increase FPS in Pokémon Unite

Esports5 days ago

Coven skins for Ashe, Evelynn, Ahri, Malphite, Warwick, Cassiopeia revealed for League of Legends

Esports5 days ago

Will New World closed beta progress carry over to the game’s full release?

Esports4 days ago

How to add friends and party up in New World

Esports5 days ago

Can you sprint in New World?

Esports4 days ago

How to claim New World Twitch drops

Esports4 days ago

Twitch streamer gets banned in New World after milking cow

AR/VR4 days ago

Moth+Flame partners with US Air Force to launch Virtual Reality sexual assault prevention and response training

Blockchain5 days ago

Rothschild Investment Purchases Grayscale Bitcoin and Ethereum Trusts Shares

Esports5 days ago

Konami unveils Yu-Gi-Oh! Master Duel, a digital version of the Yu-Gi-Oh! TCG and OCG formats

Blockchain5 days ago

Uniswap (UNI) and AAVE Technical Analysis: What to Expect?

Esports4 days ago

How to change or join a new world in New World

Esports5 days ago

Best Akshan builds in League of Legends

Esports12 hours ago

Who won Minecraft Championships (MCC) 15? | Final Standings and Scores

Esports4 days ago

How to turn off and on PvP in New World

Esports5 days ago

Here are all the servers in the New World closed beta

Esports5 days ago

Overwatch League 2021 Grand Finals to be held in Los Angeles, playoff bracket in Dallas

Esports5 days ago

Team BDS adds GatsH to VALORANT roster as sixth man before EU Stage 3 Challengers 2

Blockchain5 days ago

NexWEB Technologies Chooses Butterfly Protocol for Powering its Blockchain Domain-Based NFT Platform

Gaming5 days ago

Why Is It Better to Play Slots Using Cryptocurrency?

Trending