SQL
Saved to variable
df_1CREATE DATASOURCE demo
WITH
engine='postgres',
parameters={
"user":"user_name",
"port": 3307,
"password": "password",
"host": "127.0.0.1",
"database": "postgres"
};
ExecuteSqlError: This SQL cell is not linked with a connected integration
SQL
Saved to variable
df_2SELECT * FROM demo.airline_passenger_satisfaction LIMIT 100;
idobject
70172.01%
127461.01%
98 others98%
genderobject
Female53%
Male47%
11
51412.0
Female
34
58779.0
Male
35
79659.0
Female
83
65655.0
Female
93
30183.0
Female
39
64685.0
Male
24
105420.0
Female
5
111157.0
Female
47
81983.0
Female
1
5047.0
Male
SQL
Saved to variable
df_3CREATE PREDICTOR satisfaction_model_v1
FROM demo
(SELECT * FROM public.airline_passenger_satisfaction LIMIT 1000)
PREDICT satisfaction;
SQL
Saved to variable
df_4SELECT * FROM mindsdb.predictors WHERE name='satisfaction_model_v1';
nameobject
statusobject
0
satisfaction_model_v1
complete
SQL
Saved to variable
df_5DESCRIBE satisfaction_model_v1;
accuraciesobject
column_importancesobject
0
{'balanced_accuracy_score': 0.9391233766233766}
{}
SQL
Saved to variable
df_6DESCRIBE satisfaction_model_v1.features;
columnobject
id4.2%
gender4.2%
22 others91.7%
typeobject
categorical62.5%
integer20.8%
binary16.7%
0
id
integer
1
gender
binary
2
Customer Type
binary
3
age
integer
4
Type of Travel
binary
5
Class
categorical
6
Flight Distance
integer
7
Inflight wifi service
categorical
8
Departure/Arrival time convenient
categorical
9
Ease of Online booking
categorical
SQL
Saved to variable
df_7SELECT satisfaction, satisfaction_confidence, satisfaction_explain
FROM mindsdb.satisfaction_model_1
WHERE age=47 AND Class='Business' AND gender='Male';
satisfactionobject
satisfaction_confidenceobject
0
neutral or dissatisfied
0.9999