Тёмный

SAS Tutorial | Python Integration with SAS Viya 

SAS Users
Подписаться 32 тыс.
Просмотров 11 тыс.
50% 1

In this SAS How To Tutorial, Ari Zitin explores several examples of Python integration with SAS. There are many SAS Viya Cloud Analytic Services (CAS) that can be submitted from Python. In this Python integration demo, Ari focuses on predictive modeling. He shows how to connect to CAS, access in-memory data, bring data locally to use Pandas, and prepare data for predictive modeling. Ari then steps through how to build, score and assess a Decision Tree model. Finally, he takes a look at how he would go about creating additional predictive models such as a Random Forest model and a Gradient Boosting model to determine the best model type for prediction.
Throughout this video, Ari is showing how to use Python to send commands and controls to the SAS Viya server. Ari’s examples are organized using Jupyter Notebook running on the Anaconda distribution of Python.
Download data files - Use SAS to fetch the Titanic data Ari references. Get the code on GitHub -github.com/sascommunities/sas...
Chapters
00:00 - Welcome
01:14 - Useful Python Packages: SWAT and pandas
02:15 - Connecting to CAS and Accessing In-memory Data
07:21 - Bring Data Locally to use Pandas
11:48 - Handling Missing Values
13:20 - Preparing for Predictive Modeling
15:20 - Building a Decision Tree Model
17:20 - Scoring and Assessing the Decision Tree Model
19:15 - Analyzing Results Locally
23:02 - Building other Models - Random Forest Model and Gradient Boosting Model
29:55 - More CAS Actions that can be Submitted from Python
Related Content
◉ SAS Books: SAS Viya: The Python Perspective -
www.sas.com/store/books/categ...
◉ Ask the Expert On-Demand webinars: SAS® Viya®: Working with APIs -
www.sas.com/en_us/webinars/at...
◉ Administering SAS Viya? Here are tools to use when working with Python. - github.com/sassoftware/pyviya...
◉ Managing models with SAS and Python? Check out this toolset on GitHub. - github.com/sassoftware/python...
Learn more about SAS Software
◉ Ask the Expert On-Demand Webinar: How Do I Get Started with SAS Visual Data Mining and Machine Learning? - www.sas.com/en_us/webinars/ge...
◉ Learn SAS - www.sas.com/en_us/learn.html
◉ Free Tutorial - video.sas.com/detail/video/54...
◉ Using SAS Viya REST APIs with Python and R e-Learning course -
support.sas.com/edu/schedules...
SUBSCRIBE TO THE SAS USERS RU-vid CHANNEL #SASUsers #LearnSAS
ru-vid.com?sub_...
ABOUT SAS
SAS is a trusted analytics powerhouse for organizations seeking immediate value from their data. A deep bench of analytics solutions and broad industry knowledge keep our customers coming back and feeling confident. With SAS®, you can discover insights from your data and make sense of it all. Identify what’s working and fix what isn’t. Make more intelligent decisions. And drive relevant change.
CONNECT WITH SAS
SAS ► www.sas.com
SAS Customer Support ► support.sas.com
SAS Communities ► communities.sas.com
SAS Analytics Explorers ► explorers.sas.com
Facebook ► / sassoftware
Twitter ► / sassoftware
LinkedIn ► / sas
Blogs ► blogs.sas.com
RSS ► www.sas.com/rss

