<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re:Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex in AI Tools from Intel</title>
    <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1413249#M355</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please give us an update?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Sep 2022 11:30:20 GMT</pubDate>
    <dc:creator>AthiraM_Intel</dc:creator>
    <dc:date>2022-09-07T11:30:20Z</dc:date>
    <item>
      <title>Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1409123#M338</link>
      <description>&lt;P&gt;We are facing memory issues on D4_v5 machine while implementing hyperparameter tuning with&amp;nbsp; Gridsearch for SVC and NUSVC using Sklearnex for dataset with rows above 400k . Please suggest suitable soln.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 12:01:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1409123#M338</guid>
      <dc:creator>Swatinairl</dc:creator>
      <dc:date>2022-08-18T12:01:13Z</dc:date>
    </item>
    <item>
      <title>Re:Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1409418#M340</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you for posting in Intel Communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please share the following details?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt; Sample reproducer code&lt;/LI&gt;&lt;LI&gt; Exact steps and the commands used&lt;/LI&gt;&lt;LI&gt; OS details&lt;/LI&gt;&lt;LI&gt; Dataset you used&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Aug 2022 12:33:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1409418#M340</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2022-08-19T12:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1410469#M348</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;Ref notebook:&lt;A href="https://www.kaggle.com/code/nidhirastogi/network-intrusion-detection-using-python/notebook" target="_blank"&gt;Network Intrusion Detection using Python | Kaggle&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Below is the code snippet for Grid search where we are facing issues:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;from sklearn.model_selection import GridSearchCV&lt;/P&gt;
&lt;P&gt;train_original = pd.read_csv("data.csv")&lt;/P&gt;
&lt;P&gt;train = train_original.head(500000)&lt;/P&gt;
&lt;P&gt;# Attack Class Distribution&lt;BR /&gt;train['label'].value_counts()&lt;/P&gt;
&lt;P&gt;# # SCALING NUMERICAL ATTRIBUTES&lt;/P&gt;
&lt;P&gt;from sklearn.preprocessing import StandardScaler&lt;BR /&gt;scaler = StandardScaler()&lt;/P&gt;
&lt;P&gt;# extract numerical attributes and scale it to have zero mean and unit variance&lt;BR /&gt;cols = train.select_dtypes(include=['float64', 'int64']).columns&lt;BR /&gt;sc_train = scaler.fit_transform(&lt;BR /&gt;train.select_dtypes(include=['float64', 'int64']))&lt;BR /&gt;'''sc_test = scaler.fit_transform(&lt;BR /&gt;test.select_dtypes(include=['float64', 'int64']))'''&lt;/P&gt;
&lt;P&gt;# turn the result back to a dataframe&lt;BR /&gt;sc_traindf = pd.DataFrame(sc_train, columns=cols)&lt;BR /&gt;#sc_testdf = pd.DataFrame(sc_test, columns=cols)&lt;/P&gt;
&lt;P&gt;# # ENCODING CATEGORICAL ATTRIBUTES&lt;BR /&gt;from sklearn.preprocessing import LabelEncoder&lt;BR /&gt;encoder = LabelEncoder()&lt;/P&gt;
&lt;P&gt;# extract categorical attributes from both training and test sets&lt;BR /&gt;cattrain = train.select_dtypes(include=['object']).copy()&lt;BR /&gt;# encode the categorical attributes&lt;BR /&gt;traincat = cattrain.apply(encoder.fit_transform)&lt;BR /&gt;# separate target column from encoded data&lt;BR /&gt;enctrain = traincat.drop(['label'], axis=1)&lt;BR /&gt;cat_Ytrain = traincat[['label']].copy()&lt;BR /&gt;train_x = pd.concat([sc_traindf, enctrain], axis=1)&lt;BR /&gt;train_y = train['label']&lt;BR /&gt;from sklearn.model_selection import train_test_split&lt;BR /&gt;X_train, X_test, Y_train, Y_test = train_test_split(&lt;BR /&gt;train_x, train_y, train_size=0.70, random_state=2)&lt;BR /&gt;print("data prep time is ----&amp;gt;", time.time()-start_time_data_prep)&lt;/P&gt;
&lt;P&gt;logging.debug("Training with NuSVC")&lt;BR /&gt;tuned_parameters = [&lt;BR /&gt;{"kernel": ["rbf","poly"], "gamma": ["scale"]}]&lt;BR /&gt;score = "recall"&lt;BR /&gt;clf = GridSearchCV(NuSVC(nu=0.2), tuned_parameters, n_jobs=-1,&lt;BR /&gt;scoring="%s_macro" % score, cv=5, verbose=10)&lt;BR /&gt;start_time_nusvc=time.time()&lt;BR /&gt;clf.fit(X_train, Y_train)&lt;BR /&gt;print("best params",clf.best_params_)&lt;BR /&gt;print("best score ",clf.best_score_)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;os details:&lt;/P&gt;
&lt;P&gt;Distributor ID: Ubuntu&lt;BR /&gt;Description: Ubuntu 20.04.4 LTS&lt;BR /&gt;Release: 20.04&lt;BR /&gt;Codename: focal&lt;/P&gt;
&lt;P&gt;The dataset/.csv file is attached here&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 18:04:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1410469#M348</guid>
      <dc:creator>Swatinairl</dc:creator>
      <dc:date>2022-08-24T18:04:39Z</dc:date>
    </item>
    <item>
      <title>Re:Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1411685#M350</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We are able to run the sample code you shared without any issues on ubuntu 18(Intel DevCloud).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Could you please try to run the same using Intel DevCloud for oneAPI ?&lt;/P&gt;&lt;P&gt;You can register for DevCloud using the below link:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.intel.com/content/www/us/en/forms/idz/devcloud-enrollment/oneapi-request.html" rel="noopener noreferrer" target="_blank"&gt;https://www.intel.com/content/www/us/en/forms/idz/devcloud-enrollment/oneapi-request.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Meanwhile could you please share the hardware details in which you tried already, so that we can try to reproduce your issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Aug 2022 14:55:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1411685#M350</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2022-08-30T14:55:20Z</dc:date>
    </item>
    <item>
      <title>Re:Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1413249#M355</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. Could you please give us an update?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Sep 2022 11:30:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1413249#M355</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2022-09-07T11:30:20Z</dc:date>
    </item>
    <item>
      <title>Re:Memory issues while implementing Gridsearch-SVC, NuSVC algorithms using Sklearnex</title>
      <link>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1414608#M358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 14 Sep 2022 05:56:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/AI-Tools-from-Intel/Memory-issues-while-implementing-Gridsearch-SVC-NuSVC-algorithms/m-p/1414608#M358</guid>
      <dc:creator>AthiraM_Intel</dc:creator>
      <dc:date>2022-09-14T05:56:37Z</dc:date>
    </item>
  </channel>
</rss>

