diff --git a/__init__.pyc b/__init__.pyc
index d1c94d3..57355ef 100644
Binary files a/__init__.pyc and b/__init__.pyc differ
diff --git a/q01_pipeline/__init__.pyc b/q01_pipeline/__init__.pyc
index b360a57..0e880cc 100644
Binary files a/q01_pipeline/__init__.pyc and b/q01_pipeline/__init__.pyc differ
diff --git a/q01_pipeline/build.py b/q01_pipeline/build.py
index 96beca7..52d3f7b 100644
--- a/q01_pipeline/build.py
+++ b/q01_pipeline/build.py
@@ -9,5 +9,29 @@
bank = pd.read_csv('data/Bank_data_to_class.csv', sep=',')
# Write your solution here :
+y = bank['y']
+X = bank.drop(['y'], axis=1)
+X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=9)
+# Write your solution here :
+model = RandomForestClassifier(random_state=9,class_weight = 'balanced')
+def pipeline(X_train, X_test, y_train, y_test,model):
+ param_grid = {"max_depth": [2, 3, 5, 6, 8, 10, 15, 20, 30],
+ "max_leaf_nodes": [2, 5, 10, 15, 20],
+ "max_features": [8,10,12,14]}
+ grid = GridSearchCV(estimator=model,param_grid=param_grid)
+ le = LabelEncoder()
+ y_train=le.fit_transform(y_train)
+ for column in X_train.columns:
+ if X_train[column].dtype == type(object):
+ le = LabelEncoder()
+ X_train[column] = le.fit_transform(X_train[column])
+ y_test=le.fit_transform(y_test)
+ for column in X_test.columns:
+ if X_test[column].dtype == type(object):
+ le = LabelEncoder()
+ X_test[column] = le.fit_transform(X_test[column])
+ grid.fit(X_train, y_train)
+ auc= roc_auc_score(y_test, grid.predict(X_test))
+ return grid.fit(X_train, y_train),auc
diff --git a/q01_pipeline/build.pyc b/q01_pipeline/build.pyc
index 5a9b3ad..c2ee1d8 100644
Binary files a/q01_pipeline/build.pyc and b/q01_pipeline/build.pyc differ
diff --git a/q01_pipeline/tests/__init__.pyc b/q01_pipeline/tests/__init__.pyc
index b2f2c5b..821c412 100644
Binary files a/q01_pipeline/tests/__init__.pyc and b/q01_pipeline/tests/__init__.pyc differ
diff --git a/q01_pipeline/tests/test_q01_pipeline.pyc b/q01_pipeline/tests/test_q01_pipeline.pyc
index 109bce3..edb3bf6 100644
Binary files a/q01_pipeline/tests/test_q01_pipeline.pyc and b/q01_pipeline/tests/test_q01_pipeline.pyc differ
diff --git a/quickstarts/Prompting.ipynb b/quickstarts/Prompting.ipynb
new file mode 100644
index 0000000..c7824ae
--- /dev/null
+++ b/quickstarts/Prompting.ipynb
@@ -0,0 +1,1685 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "Tce3stUlHN0L"
+ },
+ "source": [
+ "##### Copyright 2024 Google LLC."
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "cellView": "form",
+ "id": "tuOe1ymfHZPu"
+ },
+ "outputs": [],
+ "source": [
+ "# @title Licensed under the Apache License, Version 2.0 (the \"License\");\n",
+ "# you may not use this file except in compliance with the License.\n",
+ "# You may obtain a copy of the License at\n",
+ "#\n",
+ "# https://www.apache.org/licenses/LICENSE-2.0\n",
+ "#\n",
+ "# Unless required by applicable law or agreed to in writing, software\n",
+ "# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+ "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
+ "# See the License for the specific language governing permissions and\n",
+ "# limitations under the License."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "yeadDkMiISin"
+ },
+ "source": [
+ "# Gemini API: Prompting Quickstart\n",
+ "\n",
+ "
\n",
+ " Run in Google Colab\n",
+ " | \n",
+ "
LatentDirichletAllocation(n_components=6, random_state=42)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
LatentDirichletAllocation(n_components=6, random_state=42)
| \n", + " | Date received | \n", + "Product | \n", + "Sub-product | \n", + "Issue | \n", + "Sub_issue | \n", + "Consumer_complaint_narrative | \n", + "Company public response | \n", + "Company | \n", + "State | \n", + "ZIP code | \n", + "... | \n", + "issue_lemma | \n", + "issue_pos | \n", + "removed_stops | \n", + "removed_stops_proces | \n", + "Topic | \n", + "scores | \n", + "compound | \n", + "comp_score | \n", + "neg_score | \n", + "sentiment | \n", + "
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", + "10/26/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Information belongs to someone else | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "PA | \n", + "19153 | \n", + "... | \n", + "[information, belong, to, someone, else] | \n", + "[NOUN, VERB, ADP, PRON, ADV] | \n", + "[information, belong] | \n", + "information belong] | \n", + "5 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 1 | \n", + "10/26/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Improper use of your report | \n", + "Credit inquiries on your report that you don't... | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "SC | \n", + "29212 | \n", + "... | \n", + "[credit, inquiry, on, your, report, that, you,... | \n", + "[NOUN, NOUN, ADP, PRON, NOUN, SCONJ, PRON, AUX... | \n", + "[credit, inquiry, report, recognize] | \n", + "credit inquiry report recognize] | \n", + "2 | \n", + "{'neg': 0.0, 'neu': 0.536, 'pos': 0.464, 'comp... | \n", + "0.3818 | \n", + "positive | \n", + "0.0 | \n", + "positive | \n", + "
| 2 | \n", + "10/18/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Problem with a company's investigation into an... | \n", + "Was not notified of investigation status or re... | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "SC | \n", + "29418 | \n", + "... | \n", + "[be, not, notify, of, investigation, status, o... | \n", + "[AUX, PART, VERB, ADP, NOUN, NOUN, CCONJ, NOUN] | \n", + "[notify, investigation, status, result] | \n", + "notify investigation status result] | \n", + "4 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 3 | \n", + "10/26/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Account information incorrect | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "SC | \n", + "29483 | \n", + "... | \n", + "[account, information, incorrect] | \n", + "[NOUN, NOUN, ADJ] | \n", + "[account, information, incorrect] | \n", + "account information incorrect] | \n", + "3 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 4 | \n", + "10/26/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Information belongs to someone else | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "LA | \n", + "70122 | \n", + "... | \n", + "[information, belong, to, someone, else] | \n", + "[NOUN, VERB, ADP, PRON, ADV] | \n", + "[information, belong] | \n", + "information belong] | \n", + "5 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| ... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "... | \n", + "
| 19779 | \n", + "10/23/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Account information incorrect | \n", + "NaN | \n", + "NaN | \n", + "TRANSUNION INTERMEDIATE HOLDINGS, INC. | \n", + "FL | \n", + "32811 | \n", + "... | \n", + "[account, information, incorrect] | \n", + "[NOUN, NOUN, ADJ] | \n", + "[account, information, incorrect] | \n", + "account information incorrect] | \n", + "3 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 19780 | \n", + "10/23/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Account information incorrect | \n", + "NaN | \n", + "NaN | \n", + "TRANSUNION INTERMEDIATE HOLDINGS, INC. | \n", + "FL | \n", + "32811 | \n", + "... | \n", + "[account, information, incorrect] | \n", + "[NOUN, NOUN, ADJ] | \n", + "[account, information, incorrect] | \n", + "account information incorrect] | \n", + "3 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 19781 | \n", + "10/18/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Information belongs to someone else | \n", + "NaN | \n", + "NaN | \n", + "Experian Information Solutions Inc. | \n", + "CA | \n", + "92602 | \n", + "... | \n", + "[information, belong, to, someone, else] | \n", + "[NOUN, VERB, ADP, PRON, ADV] | \n", + "[information, belong] | \n", + "information belong] | \n", + "5 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 19782 | \n", + "10/21/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Account status incorrect | \n", + "NaN | \n", + "NaN | \n", + "EQUIFAX, INC. | \n", + "FL | \n", + "34771 | \n", + "... | \n", + "[account, status, incorrect] | \n", + "[NOUN, NOUN, NOUN] | \n", + "[account, status, incorrect] | \n", + "account status incorrect] | \n", + "3 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
| 19783 | \n", + "10/21/2024 | \n", + "Credit reporting or other personal consumer re... | \n", + "Credit reporting | \n", + "Incorrect information on your report | \n", + "Information belongs to someone else | \n", + "NaN | \n", + "NaN | \n", + "Experian Information Solutions Inc. | \n", + "NC | \n", + "27834 | \n", + "... | \n", + "[information, belong, to, someone, else] | \n", + "[NOUN, VERB, ADP, PRON, ADV] | \n", + "[information, belong] | \n", + "information belong] | \n", + "5 | \n", + "{'neg': 0.0, 'neu': 1.0, 'pos': 0.0, 'compound... | \n", + "0.0000 | \n", + "neutral | \n", + "0.0 | \n", + "neutral | \n", + "
19784 rows × 29 columns
\n", + "