Наука

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 26   
@askaryambus
@askaryambus 2 года назад
This was GOOD. I wish Academia could have this level of applicability orientation.
@SASUsers
@SASUsers 2 года назад
We're happy you liked it, and thanks for letting us know!
@rakeshdas9512
@rakeshdas9512 4 года назад
Excellent demo. one question, if I have some existing Python program, how do i run those in Viya platform?
@SASUsers
@SASUsers 4 года назад
Hi Rakesh! All of SAS' Python libraries are listed on 2.sas.com/60561iqFp. The page provides an explanation of each package. This would be a great place to start. If you have access to a SAS Viya environment, SWAT (2.sas.com/60571iqFV) is a good starting point. If not, the SAS Viya free trial is an option. There you get a Jupyter Notebook, backed by SAS Viya where you can try out all your Python code. Further, there are more specialized Python tools listed on the developers site referenced above. Most of our Python-related resources live on 2.sas.com/60581iqFn. You can find downloads, examples, tutorials, and sample code there. Finally, check out the many articles from SAS blogs related to Python here: 2.sas.com/60591iqFX We hope those resources help, and let us know if you have any additional questions!
@kylevu1638
@kylevu1638 4 года назад
Great explanation very clear and thorough! One question, I build a simple Logistic Regression Model in python and export it as a pmml/xml (tried both file type) files but when I import the model the score code appear in error. Is there any resources or documentation that can help me that you recommend? I watch another video of yours when you imported an R file as a pmml/xml and it worked but for some reason this is not the same for the python file in pmml/xml. Anyways great video!
@SASUsers
@SASUsers 4 года назад
Kyle, thank you for your inquiry! We are checking on this for you!
@SASUsers
@SASUsers 4 года назад
Kyle, for more specific usage questions with your data, we recommend that you work with Tech Support, since the RU-vid site is not the right place to diagnose coding issues or post long explanations. To open a track with Tech Support, fill out the form at this link: 2.sas.com/6051Guy8U or send mail to support@sas.com to open a track.
@whoopeedoopee251
@whoopeedoopee251 4 года назад
Is it possible to run python APIs in SAS enterprise guide 8.1?
@SASUsers
@SASUsers 4 года назад
Thanks for asking, Yiting! These replies to similar questions on our SAS Support Communities should help (for both of these replies, you can scroll up to the top to see the original post): This reply to "running python code in EG" 2.sas.com/6057GuRhS and This reply (which is also the Solution) to "call python script in SAS EG" 2.sas.com/6058GuRhs Please let us know if you have other questions!
@zeddean431
@zeddean431 3 года назад
the link he refers to at the beginning of the code is not available@ 1:27, how can we get?
@zeddean431
@zeddean431 3 года назад
Could you please provide the link that the instructor refer to at the time 1:28
@SASUsers
@SASUsers 3 года назад
@@zeddean431 Are these the links you are referring to developer.sas.com/guides/python.html and github.com/sascommunities/sas-howto-tutorials/blob/master/machinelearning/get-titanic-data.sas ?
@saskiajanssen5300
@saskiajanssen5300 3 года назад
Hello Arie, it is a great video. However when I am importing the csv file to Viya, everything is in one column. How come?
@SASUsers
@SASUsers 3 года назад
Thank you for your inquiry! We are checking on this for you!
@SASUsers
@SASUsers 3 года назад
I’m not sure exactly how you read the CSV file in, but if you are using the ‘read_csv’ method in SWAT, there is a nice documentation page available here: 2.sas.com/6055yDH85. In particular note the ‘**kwargs’ argument that basically inherits keyword arguments from the pandas method 2.sas.com/6056yDH8g_csv(). Basically when you read a CSV file into Viya you are using the 2.sas.com/6056yDH8g_csv() method to read the CSV file into a Python pandas dataframe and then you upload the dataframe to Viya as an in-memory CAS table. In order to troubleshoot reading in the CSV in this method you will need to use the options in the 2.sas.com/6056yDH8g_csv method to correct the initial read of the CSV into a dataframe. Usually when you are reading in a CSV file into pandas and you get all of the data stored in 1 column it’s because the delimiter used in your CSV file may be different from what ‘read_csv()’ expects. By default the delimiter is a comma (so normal CSV with comma separations should work fine), but sometimes files in the CSV format use different delimiters depending on how they were generated. Another option is to make sure the first row contains the column names you want and is formatter correctly, otherwise you might need to specify the ‘header’ option in the 2.sas.com/6056yDH8g_csv() method (2.sas.com/6057yDH89). There are numerous ways to run into problems reading in CSV files, usually depending on how the file is formatted. You didn't send your code and I realize this is not the appropriate forum. I do hope this provides a pathway to learn more and fix your issue, but if you need more help, I would encourage you to contact SAS Technical Support, who have a method for getting the required information (like the code you ran and a sample of the CSV file you want to read in) necessary to help you with your question.
@kwstasvamvakousis8027
@kwstasvamvakousis8027 3 года назад
Hi, is there any location that we can download the Python code of this example?
@SASUsers
@SASUsers 3 года назад
Are these the links you are referring to 2.sas.com/6055HZXIB and 2.sas.com/6056HZXI8 ?
@kwstasvamvakousis8027
@kwstasvamvakousis8027 3 года назад
@@SASUsers I would like to download this specific Python code used in the video from the presenter. Is there any link to download this specific code?
@SASUsers
@SASUsers 3 года назад
Have you used the GitHub link 2.sas.com/6050HZb9s provided in the See More section? That contains the PROC IMPORT code the presenter used. The Jupyter Notebook used by the presenter is not available for download. Your connection to a Viya server would be different than the connection used by the presenter. The presenter's program would not work on your installation of SAS Viya. To learn more about integrating Python and R with SAS Viya and to learn the actions shown in the video, we recommend the SAS Viya and Python Integration for Machine Learning class: 2.sas.com/6051HZb9t .
@user-wb8uf5xu4z
@user-wb8uf5xu4z Год назад
Great explanation in this video! Have one question: can you please make a video tell us how to connect to cas in jupyter lab? I mean how you set up the url, the user name and the password?
@SASUsers
@SASUsers Год назад
Great feedback! We are looking into resources for you.
@SASUsers
@SASUsers Год назад
Here are a few great resources to help you get started: 2.sas.com/6059OKUCz 2.sas.com/6050OKUCM Let us know if you have any questions or feel free to post in the SAS Communities for assistance.
@zeddean431
@zeddean431 3 года назад
can we do the SAS university for this exercise ?
@zeddean431
@zeddean431 3 года назад
No we can not
@BHARATHEEYUDU.
@BHARATHEEYUDU. 3 года назад
Make a vedio how to migrate SAS Code Python any web site is there snowflaxschema means
@SASUsers
@SASUsers 3 года назад
Thanks for your feedback! We're sorry, we're not sure exactly what you are asking for. Will you please clarify by giving us more details about what you would like?
Далее
Migrating from SAS 9.4 to SAS Viya
20:00
Просмотров 9 тыс.
Вопрос Ребром - Субо
49:41
Просмотров 1,1 млн
Fast and Furious: New Zealand 🚗
00:29
Просмотров 35 млн
NOOOOO 😂😂😂
00:15
Просмотров 6 млн
Python Coding for SAS Programmers
42:27
Просмотров 863
The moment we stopped understanding AI [AlexNet]
17:38
Просмотров 809 тыс.
I've been using Redis wrong this whole time...
20:53
Просмотров 344 тыс.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Clean your data with R.   R programming for beginners.
27:31
Battery  low 🔋 🪫
0:10
Просмотров 13 млн
АЙФОН Г0ВН0
0:54
Просмотров 1,5 млн