ls_da3m0ns
ls_da3m0ns

Reputation: 146

Training a decision tree classifier on SQL database

I have an SQL Database it has more than 1 million rows and i want to train a Decision Tree Classifier on it

Is there any way i can directly train on SQL data without converting it into Dataframe or converting it to DataFrame is necessary

Upvotes: 0

Views: 444

Answers (1)

Sunday Ikpe
Sunday Ikpe

Reputation: 974

Apparently you can run python and R scripts in SQL if that what you are asking. There's more documentation here:

https://learn.microsoft.com/en-us/sql/machine-learning/sql-server-machine-learning-services?view=sql-server-ver15.

Blockquote Execute Python and R scripts in SQL Server SQL Server Machine Learning Services lets you execute Python and R scripts in-database. You can use it to prepare and clean data, do feature engineering, and train, evaluate, and deploy machine learning models within a database. The feature runs your scripts where the data resides and eliminates transfer of the data across the network to another server.

You can execute Python and R scripts on a SQL Server instance with the stored procedure sp_execute_external_script.

Base distributions of Python and R are included in Machine Learning Services. You can install and use open-source packages and frameworks, such as PyTorch, TensorFlow, and scikit-learn, in addition to the Microsoft packages.

Upvotes: 1

Related Questions