From 6b37df0491615f5285314d42f39971a64bbe251c Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Sun, 11 Jul 2021 20:25:54 +0200 Subject: [PATCH 01/91] Ch2-1 readme completed --- .../1-Tools/translations/README.it.md | 210 ++++++++++++++++++ 2-Regression/translations/README.it.md | 34 +++ 2 files changed, 244 insertions(+) create mode 100644 2-Regression/1-Tools/translations/README.it.md create mode 100644 2-Regression/translations/README.it.md diff --git a/2-Regression/1-Tools/translations/README.it.md b/2-Regression/1-Tools/translations/README.it.md new file mode 100644 index 00000000..94c0a5c6 --- /dev/null +++ b/2-Regression/1-Tools/translations/README.it.md @@ -0,0 +1,210 @@ +# Iniziare con Python e Scikit-learn per i modelli di regressione + +![Sommario delle regressioni in uno sketchnote](../../../sketchnotes/ml-regression.png) + +> Sketchnote di [Tomomi Imura](https://www.twitter.com/girlie_mac) + +## [Qui Pre-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/9/) + +## Introduzione + +In queste quattro lezioni, si scoprirà come costruire modelli di regressione. Si discuterà di cosa siano fra breve. +Prima di tutto, ci si deve assicurare di avere a disposizione gli strumenti adatti per far partire il processo! + +In questa lezione, si imparerà come: + +- Configurare il proprio computer per attività locali di machine learning. +- Lavorare con i Jupyter notebook. +- Usare Scikit-learn, compresa l'installazione. +- Esplorare la regressione lineare con un esercizio pratico. + +## Installazioni e configurazioni + +[![Usare Python con Visual Studio Code](https://img.youtube.com/vi/7EXd4_ttIuw/0.jpg)](https://youtu.be/7EXd4_ttIuw "Using Python with Visual Studio Code") + +> 🎥 Fare click sull'immagine qui sopra per un video: usare Python all'interno di VS Code. + +1. **Installare Python**. Assicurarsi che [Python](https://www.python.org/downloads/) sia installato nel proprio computer. Si userà Python for per molte attività di data science e machine learning. La maggior parte dei sistemi già include una installazione di Python. Ci sono anche utili [Pacchetti di Codice Python](https://code.visualstudio.com/learn/educators/installers?WT.mc_id=academic-15963-cxa) disponbili, per facilitare l'installazione per alcuni utenti. + + Alcuni utilizzi di Python, tuttavia, richiedono una versione del software, laddove altri ne richiedono un'altra differente. Per questa ragione, è utile lavorare con un [ambiente virtuale](https://docs.python.org/3/library/venv.html). + +2. **Installare Visual Studio Code**. Assicurarsi di avere installato Visual Studio Code sul proprio computer. Si seguano queste istruzioni per [installare Visual Studio Code](https://code.visualstudio.com/) per l'installazione basica. Si userà Python in Visual Studio Code in questo corso, quindi meglio rinfrescarsi le idee su come [configurare Visual Studio Code](https://docs.microsoft.com/learn/modules/python-install-vscode?WT.mc_id=academic-15963-cxa) per lo sviluppo in Python. + + > Si prenda confidenza con Python tramite questa collezione di [moduli di apprendimento](https://docs.microsoft.com/users/jenlooper-2911/collections/mp1pagggd5qrq7?WT.mc_id=academic-15963-cxa) + +3. **Installare Scikit-learn**, Seguendo [quest istruczionsi](https://scikit-learn.org/stable/install.html). Visto che ci si deve assicurare di usare Python 3, ci si raccomanda di usare un ambiente virtuale. Si noti che se si installa questa libreria in un M1 Mac, ci sono istruzioni speciali nella pagina di cui al riferimento qui sotto. + +1. **Installare Jupyter Notebook**. Servirà [installare il pacchetto Jupyter](https://pypi.org/project/jupyter/). + +## Ambiente di crezione ML + +Si useranno **notebook** per sviluppare il codice Python e creare modelli di machine learning. Questo tipo di file è uno strumento comune per i data scientist, e viene identificato dal suffisso o estensione `.ipynb`. + +I notebook sono un ambiente interattivo che consente allo sviluppatore di scrivere codie, aggiungere note e scrivere documentazione attorno al codice il che è particolarmente utile per progetti sperimentali o orientati alla ricerca. + +### Esercizio - lavorare con un notebook + +In questa cartella, si troverà il file _notebook.ipynb_. + +1. Aprure _notebook.ipynb_ in Visual Studio Code. + + Un server Jupyter verrà lanciato con Python 3+. Si troveranno aree del notebook che possono essere `eseguite`, pezzi di codice. Si può eseguire un blocco di codice selezionando l'icona che assomiglia a un bottone di riproduzione. + +1. Selezionare l'icona `md` e aggiungere un poco di markdown, e il seguente testo **# Benvenuto nel tuo notebook**. + + Poi, aggiungere un blocco di codice Python. + +1. Digitare **print('hello notebook')** nell'area riservata al codice. +1. Selezionare la freccia per eseguire il codice. + + Si dovrebbe vedere stampata la seguente frase: + + ```output + hello notebook + ``` + +![VS Code con un notebook aperto](images/notebook.png) + +Si può inframezzare il codice con commenti per auto documentare il notebook. + +✅ Si pensi per un minuto all'ambiente di lavoro di uno sviluppatore web rispetto a quello di un data scientist. + +## Scikit-learn installato e funzionante + +Adesso che Python è impostato nel proprio ambiente locale, e si è familiari con i notebook Jupyter, si acquisterà ora confidenza con Scikit-learn (si pronuncia con la `si` di `science`). Scikit-learn fornisce una [API estensiva](https://scikit-learn.org/stable/modules/classes.html#api-ref) che aiuta a eseguire attività ML. + +Stando al loro [sito web](https://scikit-learn.org/stable/getting_started.html), "Scikit-learn è una libreria di machine learning open source che supporta l'apprendimento assistito (supervised learning) e non assistito (unsuperivised learnin). Fornisce anche strumenti vari per l'adattamento del modello, la pre-elaborazione dei dati, la selezione e la valutazione dei modelli e molte altre utilità." + +In questo corso, si userà Scikit-learn e altri strumenti per costruire modelli di machine learning per eseguire quelle che vengono chiamate attività di 'machine learning tradizionale'. Si sono deliberamente evitate le reti neurali e il deep learning visto che saranno meglio trattati nel prossimo programma di studi 'AI per Principianti'. + +Scikit-Learn rende semplice costruire modelli e valutarli per l'uso. Si concentra principalmente sull'utilizzo di dati numerici e contiene diversi insiemi di dati già pronti per l'uso come strumenti di apprendimento. Include anche modelli pre-costruiti per gli studenti da provare. Si esplora ora il processo di caricamento dei dati preconfezionati, e utilizzando un modello di stimatore incorporato prima il modello ML con Scikit-Learn con alcuni dati di base. + +# Esercizio - Il Primo notebook Scikit-learn + +> Questo tutorial è stato ispirato dall'[esempio di regressione lineare](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py) nel sito web di Scikit-learn. + +Nel file _notebook.ipynb_ associato a questa lezione, svuotare tutte le celle usando l'icona cestino ('trash can'). + +In questa sezione, di lavorerà con un piccolo insieme di dati sul diabete che è incorporato in Scikit-learn per scopi di apprendimento. Si immagini di voler testare un trattamento per i pazienti diabetici. I modelli di machine learning potrebbero essere di aiuto nel determinare quali pazienti risponderebbero meglio al trattamento, in base a combinazioni di variabili. Anche un modello di regressione molto semplice, quando visualizzato, potrebbe mostrare informazioni sulle variabili che aiuteranno a organizzare le proprie sperimentazioni cliniche teoriche. + +✅ Esistono molti tipi di metodi di regressione e quale scegliere dipende dalla risposta che si sta cercando. Se si vuole prevedere l'altezza probabile per una persona di una data età, si dovrebbe usare la regressione lineare, visto che si sta cercando un **valore numerico**. Se si è interessati a scoprire se un tipo di cucina dovrebbe essere considerato vegano o no, si sta cercando un' **assegnazione di categoria** quindi si dovrebbe usare la regressione logistica. Si imparerà di più sulla regressione logistica in seguito. Si pensi ad alcune domande che si possono chiedere ai dati e quale di questi metodi sarebbe più appropriato. + +Si inizia su questo compito. + +### Importare le librerie + +Per questo compito verranno importate alcune librerie: + +- **matplotlib**. E' un utile [strumento grafico](https://matplotlib.org/) e verrà usato per creare una trama a linee. +- **numpy**. [numpy](https://numpy.org/doc/stable/user/whatisnumpy.html) è una libreira utile per gestire i dati numerici in Python. +- **sklearn**. Questa è la libreria Scikit-learn. + +Importare alcune librerie che saranno di aiuto per le proprie attività. + +1. Con il seguente codice si aggiungono le importazioni: + + ```python + import matplotlib.pyplot as plt + import numpy as np + from sklearn import datasets, linear_model, model_selection + ``` + + Qui sopra vengono importati `matplottlib`, `numpy` da `sklearn` si importa `datasets`, `linear_model` e `model_selection`. `model_selection` viene usato per dividere i dati negli insiemi di addestramento e test. + +### L'insieme di dati riguardante il diabete + +L'[insieme dei dati sul diabetes](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) include 442 campioni di dati sul diabete, con 10 variabili caratteristiche, alcune delle quali includono: + +age (età): età in anni +bmi: indice di massa corporea (body mass index) +bp: media pressione sanguinea +s1 tc: Cellule T (un tipo di leucocito) + +✅ Questo insieme di dati include il concetto di "sesso" come caratteristica variabile importante per la ricerca sul diabete. Molti insiemi di dati medici includono questo tipo di classificazione binaria. Si rifletta su come categorizzazioni come questa potrebbe escludere alcune parti di una popolazione dai trattamenti. + +Ora si caricano i dati di x e y. + +> 🎓 Si ricordi, questo è apprendimento supervisionato (supervised learning), e serve dare un nome all'obiettivo 'y'. + +In una nuova cella di codice, caricare l'insieme di dati sul diabete chiamando `load_diabetes()`. Il parametro `return_X_y=True` segnala che `X` sarà una matrice di dati e `y` sarà l'obiettivo della regressione. + +1. Si aggiungono alcuni comandi di stampa per msotrare la forma della matrice di dati e suoi primi elementi: + + ```python + X, y = datasets.load_diabetes(return_X_y=True) + print(X.shape) + print(X[0]) + ``` + + Quella che viene ritornata è una tuple. Quello che si sta facento è assegnare i primi due valori della tupla a `X` e `y` rispettivamente. Per saperne di più sulle [tuples](https://wikipedia.org/wiki/Tuple). + + Si può vedere che questi dati hanno 442 elementi divisi in array di 10 elementi: + + ```text + (442, 10) + [ 0.03807591 0.05068012 0.06169621 0.02187235 -0.0442235 -0.03482076 + -0.04340085 -0.00259226 0.01990842 -0.01764613] + ``` + + ✅ Si rifletta sulla relazione tra i dati e l'obiettivo di regressione. La regressione lineare prevede le relazioni tra la caratteristica X e la variabile di destinazione Y. Si può trovare l'[obiettivo](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) per l'insieme di dati sul diabete nella documentazione? Cosa dimostra questo insieme di dati, dato questo obiettivo? + +2. Successivamente, selezionare una porzione di questo insieme di dati da tracciare sistemandola in un nuovo array usando la funzione di numpy's `newaxis`. Verrà usata la regressione lineare per generare una linea tra i quali in questi dati secondo il modello che determina. + + ```python + X = X[:, np.newaxis, 2] + ``` + + ✅ A picere, stampare i dati per verificarne la forma. + +3. Ora che si hanno dei dati pronti per essere tracciati, è possibile vedere se una macchina può aiutare a determinare una divisione logica tra i numeri in questo insieme di dati. Per fare ciò, è necessario dividere sia i dati (x) che l'obiettivo (Y) in insiemi di test e addestamento. Scikit-Learn ha un modo semplice per farlo; si possono dividere i dati di prova in un determinato punto. + + ```python + X_train, X_test, y_train, y_test = model_selection.train_test_split(X, y, test_size=0.33) + ``` + +4. Ora si è pronti ad addestare il modello! Caricare il modello di regressione lineare e addestrarlo con i propri insiemi di addestramento X e y usando `model.fit()`: + + ```python + model = linear_model.LinearRegression() + model.fit(X_train, y_train) + ``` + + ✅ `model.fit()` è una funzione che si vedrà in molte librerie ML tipo TensorFlow + +5. Successivamente creare una previsione usando i dati di test, con la funzione `predict()`. Questo servirà per tracciare la linea tra i gruppi di dati + + ```python + y_pred = model.predict(X_test) + ``` + +6. Ora è il momento di mostrare i dati in un tracciato. Matplotlib è uno strumento molto utile per questo compito.Si crei un grafico a dispersione (scatterplot) di tutti i dati del test X e Y e si utilizzi la previsione per disegnare una linea nel luogo più appropriato, tra i raggruppamenti dei dati del modello. + + ```python + plt.scatter(X_test, y_test, color='black') + plt.plot(X_test, y_pred, color='blue', linewidth=3) + plt.show() + ``` + + ![un grafico a dispersione che mostra i punti dati sul diabete](../images/scatterplot.png) + + ✅ Si pensi a cosa sta succedendo qui. Una linea retta scorre attraverso molti piccoli punti dati, ma cosa sta facendo esattamente? Si può capire come si dovrebbe utilizzare questa linea per prevedere dove un nuovo punto di dati non noto dovrebbe adattarsi alla relazione con l'asse y del tracciato? Si cerchi di mettere in parole l'uso pratico di questo modello. + +Congratulazioni, si è costruito il primo modello di regressione lineare, creato una previsione con esso, e visualizzata in una tracciato! + +--- + +## 🚀Sfida + +Tracciare una variabile diversa da questo insieme di dati. Suggerimento: modificare questa riga: `X = X[:, np.newaxis, 2]`. Dato l'obiettivo di questo insieme di dati, cosa si potrebbe riuscire a scoprire circa la progressione del diabete come matattia? + +## [Qui post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/10/) + +## Revisione e Auto Apprendimento + +In questo tutorial, si è lavorato con una semplice regressione lineare, piuttosto che un regressione univariata o multipla. Si legga circa le differenze tra questi metodi oppure si dia uno sguardo a [questo video](https://www.coursera.org/lecture/quantifying-relationships-regression-models/linear-vs-nonlinear-categorical-variables-ai2Ef) + +Si legga di più sul concetto di regressione e si pensi a quale tipo di domande potrebbero trovare risposta con questa tecnica. Seguire questo [tutorial](https://docs.microsoft.com/learn/modules/train-evaluate-regression-models?WT.mc_id=academic-15963-cxa) per approfondire la propria conoscenza. + +## Compito + +[Un insieme di dati diverso](assignment.md) diff --git a/2-Regression/translations/README.it.md b/2-Regression/translations/README.it.md new file mode 100644 index 00000000..19e0100b --- /dev/null +++ b/2-Regression/translations/README.it.md @@ -0,0 +1,34 @@ +# Modelli di regressione per machine learning + +## Argomento regionale: modelli di Regressione per i prezzi della zucca in Nord America 🎃 + +In Nord America, le zucche sono spesso intagliate in facce spaventose per Halloween. Si scoprirà di più su queste affascinanti verdure! + +![jack-o-lantern](../images/jack-o-lanterns.jpg) +> Foto di Beth Teutschmann su Unsplash + +## Cosa si imparerà + +Le lezioni in questa sezione riguardano i tipi di regressione nel contesto di machine learning. I modelli di regressione possono aiutare a determinare la _relazione_ tra le variabili. Questo tipo di modello può prevedere valori come lunghezza, temperatura o età, scoprendo così le relazioni tra le variabili mentre analizza i punti dati. + +In questa serie di lezioni si scoprirà la differenza tra regressione lineare e regressione logistica e quando si dovrebbe usare l'una o l'altra. + +In questo gruppo di lezioni si imposterà una configurazione per iniziare le attività di machine learning, inclusa la configurazione di Visual Studio Code per gestire i notebook, l'ambiente comune per i data scientist. Si scoprirà Scikit-learn, una libreria per machine learning, e si creeranno i primi modelli, concentrandosi in questo capitolo sui modelli di Regressione. + +> Esistono utili strumenti a basso codice che possono aiutare a imparare a lavorare con i modelli di regressione. Si provi [Azure Machine Learning per questa attività](https://docs.microsoft.com/learn/modules/create-regression-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa) + +### Lezioni + +1. [Gli Attrezzi Necessari](1-Tools/README.md) +2. [Gestione dati](2-Data/README.md) +3. [Regressione lineare e polinomiale](3-Linear/README.md) +4. [Regressione logistica](4-Logistic/README.md) + +--- +### Crediti + +"ML con regressione" scritto con ♥️ da [Jen Looper](https://twitter.com/jenlooper) + +♥️ I collaboratori del quiz includono: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) e [Ornella Altunyan](https://twitter.com/ornelladotcom) + +L'insieme di dati relativi alla zucca è suggerito da [questo progetto su](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) Kaggle e i suoi dati provengono dai [Rapporti Standard sui Mercati Terminali delle Colture Speciali](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) distribuiti dal Dipartimento dell'Agricoltura degli Stati Uniti. Sono stati aggiunti alcuni punti intorno al colore in base alla varietà per normalizzare la distribuzione. Questi dati sono di pubblico dominio. From 4be82a4530c550a5b404fa6ded6ec0e82a8c83a9 Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Mon, 12 Jul 2021 19:56:29 +0200 Subject: [PATCH 02/91] Ch2-1 readme/assignment translation completed --- .../1-Tools/translations/README.it.md | 55 ++++++++++--------- .../1-Tools/translations/assignment.it.md | 13 +++++ 2 files changed, 41 insertions(+), 27 deletions(-) create mode 100644 2-Regression/1-Tools/translations/assignment.it.md diff --git a/2-Regression/1-Tools/translations/README.it.md b/2-Regression/1-Tools/translations/README.it.md index 94c0a5c6..48c61d34 100644 --- a/2-Regression/1-Tools/translations/README.it.md +++ b/2-Regression/1-Tools/translations/README.it.md @@ -32,21 +32,21 @@ In questa lezione, si imparerà come: > Si prenda confidenza con Python tramite questa collezione di [moduli di apprendimento](https://docs.microsoft.com/users/jenlooper-2911/collections/mp1pagggd5qrq7?WT.mc_id=academic-15963-cxa) -3. **Installare Scikit-learn**, Seguendo [quest istruczionsi](https://scikit-learn.org/stable/install.html). Visto che ci si deve assicurare di usare Python 3, ci si raccomanda di usare un ambiente virtuale. Si noti che se si installa questa libreria in un M1 Mac, ci sono istruzioni speciali nella pagina di cui al riferimento qui sotto. +3. **Installare Scikit-learn**, seguendo [queste istruzioni](https://scikit-learn.org/stable/install.html). Visto che ci si deve assicurare di usare Python 3, ci si raccomanda di usare un ambiente virtuale. Si noti che se si installa questa libreria in un M1 Mac, ci sono istruzioni speciali nella pagina di cui al riferimento qui sopra. 1. **Installare Jupyter Notebook**. Servirà [installare il pacchetto Jupyter](https://pypi.org/project/jupyter/). -## Ambiente di crezione ML +## Ambiente di creazione ML Si useranno **notebook** per sviluppare il codice Python e creare modelli di machine learning. Questo tipo di file è uno strumento comune per i data scientist, e viene identificato dal suffisso o estensione `.ipynb`. -I notebook sono un ambiente interattivo che consente allo sviluppatore di scrivere codie, aggiungere note e scrivere documentazione attorno al codice il che è particolarmente utile per progetti sperimentali o orientati alla ricerca. +I notebook sono un ambiente interattivo che consente allo sviluppatore di scrivere codice, aggiungere note e scrivere documentazione attorno al codice il che è particolarmente utile per progetti sperimentali o orientati alla ricerca. ### Esercizio - lavorare con un notebook In questa cartella, si troverà il file _notebook.ipynb_. -1. Aprure _notebook.ipynb_ in Visual Studio Code. +1. Aprire _notebook.ipynb_ in Visual Studio Code. Un server Jupyter verrà lanciato con Python 3+. Si troveranno aree del notebook che possono essere `eseguite`, pezzi di codice. Si può eseguire un blocco di codice selezionando l'icona che assomiglia a un bottone di riproduzione. @@ -63,7 +63,7 @@ In questa cartella, si troverà il file _notebook.ipynb_. hello notebook ``` -![VS Code con un notebook aperto](images/notebook.png) +![VS Code con un notebook aperto](../images/notebook.png) Si può inframezzare il codice con commenti per auto documentare il notebook. @@ -71,25 +71,25 @@ Si può inframezzare il codice con commenti per auto documentare il notebook. ## Scikit-learn installato e funzionante -Adesso che Python è impostato nel proprio ambiente locale, e si è familiari con i notebook Jupyter, si acquisterà ora confidenza con Scikit-learn (si pronuncia con la `si` di `science`). Scikit-learn fornisce una [API estensiva](https://scikit-learn.org/stable/modules/classes.html#api-ref) che aiuta a eseguire attività ML. +Adesso che Python è impostato nel proprio ambiente locale, e si è familiari con i notebook Jupyter, si acquisterà ora confidenza con Scikit-learn (si pronuncia con la `si` della parola inglese `science`). Scikit-learn fornisce una [API estensiva](https://scikit-learn.org/stable/modules/classes.html#api-ref) che aiuta a eseguire attività ML. Stando al loro [sito web](https://scikit-learn.org/stable/getting_started.html), "Scikit-learn è una libreria di machine learning open source che supporta l'apprendimento assistito (supervised learning) e non assistito (unsuperivised learnin). Fornisce anche strumenti vari per l'adattamento del modello, la pre-elaborazione dei dati, la selezione e la valutazione dei modelli e molte altre utilità." In questo corso, si userà Scikit-learn e altri strumenti per costruire modelli di machine learning per eseguire quelle che vengono chiamate attività di 'machine learning tradizionale'. Si sono deliberamente evitate le reti neurali e il deep learning visto che saranno meglio trattati nel prossimo programma di studi 'AI per Principianti'. -Scikit-Learn rende semplice costruire modelli e valutarli per l'uso. Si concentra principalmente sull'utilizzo di dati numerici e contiene diversi insiemi di dati già pronti per l'uso come strumenti di apprendimento. Include anche modelli pre-costruiti per gli studenti da provare. Si esplora ora il processo di caricamento dei dati preconfezionati, e utilizzando un modello di stimatore incorporato prima il modello ML con Scikit-Learn con alcuni dati di base. +Scikit-learn rende semplice costruire modelli e valutarli per l'uso. Si concentra principalmente sull'utilizzo di dati numerici e contiene diversi insiemi di dati già pronti per l'uso come strumenti di apprendimento. Include anche modelli pre-costruiti per gli studenti da provare. Si esplora ora il processo di caricamento dei dati preconfezionati, e, utilizzando un modello di stimatore incorporato, un primo modello ML con Scikit-Learn con alcuni dati di base. -# Esercizio - Il Primo notebook Scikit-learn +## Esercizio - Il Primo notebook Scikit-learn > Questo tutorial è stato ispirato dall'[esempio di regressione lineare](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py) nel sito web di Scikit-learn. Nel file _notebook.ipynb_ associato a questa lezione, svuotare tutte le celle usando l'icona cestino ('trash can'). -In questa sezione, di lavorerà con un piccolo insieme di dati sul diabete che è incorporato in Scikit-learn per scopi di apprendimento. Si immagini di voler testare un trattamento per i pazienti diabetici. I modelli di machine learning potrebbero essere di aiuto nel determinare quali pazienti risponderebbero meglio al trattamento, in base a combinazioni di variabili. Anche un modello di regressione molto semplice, quando visualizzato, potrebbe mostrare informazioni sulle variabili che aiuteranno a organizzare le proprie sperimentazioni cliniche teoriche. +In questa sezione, di lavorerà con un piccolo insieme di dati sul diabete che è incorporato in Scikit-learn per scopi di apprendimento. Si immagini di voler testare un trattamento per i pazienti diabetici. I modelli di machine learning potrebbero essere di aiuto nel determinare quali pazienti risponderebbero meglio al trattamento, in base a combinazioni di variabili. Anche un modello di regressione molto semplice, quando visualizzato, potrebbe mostrare informazioni sulle variabili che aiuteranno a organizzare le sperimentazioni cliniche teoriche. -✅ Esistono molti tipi di metodi di regressione e quale scegliere dipende dalla risposta che si sta cercando. Se si vuole prevedere l'altezza probabile per una persona di una data età, si dovrebbe usare la regressione lineare, visto che si sta cercando un **valore numerico**. Se si è interessati a scoprire se un tipo di cucina dovrebbe essere considerato vegano o no, si sta cercando un' **assegnazione di categoria** quindi si dovrebbe usare la regressione logistica. Si imparerà di più sulla regressione logistica in seguito. Si pensi ad alcune domande che si possono chiedere ai dati e quale di questi metodi sarebbe più appropriato. +✅ Esistono molti tipi di metodi di regressione e quale scegliere dipende dalla risposta che si sta cercando. Se si vuole prevedere l'altezza probabile per una persona di una data età, si dovrebbe usare la regressione lineare, visto che si sta cercando un **valore numerico**. Se si è interessati a scoprire se un tipo di cucina dovrebbe essere considerato vegano o no, si sta cercando un'**assegnazione di categoria** quindi si dovrebbe usare la regressione logistica. Si imparerà di più sulla regressione logistica in seguito. Si pensi ad alcune domande che si possono chiedere ai dati e quale di questi metodi sarebbe più appropriato. -Si inizia su questo compito. +Si inizia con questa attività. ### Importare le librerie @@ -109,26 +109,26 @@ Importare alcune librerie che saranno di aiuto per le proprie attività. from sklearn import datasets, linear_model, model_selection ``` - Qui sopra vengono importati `matplottlib`, `numpy` da `sklearn` si importa `datasets`, `linear_model` e `model_selection`. `model_selection` viene usato per dividere i dati negli insiemi di addestramento e test. + Qui sopra vengono importati `matplottlib`, e `numpy`, da `sklearn` si importa `datasets`, `linear_model` e `model_selection`. `model_selection` viene usato per dividere i dati negli insiemi di addestramento e test. ### L'insieme di dati riguardante il diabete -L'[insieme dei dati sul diabetes](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) include 442 campioni di dati sul diabete, con 10 variabili caratteristiche, alcune delle quali includono: +L'[insieme dei dati sul diabete](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) include 442 campioni di dati sul diabete, con 10 variabili caratteristiche, alcune delle quali includono: -age (età): età in anni -bmi: indice di massa corporea (body mass index) -bp: media pressione sanguinea -s1 tc: Cellule T (un tipo di leucocito) +- age (età): età in anni +- bmi: indice di massa corporea (body mass index) +- bp: media pressione sanguinea +- s1 tc: Cellule T (un tipo di leucocito) ✅ Questo insieme di dati include il concetto di "sesso" come caratteristica variabile importante per la ricerca sul diabete. Molti insiemi di dati medici includono questo tipo di classificazione binaria. Si rifletta su come categorizzazioni come questa potrebbe escludere alcune parti di una popolazione dai trattamenti. -Ora si caricano i dati di x e y. +Ora si caricano i dati di X e y. > 🎓 Si ricordi, questo è apprendimento supervisionato (supervised learning), e serve dare un nome all'obiettivo 'y'. In una nuova cella di codice, caricare l'insieme di dati sul diabete chiamando `load_diabetes()`. Il parametro `return_X_y=True` segnala che `X` sarà una matrice di dati e `y` sarà l'obiettivo della regressione. -1. Si aggiungono alcuni comandi di stampa per msotrare la forma della matrice di dati e suoi primi elementi: +1. Si aggiungono alcuni comandi di stampa per msotrare la forma della matrice di dati e i suoi primi elementi: ```python X, y = datasets.load_diabetes(return_X_y=True) @@ -146,17 +146,17 @@ In una nuova cella di codice, caricare l'insieme di dati sul diabete chiamando ` -0.04340085 -0.00259226 0.01990842 -0.01764613] ``` - ✅ Si rifletta sulla relazione tra i dati e l'obiettivo di regressione. La regressione lineare prevede le relazioni tra la caratteristica X e la variabile di destinazione Y. Si può trovare l'[obiettivo](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) per l'insieme di dati sul diabete nella documentazione? Cosa dimostra questo insieme di dati, dato questo obiettivo? + ✅ Si rifletta sulla relazione tra i dati e l'obiettivo di regressione. La regressione lineare prevede le relazioni tra la caratteristica X e la variabile di destinazione y. Si può trovare l'[obiettivo](https://scikit-learn.org/stable/datasets/toy_dataset.html#diabetes-dataset) per l'insieme di dati sul diabete nella documentazione? Cosa dimostra questo insieme di dati, dato quell'obiettivo? -2. Successivamente, selezionare una porzione di questo insieme di dati da tracciare sistemandola in un nuovo array usando la funzione di numpy's `newaxis`. Verrà usata la regressione lineare per generare una linea tra i quali in questi dati secondo il modello che determina. +2. Successivamente, selezionare una porzione di questo insieme di dati da tracciare sistemandola in un nuovo array usando la funzione di numpy's `newaxis`. Verrà usata la regressione lineare per generare una linea tra i valori in questi dati secondo il modello che determina. ```python X = X[:, np.newaxis, 2] ``` - ✅ A picere, stampare i dati per verificarne la forma. + ✅ A piacere, stampare i dati per verificarne la forma. -3. Ora che si hanno dei dati pronti per essere tracciati, è possibile vedere se una macchina può aiutare a determinare una divisione logica tra i numeri in questo insieme di dati. Per fare ciò, è necessario dividere sia i dati (x) che l'obiettivo (Y) in insiemi di test e addestamento. Scikit-Learn ha un modo semplice per farlo; si possono dividere i dati di prova in un determinato punto. +3. Ora che si hanno dei dati pronti per essere tracciati, è possibile vedere se una macchina può aiutare a determinare una divisione logica tra i numeri in questo insieme di dati. Per fare ciò, è necessario dividere sia i dati (X) che l'obiettivo (y) in insiemi di test e addestamento. Scikit-learn ha un modo semplice per farlo; si possono dividere i dati di prova in un determinato punto. ```python X_train, X_test, y_train, y_test = model_selection.train_test_split(X, y, test_size=0.33) @@ -177,7 +177,7 @@ In una nuova cella di codice, caricare l'insieme di dati sul diabete chiamando ` y_pred = model.predict(X_test) ``` -6. Ora è il momento di mostrare i dati in un tracciato. Matplotlib è uno strumento molto utile per questo compito.Si crei un grafico a dispersione (scatterplot) di tutti i dati del test X e Y e si utilizzi la previsione per disegnare una linea nel luogo più appropriato, tra i raggruppamenti dei dati del modello. +6. Ora è il momento di mostrare i dati in un tracciato. Matplotlib è uno strumento molto utile per questo compito. Si crei un grafico a dispersione (scatterplot) di tutti i dati del test X e y e si utilizzi la previsione per disegnare una linea nel luogo più appropriato, tra i raggruppamenti dei dati del modello. ```python plt.scatter(X_test, y_test, color='black') @@ -199,12 +199,13 @@ Tracciare una variabile diversa da questo insieme di dati. Suggerimento: modific ## [Qui post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/10/) -## Revisione e Auto Apprendimento +## Riepilogo e Auto Apprendimento -In questo tutorial, si è lavorato con una semplice regressione lineare, piuttosto che un regressione univariata o multipla. Si legga circa le differenze tra questi metodi oppure si dia uno sguardo a [questo video](https://www.coursera.org/lecture/quantifying-relationships-regression-models/linear-vs-nonlinear-categorical-variables-ai2Ef) +In questo tutorial, si è lavorato con una semplice regressione lineare, piuttosto che una regressione univariata o multipla. Ci so informi circa le differenze tra questi metodi oppure si dia uno sguardo a [questo video](https://www.coursera.org/lecture/quantifying-relationships-regression-models/linear-vs-nonlinear-categorical-variables-ai2Ef) Si legga di più sul concetto di regressione e si pensi a quale tipo di domande potrebbero trovare risposta con questa tecnica. Seguire questo [tutorial](https://docs.microsoft.com/learn/modules/train-evaluate-regression-models?WT.mc_id=academic-15963-cxa) per approfondire la propria conoscenza. ## Compito -[Un insieme di dati diverso](assignment.md) +[Un insieme di dati diverso](assignment.it.md) + diff --git a/2-Regression/1-Tools/translations/assignment.it.md b/2-Regression/1-Tools/translations/assignment.it.md new file mode 100644 index 00000000..51fa1663 --- /dev/null +++ b/2-Regression/1-Tools/translations/assignment.it.md @@ -0,0 +1,13 @@ +# Regressione con Scikit-learn + +## Istruzioni + +Dare un'occhiata all'[insieme di dati Linnerud](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_linnerud.html#sklearn.datasets.load_linnerud) in Scikit-learn. Questo insieme di dati ha [obiettivi](https://scikit-learn.org/stable/datasets/toy_dataset.html#linnerrud-dataset) multipli: "Consiste di tre variabili di esercizio (dati) e tre variabili fisiologiche (obiettivo) raccolte da venti uomini di mezza età in un fitness club". + +Con parole proprie, descrivere come creare un modello di Regressione che tracci la relazione tra il punto vita e il numero di addominali realizzati. Fare lo stesso per gli altri punti dati in questo insieme di dati. + +## Rubrica + +| Criteri | Ottimo | Adeguato | Necessita miglioramento | +| ------------------------------ | ----------------------------------- | ----------------------------- | -------------------------- | +| Inviare un paragrafo descrittivo | Viene presentato un paragrafo ben scritto | Vengono inviate alcune frasi | Non viene fornita alcuna descrizione | From e062028016ede3c0006a9b7ba9a2f6c57ca382b7 Mon Sep 17 00:00:00 2001 From: edgargonarr <35715904+edgargonarr@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:41:46 -0500 Subject: [PATCH 03/91] Update README.md --- 3-Web-App/1-Web-App/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-Web-App/1-Web-App/README.md b/3-Web-App/1-Web-App/README.md index 6150aece..7c91acb5 100644 --- a/3-Web-App/1-Web-App/README.md +++ b/3-Web-App/1-Web-App/README.md @@ -165,7 +165,7 @@ Now you can build a Flask app to call your model and return similar results, but web-app/ static/ css/ - templates/ + templates/ notebook.ipynb ufo-model.pkl ``` From 721ec86311781b23a4f35a0c145bfa8d323305f5 Mon Sep 17 00:00:00 2001 From: edgargonarr <35715904+edgargonarr@users.noreply.github.com> Date: Tue, 13 Jul 2021 23:25:37 -0500 Subject: [PATCH 04/91] Update README.md In line 178, templates folder seems to be inside of static folder and this condition gives notfoundtemplate error. I suggest delete one tab, I discovered this solution because I sew your solutions folder on github where locations is correct --- 3-Web-App/1-Web-App/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3-Web-App/1-Web-App/README.md b/3-Web-App/1-Web-App/README.md index 6150aece..7c91acb5 100644 --- a/3-Web-App/1-Web-App/README.md +++ b/3-Web-App/1-Web-App/README.md @@ -165,7 +165,7 @@ Now you can build a Flask app to call your model and return similar results, but web-app/ static/ css/ - templates/ + templates/ notebook.ipynb ufo-model.pkl ``` From e975db0a74cf8ba14780cc2775a1d0d99f13e275 Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:14:43 +0800 Subject: [PATCH 05/91] Fix a spelling error in README.md --- 6-NLP/1-Introduction-to-NLP/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/6-NLP/1-Introduction-to-NLP/README.md b/6-NLP/1-Introduction-to-NLP/README.md index 0d47a1d7..227ad589 100644 --- a/6-NLP/1-Introduction-to-NLP/README.md +++ b/6-NLP/1-Introduction-to-NLP/README.md @@ -81,7 +81,7 @@ This gave the impression that Eliza understood the statement and was asking a fo ## Exercise - coding a basic conversational bot -A conversational bot, like Eliza, is a program that elicits user input and seems to understand and respond intelligently. Unlike Eliza, our bot will not have several rules giving it the appearance of having an intelligent conversation. Instead, out bot will have one ability only, to keep the conversation going with random responses that might work in almost any trivial conversation. +A conversational bot, like Eliza, is a program that elicits user input and seems to understand and respond intelligently. Unlike Eliza, our bot will not have several rules giving it the appearance of having an intelligent conversation. Instead, our bot will have one ability only, to keep the conversation going with random responses that might work in almost any trivial conversation. ### The plan From 5f225d0063e3bce27429a00df83ac2b973b47925 Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:19:45 +0800 Subject: [PATCH 06/91] Add 6.1 Chinese and English README.md --- .../translations/README.zh-cn.md | 225 ++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md new file mode 100644 index 00000000..06ed9ca0 --- /dev/null +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -0,0 +1,225 @@ +# Introduction to natural language processing +# 自然语言处理介绍 +This lesson covers a brief history and important concepts of *natural language processing*, a subfield of *computational linguistics*. +这节课讲解了*自然语言处理*简要历史和重要概念,*自然语言处理*是计算语言学的一个子领域。 +## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) + +## Introduction +## 介绍 +NLP, as it is commonly known, is one of the best-known areas where machine learning has been applied and used in production software. +众所周知,自然语言处理(Natural Language Processing, NLP)是机器学习在生产软件中应用最广泛的领域之一。 + +✅ Can you think of software that you use every day that probably has some NLP embedded? What about your word processing programs or mobile apps that you use regularly? + +✅你能想到哪些你日常生活中使用的软件嵌入了某些自然语言处理技术呢?你经常使用的文字处理程序或移动应用程序是否嵌入了自然语言处理技术呢? + +You will learn about: +你将会学习到: + +- **The idea of languages**. How languages developed and what the major areas of study have been. +- **Definition and concepts**. You will also learn definitions and concepts about how computers process text, including parsing, grammar, and identifying nouns and verbs. There are some coding tasks in this lesson, and several important concepts are introduced that you will learn to code later on in the next lessons. +- **语言的思想**. 语言的发展历程及主要研究领域. +- **定义和概念**. 你还将学习到有关计算机如何处理文本的定义和概念,包括解析、语法以及名词和动词的识别。本节课程包含一些编码任务并介绍了几个重要的概念,你将在下一节课中学习编码实现这些概念。 + +## Computational linguistics +## 计算语言学 + +Computational linguistics is an area of research and development over many decades that studies how computers can work with, and even understand, translate, and communicate with languages. natural language processing (NLP) is a related field focused on how computers can process 'natural', or human, languages. +计算语言学是一个经过几十年研究和发展的领域,它研究计算机如何使用语言、理解语言、翻译语言及使用语言交流。自然语言处理(NLP)是计算语言学中一个专注于计算机如何处理“自然”或人类语言的相关领域, + +### Example - phone dictation +### 例子 - 电话号码识别 + +If you have ever dictated to your phone instead of typing or asked a virtual assistant a question, your speech was converted into a text form and then processed or *parsed* from the language you spoke. The detected keywords were then processed into a format that the phone or assistant could understand and act on. +如果你曾经在手机上使用语音输入替代键盘输入或者向语音助手小娜提问,那么你的语音将被转录为文本形式后进行处理或者叫*解析*。被检测到的关键字最后将被处理成手机或语音助手可以理解并采取行动的格式。 + +![comprehension](images/comprehension.png) +> Real linguistic comprehension is hard! Image by [Jen Looper](https://twitter.com/jenlooper) +> 真实的语言理解十分困难!图源:[Jen Looper](https://twitter.com/jenlooper) + +### How is this technology made possible? +### 这项技术是如何实现的? + +This is possible because someone wrote a computer program to do this. A few decades ago, some science fiction writers predicted that people would mostly speak to their computers, and the computers would always understand exactly what they meant. Sadly, it turned out to be a harder problem that many imagined, and while it is a much better understood problem today, there are significant challenges in achieving 'perfect' natural language processing when it comes to understanding the meaning of a sentence. This is a particularly hard problem when it comes to understanding humour or detecting emotions such as sarcasm in a sentence. +有人编写了一个计算机程序来实现这项技术。几十年前,一些科幻作家预测人类很大可能会和他们的电脑对话,而电脑总是能准确地理解人类的意思。可惜的是,事实证明这是一个比许多人想象中更难实现的问题,虽然今天这个问题已经被初步解决,但在理解句子的含义时,要实现“完美”的自然语言处理仍然存在重大挑战。句子中的幽默理解或讽刺等情绪的检测是一个特别困难的问题。 + +At this point, you may be remembering school classes where the teacher covered the parts of grammar in a sentence. In some countries, students are taught grammar and linguistics as a dedicated subject, but in many, these topics are included as part of learning a language: either your first language in primary school (learning to read and write) and perhaps a second language in post-primary, or high school. Don't worry if you are not an expert at differentiating nouns from verbs or adverbs from adjectives! +此时,你可能会想起学校课堂上老师讲解的部分句子语法。在某些国家/地区,语法和语言学知识是学生的专题课内容。但在另一些国家/地区,不管是在小学时的第一语言(学习阅读和写作),或者在高年级及高中时学习的第二语言中,语法及语言学知识是作为学习语言的一部分教学的。如果你不能很好地区分名词与动词或者区分副词与形容词,请不要担心! + +If you struggle with the difference between the *simple present* and *present progressive*, you are not alone. This is a challenging thing for many people, even native speakers of a language. The good news is that computers are really good at applying formal rules, and you will learn to write code that can *parse* a sentence as well as a human. The greater challenge you will examine later is understanding the *meaning*, and *sentiment*, of a sentence. +如果你还为区分*一般现在时*与*现在进行时*而烦恼,你并不是一个人。即使是对以这门语言为母语的人在内的很多人来说这都是一项有挑战性的任务。好消息是,计算机非常善于应用标准的规则,你将学会编写可以像人一样"解析"句子的代码。稍后你将面对的更大挑战是理解句子的*语义*和*情绪*。 + +## Prerequisites +## 前提 + +For this lesson, the main prerequisite is being able to read and understand the language of this lesson. There are no math problems or equations to solve. While the original author wrote this lesson in English, it is also translated into other languages, so you could be reading a translation. There are examples where a number of different languages are used (to compare the different grammar rules of different languages). These are *not* translated, but the explanatory text is, so the meaning should be clear. +本节教程的主要先决条件是能够阅读和理解本节教程的语言。本节中没有数学问题或方程需要解决。虽然原作者用英文写了这教程,但它也被翻译成其他语言,所以你可能在阅读翻译内容。有使用多种不同语言的示例(以比较不同语言的不同语法规则)。这些是*未*翻译的,但解释性文本是翻译内容,所以表义应当是清晰的。 + +For the coding tasks, you will use Python and the examples are using Python 3.8. +编程任务中,你将会使用Python语言,示例使用的是Python 3.8版本。 + +In this section, you will need, and use: +在本节中你将需要并使用: + +- **Python 3 comprehension**. Programming language comprehension in Python 3, this lesson uses input, loops, file reading, arrays. +- **Visual Studio Code + extension**. We will use Visual Studio Code and its Python extension. You can also use a Python IDE of your choice. +- **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob) is a simplified text processing library for Python. Follow the instructions on the TextBlob site to install it on your system (install the corpora as well, as shown below): +- **Python 3 理解**. Python 3中的编程语言理解,本课使用输入、循环、文件读取、数组。 +- **Visual Studio Code + 扩展**. 我们将使用 Visual Studio Code 及其 Python 扩展。你还可以使用你选择的 Python IDE。 +- **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob)是一个简化的 Python 文本处理库。按照 TextBlob 网站上的说明在您的系统上安装它(也安装语料库,如下所示): +- + ```bash + pip install -U textblob + python -m textblob.download_corpora + ``` + +> 💡 Tip: You can run Python directly in VS Code environments. Check the [docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa) for more information. +> 💡 提示:可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 + +## Talking to machines +## 与机器对话 + +The history of trying to make computers understand human language goes back decades, and one of the earliest scientists to consider natural language processing was *Alan Turing*. +试图让计算机理解人类语言的历史可以追溯到几十年前,最早考虑自然语言处理的科学家之一是 *Alan Turing*。 + +### The 'Turing test' +### 图灵测试 + + +When Turing was researching *artificial intelligence* in the 1950's, he considered if a conversational test could be given to a human and computer (via typed correspondence) where the human in the conversation was not sure if they were conversing with another human or a computer. +当图灵在1950年代研究*人工智能*时,他考虑是否可以对人和计算机进行对话测试(通过打字对应),其中对话中的人不确定他们是在与另一个人交谈还是与计算机交谈. + +If, after a certain length of conversation, the human could not determine that the answers were from a computer or not, then could the computer be said to be *thinking*? +如果经过一定时间的交谈,人类无法确定答案是否来自计算机,那么是否可以说计算机正在“思考”? + +### The inspiration - 'the imitation game' +### 灵感 - “模仿游戏” + +The idea for this came from a party game called *The Imitation Game* where an interrogator is alone in a room and tasked with determining which of two people (in another room) are male and female respectively. The interrogator can send notes, and must try to think of questions where the written answers reveal the gender of the mystery person. Of course, the players in the other room are trying to trick the interrogator by answering questions in such as way as to mislead or confuse the interrogator, whilst also giving the appearance of answering honestly. +这个想法来自一个名为 *模仿游戏* 的派对游戏,其中一名审讯者独自一人在一个房间里,负责确定两个人(在另一个房间里)是男性还是女性。审讯者可以传递笔记,并且需要想出能够揭示神秘人性别的问题。当然,另一个房间的玩家试图通过回答问题的方式来欺骗审讯者,例如误导或迷惑审讯者,同时表现出诚实回答的样子。 + +### Eliza的研发 + +In the 1960's an MIT scientist called *Joseph Weizenbaum* developed [*Eliza*](https:/wikipedia.org/wiki/ELIZA), a computer 'therapist' that would ask the human questions and give the appearance of understanding their answers. However, while Eliza could parse a sentence and identify certain grammatical constructs and keywords so as to give a reasonable answer, it could not be said to *understand* the sentence. If Eliza was presented with a sentence following the format "**I am** sad" it might rearrange and substitute words in the sentence to form the response "How long have **you been** sad". +在 1960 年代,一位名叫 *Joseph Weizenbaum* 的麻省理工学院科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA),Eliza是一位计算机“治疗师”,它可以向人类提出问题并表现出理解他们的答案。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”,它可能会重新排列并替换句子中的单词以形成响应“How long have ** you been** sad"。 + +This gave the impression that Eliza understood the statement and was asking a follow-on question, whereas in reality, it was changing the tense and adding some words. If Eliza could not identify a keyword that it had a response for, it would instead give a random response that could be applicable to many different statements. Eliza could be easily tricked, for instance if a user wrote "**You are** a bicycle" it might respond with "How long have **I been** a bicycle?", instead of a more reasoned response. +这给人的印象是伊丽莎理解了这句话,并在问一个后续问题,而实际上,它是在改变时态并添加一些词。如果 Eliza 无法识别它有响应的关键字,它会给出一个随机响应,该响应可以适用于许多不同的语句。 Eliza 很容易被欺骗,例如,如果用户写了**You are** a bicycle",它可能会回复"How long have **I been** a bicycle?",而不是更合理的回答。 + +[![Chatting with Eliza](https://img.youtube.com/vi/RMK9AphfLco/0.jpg)](https://youtu.be/RMK9AphfLco "Chatting with Eliza") + +> 🎥 Click the image above for a video about original ELIZA program +> 🎥 点击上方的图片查看真实的ELIZA程序视频 + +> Note: You can read the original description of [Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract) published in 1966 if you have an ACM account. Alternately, read about Eliza on [wikipedia](https://wikipedia.org/wiki/ELIZA) +> 注意:如果你拥有ACM账户,你可以阅读1996年发表的[Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract)的原始介绍。或者,在[wikipedia](https://wikipedia.org/wiki/ELIZA)阅读有关 Eliza 的信息 + +## Exercise - coding a basic conversational bot +## 联系 - 编码实现一个基础的对话机器人 + +A conversational bot, like Eliza, is a program that elicits user input and seems to understand and respond intelligently. Unlike Eliza, our bot will not have several rules giving it the appearance of having an intelligent conversation. Instead, out bot will have one ability only, to keep the conversation going with random responses that might work in almost any trivial conversation. +像 Eliza 一样的对话机器人是一个似乎可以智能地理解和响应用户输入的程序。与 Eliza 不同的是,我们的机器人不会用规则让它看起来像是在进行智能对话。取而代之的是,我们的对话机器人将只有一种能力,通过几乎在所有琐碎对话中都适用的随机响应保持对话的进行。 + +### The plan +### 计划 + +Your steps when building a conversational bot: +搭建聊天机器人的步骤 + +1. Print instructions advising the user how to interact with the bot +2. Start a loop + 1. Accept user input + 2. If user has asked to exit, then exit + 3. Process user input and determine response (in this case, the response is a random choice from a list of possible generic responses) + 4. Print response +3. loop back to step 2 +1. 打印指导用户如何与机器人交互的说明 +2. 开启循环 + 1. 获取用户输入 + 2. 如果用户要求退出,就退出 + 3. 处理用户输入并选择一个回答(在这个例子中,回答从一个可能的通用回答列表中随机选择) + 4. 打印回答 +3. 重复步骤2 + +### Building the bot +### 构建聊天机器人 + +接下来让我们构建聊天机器人。我们将从定义一些短语开始。 + +1. 使用以下随机响应在 Python 中自己创建此机器人: + + ```python + random_responses = ["That is quite interesting, please tell me more.", + "I see. Do go on.", + "Why do you say that?", + "Funny weather we've been having, isn't it?", + "Let's change the subject.", + "Did you catch the game last night?"] + ``` + + Here is some sample output to guide you (user input is on the lines starting with `>`): + + ```output + Hello, I am Marvin, the simple robot. + You can end this conversation at any time by typing 'bye' + After typing each answer, press 'enter' + How are you today? + > I am good thanks + That is quite interesting, please tell me more. + > today I went for a walk + Did you catch the game last night? + > I did, but my team lost + Funny weather we've been having, isn't it? + > yes but I hope next week is better + Let's change the subject. + > ok, lets talk about music + Why do you say that? + > because I like music! + Why do you say that? + > bye + It was nice talking to you, goodbye! + ``` + + 该任务的一种可能解决方案在[这里](solution/bot.py) + + ✅ Stop and consider + ✅ 停止并思考 + + 1. Do you think the random responses would 'trick' someone into thinking that the bot actually understood them? + 2. What features would the bot need to be more effective? + 3. If a bot could really 'understand' the meaning of a sentence, would it need to 'remember' the meaning of previous sentences in a conversation too? + + 1. 你认为随机响应会“欺骗”某人认为机器人实际上理解他们吗? + 2. 机器人需要哪些功能才能更有效? + 3. 如果机器人真的可以“理解”一个句子的意思,它是否也需要“记住”对话中前面句子的意思? + +--- + +## 🚀Challenge +## 🚀挑战 + +Choose one of the "stop and consider" elements above and either try to implement them in code or write a solution on paper using pseudocode. +选择上面的“停止并思考”元素之一,然后尝试在代码中实现它们或使用伪代码在纸上编写解决方案。 + +In the next lesson, you'll learn about a number of other approaches to parsing natural language and machine learning. +在下一课中,您将了解解析自然语言和机器学习的许多其他方法。 + +## [Post-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/32/) +## [课后测验](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/32/) + +## Review & Self Study +## 复习与自学 + +Take a look at the references below as further reading opportunities. +看看下面的参考资料作为进一步的阅读机会。 + +### References +### 参考 + +1. Schubert, Lenhart, "Computational Linguistics", *The Stanford Encyclopedia of Philosophy* (Spring 2020 Edition), Edward N. Zalta (ed.), URL = . +2. Princeton University "About WordNet." [WordNet](https://wordnet.princeton.edu/). Princeton University. 2010. + +## Assignment +## 任务 + +[查找一个机器人](assignment.md) From a0e4826c25c771f1c8559def049b955347854ade Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:24:33 +0800 Subject: [PATCH 07/91] Add Chinese README for 6.1 --- .../translations/README.zh-cn.md | 69 +------------------ 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 06ed9ca0..8dbfebc2 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -1,69 +1,41 @@ -# Introduction to natural language processing # 自然语言处理介绍 -This lesson covers a brief history and important concepts of *natural language processing*, a subfield of *computational linguistics*. 这节课讲解了*自然语言处理*简要历史和重要概念,*自然语言处理*是计算语言学的一个子领域。 -## [Pre-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) -## Introduction +## [课前测验]](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) + ## 介绍 -NLP, as it is commonly known, is one of the best-known areas where machine learning has been applied and used in production software. 众所周知,自然语言处理(Natural Language Processing, NLP)是机器学习在生产软件中应用最广泛的领域之一。 -✅ Can you think of software that you use every day that probably has some NLP embedded? What about your word processing programs or mobile apps that you use regularly? - ✅你能想到哪些你日常生活中使用的软件嵌入了某些自然语言处理技术呢?你经常使用的文字处理程序或移动应用程序是否嵌入了自然语言处理技术呢? -You will learn about: 你将会学习到: -- **The idea of languages**. How languages developed and what the major areas of study have been. -- **Definition and concepts**. You will also learn definitions and concepts about how computers process text, including parsing, grammar, and identifying nouns and verbs. There are some coding tasks in this lesson, and several important concepts are introduced that you will learn to code later on in the next lessons. - **语言的思想**. 语言的发展历程及主要研究领域. - **定义和概念**. 你还将学习到有关计算机如何处理文本的定义和概念,包括解析、语法以及名词和动词的识别。本节课程包含一些编码任务并介绍了几个重要的概念,你将在下一节课中学习编码实现这些概念。 - -## Computational linguistics ## 计算语言学 -Computational linguistics is an area of research and development over many decades that studies how computers can work with, and even understand, translate, and communicate with languages. natural language processing (NLP) is a related field focused on how computers can process 'natural', or human, languages. 计算语言学是一个经过几十年研究和发展的领域,它研究计算机如何使用语言、理解语言、翻译语言及使用语言交流。自然语言处理(NLP)是计算语言学中一个专注于计算机如何处理“自然”或人类语言的相关领域, - -### Example - phone dictation ### 例子 - 电话号码识别 -If you have ever dictated to your phone instead of typing or asked a virtual assistant a question, your speech was converted into a text form and then processed or *parsed* from the language you spoke. The detected keywords were then processed into a format that the phone or assistant could understand and act on. 如果你曾经在手机上使用语音输入替代键盘输入或者向语音助手小娜提问,那么你的语音将被转录为文本形式后进行处理或者叫*解析*。被检测到的关键字最后将被处理成手机或语音助手可以理解并采取行动的格式。 ![comprehension](images/comprehension.png) -> Real linguistic comprehension is hard! Image by [Jen Looper](https://twitter.com/jenlooper) > 真实的语言理解十分困难!图源:[Jen Looper](https://twitter.com/jenlooper) - -### How is this technology made possible? ### 这项技术是如何实现的? -This is possible because someone wrote a computer program to do this. A few decades ago, some science fiction writers predicted that people would mostly speak to their computers, and the computers would always understand exactly what they meant. Sadly, it turned out to be a harder problem that many imagined, and while it is a much better understood problem today, there are significant challenges in achieving 'perfect' natural language processing when it comes to understanding the meaning of a sentence. This is a particularly hard problem when it comes to understanding humour or detecting emotions such as sarcasm in a sentence. 有人编写了一个计算机程序来实现这项技术。几十年前,一些科幻作家预测人类很大可能会和他们的电脑对话,而电脑总是能准确地理解人类的意思。可惜的是,事实证明这是一个比许多人想象中更难实现的问题,虽然今天这个问题已经被初步解决,但在理解句子的含义时,要实现“完美”的自然语言处理仍然存在重大挑战。句子中的幽默理解或讽刺等情绪的检测是一个特别困难的问题。 -At this point, you may be remembering school classes where the teacher covered the parts of grammar in a sentence. In some countries, students are taught grammar and linguistics as a dedicated subject, but in many, these topics are included as part of learning a language: either your first language in primary school (learning to read and write) and perhaps a second language in post-primary, or high school. Don't worry if you are not an expert at differentiating nouns from verbs or adverbs from adjectives! 此时,你可能会想起学校课堂上老师讲解的部分句子语法。在某些国家/地区,语法和语言学知识是学生的专题课内容。但在另一些国家/地区,不管是在小学时的第一语言(学习阅读和写作),或者在高年级及高中时学习的第二语言中,语法及语言学知识是作为学习语言的一部分教学的。如果你不能很好地区分名词与动词或者区分副词与形容词,请不要担心! -If you struggle with the difference between the *simple present* and *present progressive*, you are not alone. This is a challenging thing for many people, even native speakers of a language. The good news is that computers are really good at applying formal rules, and you will learn to write code that can *parse* a sentence as well as a human. The greater challenge you will examine later is understanding the *meaning*, and *sentiment*, of a sentence. 如果你还为区分*一般现在时*与*现在进行时*而烦恼,你并不是一个人。即使是对以这门语言为母语的人在内的很多人来说这都是一项有挑战性的任务。好消息是,计算机非常善于应用标准的规则,你将学会编写可以像人一样"解析"句子的代码。稍后你将面对的更大挑战是理解句子的*语义*和*情绪*。 - -## Prerequisites ## 前提 -For this lesson, the main prerequisite is being able to read and understand the language of this lesson. There are no math problems or equations to solve. While the original author wrote this lesson in English, it is also translated into other languages, so you could be reading a translation. There are examples where a number of different languages are used (to compare the different grammar rules of different languages). These are *not* translated, but the explanatory text is, so the meaning should be clear. 本节教程的主要先决条件是能够阅读和理解本节教程的语言。本节中没有数学问题或方程需要解决。虽然原作者用英文写了这教程,但它也被翻译成其他语言,所以你可能在阅读翻译内容。有使用多种不同语言的示例(以比较不同语言的不同语法规则)。这些是*未*翻译的,但解释性文本是翻译内容,所以表义应当是清晰的。 -For the coding tasks, you will use Python and the examples are using Python 3.8. 编程任务中,你将会使用Python语言,示例使用的是Python 3.8版本。 -In this section, you will need, and use: 在本节中你将需要并使用: -- **Python 3 comprehension**. Programming language comprehension in Python 3, this lesson uses input, loops, file reading, arrays. -- **Visual Studio Code + extension**. We will use Visual Studio Code and its Python extension. You can also use a Python IDE of your choice. -- **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob) is a simplified text processing library for Python. Follow the instructions on the TextBlob site to install it on your system (install the corpora as well, as shown below): - **Python 3 理解**. Python 3中的编程语言理解,本课使用输入、循环、文件读取、数组。 - **Visual Studio Code + 扩展**. 我们将使用 Visual Studio Code 及其 Python 扩展。你还可以使用你选择的 Python IDE。 - **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob)是一个简化的 Python 文本处理库。按照 TextBlob 网站上的说明在您的系统上安装它(也安装语料库,如下所示): @@ -73,66 +45,40 @@ In this section, you will need, and use: python -m textblob.download_corpora ``` -> 💡 Tip: You can run Python directly in VS Code environments. Check the [docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa) for more information. > 💡 提示:可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 -## Talking to machines ## 与机器对话 -The history of trying to make computers understand human language goes back decades, and one of the earliest scientists to consider natural language processing was *Alan Turing*. 试图让计算机理解人类语言的历史可以追溯到几十年前,最早考虑自然语言处理的科学家之一是 *Alan Turing*。 - -### The 'Turing test' ### 图灵测试 - -When Turing was researching *artificial intelligence* in the 1950's, he considered if a conversational test could be given to a human and computer (via typed correspondence) where the human in the conversation was not sure if they were conversing with another human or a computer. 当图灵在1950年代研究*人工智能*时,他考虑是否可以对人和计算机进行对话测试(通过打字对应),其中对话中的人不确定他们是在与另一个人交谈还是与计算机交谈. -If, after a certain length of conversation, the human could not determine that the answers were from a computer or not, then could the computer be said to be *thinking*? 如果经过一定时间的交谈,人类无法确定答案是否来自计算机,那么是否可以说计算机正在“思考”? - -### The inspiration - 'the imitation game' ### 灵感 - “模仿游戏” -The idea for this came from a party game called *The Imitation Game* where an interrogator is alone in a room and tasked with determining which of two people (in another room) are male and female respectively. The interrogator can send notes, and must try to think of questions where the written answers reveal the gender of the mystery person. Of course, the players in the other room are trying to trick the interrogator by answering questions in such as way as to mislead or confuse the interrogator, whilst also giving the appearance of answering honestly. 这个想法来自一个名为 *模仿游戏* 的派对游戏,其中一名审讯者独自一人在一个房间里,负责确定两个人(在另一个房间里)是男性还是女性。审讯者可以传递笔记,并且需要想出能够揭示神秘人性别的问题。当然,另一个房间的玩家试图通过回答问题的方式来欺骗审讯者,例如误导或迷惑审讯者,同时表现出诚实回答的样子。 ### Eliza的研发 -In the 1960's an MIT scientist called *Joseph Weizenbaum* developed [*Eliza*](https:/wikipedia.org/wiki/ELIZA), a computer 'therapist' that would ask the human questions and give the appearance of understanding their answers. However, while Eliza could parse a sentence and identify certain grammatical constructs and keywords so as to give a reasonable answer, it could not be said to *understand* the sentence. If Eliza was presented with a sentence following the format "**I am** sad" it might rearrange and substitute words in the sentence to form the response "How long have **you been** sad". 在 1960 年代,一位名叫 *Joseph Weizenbaum* 的麻省理工学院科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA),Eliza是一位计算机“治疗师”,它可以向人类提出问题并表现出理解他们的答案。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”,它可能会重新排列并替换句子中的单词以形成响应“How long have ** you been** sad"。 -This gave the impression that Eliza understood the statement and was asking a follow-on question, whereas in reality, it was changing the tense and adding some words. If Eliza could not identify a keyword that it had a response for, it would instead give a random response that could be applicable to many different statements. Eliza could be easily tricked, for instance if a user wrote "**You are** a bicycle" it might respond with "How long have **I been** a bicycle?", instead of a more reasoned response. 这给人的印象是伊丽莎理解了这句话,并在问一个后续问题,而实际上,它是在改变时态并添加一些词。如果 Eliza 无法识别它有响应的关键字,它会给出一个随机响应,该响应可以适用于许多不同的语句。 Eliza 很容易被欺骗,例如,如果用户写了**You are** a bicycle",它可能会回复"How long have **I been** a bicycle?",而不是更合理的回答。 [![Chatting with Eliza](https://img.youtube.com/vi/RMK9AphfLco/0.jpg)](https://youtu.be/RMK9AphfLco "Chatting with Eliza") -> 🎥 Click the image above for a video about original ELIZA program > 🎥 点击上方的图片查看真实的ELIZA程序视频 -> Note: You can read the original description of [Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract) published in 1966 if you have an ACM account. Alternately, read about Eliza on [wikipedia](https://wikipedia.org/wiki/ELIZA) > 注意:如果你拥有ACM账户,你可以阅读1996年发表的[Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract)的原始介绍。或者,在[wikipedia](https://wikipedia.org/wiki/ELIZA)阅读有关 Eliza 的信息 -## Exercise - coding a basic conversational bot ## 联系 - 编码实现一个基础的对话机器人 -A conversational bot, like Eliza, is a program that elicits user input and seems to understand and respond intelligently. Unlike Eliza, our bot will not have several rules giving it the appearance of having an intelligent conversation. Instead, out bot will have one ability only, to keep the conversation going with random responses that might work in almost any trivial conversation. 像 Eliza 一样的对话机器人是一个似乎可以智能地理解和响应用户输入的程序。与 Eliza 不同的是,我们的机器人不会用规则让它看起来像是在进行智能对话。取而代之的是,我们的对话机器人将只有一种能力,通过几乎在所有琐碎对话中都适用的随机响应保持对话的进行。 -### The plan ### 计划 -Your steps when building a conversational bot: 搭建聊天机器人的步骤 -1. Print instructions advising the user how to interact with the bot -2. Start a loop - 1. Accept user input - 2. If user has asked to exit, then exit - 3. Process user input and determine response (in this case, the response is a random choice from a list of possible generic responses) - 4. Print response -3. loop back to step 2 1. 打印指导用户如何与机器人交互的说明 2. 开启循环 1. 获取用户输入 @@ -141,7 +87,6 @@ Your steps when building a conversational bot: 4. 打印回答 3. 重复步骤2 -### Building the bot ### 构建聊天机器人 接下来让我们构建聊天机器人。我们将从定义一些短语开始。 @@ -194,32 +139,22 @@ Your steps when building a conversational bot: 3. 如果机器人真的可以“理解”一个句子的意思,它是否也需要“记住”对话中前面句子的意思? --- - -## 🚀Challenge ## 🚀挑战 -Choose one of the "stop and consider" elements above and either try to implement them in code or write a solution on paper using pseudocode. 选择上面的“停止并思考”元素之一,然后尝试在代码中实现它们或使用伪代码在纸上编写解决方案。 -In the next lesson, you'll learn about a number of other approaches to parsing natural language and machine learning. 在下一课中,您将了解解析自然语言和机器学习的许多其他方法。 -## [Post-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/32/) ## [课后测验](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/32/) -## Review & Self Study ## 复习与自学 -Take a look at the references below as further reading opportunities. 看看下面的参考资料作为进一步的阅读机会。 - -### References ### 参考 1. Schubert, Lenhart, "Computational Linguistics", *The Stanford Encyclopedia of Philosophy* (Spring 2020 Edition), Edward N. Zalta (ed.), URL = . 2. Princeton University "About WordNet." [WordNet](https://wordnet.princeton.edu/). Princeton University. 2010. -## Assignment ## 任务 [查找一个机器人](assignment.md) From 4bccc6ae2fe5cdbaf3dd91be4bf53ba3ae3d0236 Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:31:38 +0800 Subject: [PATCH 08/91] Fix a image path error --- 6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 8dbfebc2..0b5b83f5 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -1,7 +1,7 @@ # 自然语言处理介绍 这节课讲解了*自然语言处理*简要历史和重要概念,*自然语言处理*是计算语言学的一个子领域。 -## [课前测验]](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) +## [课前测验](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) ## 介绍 众所周知,自然语言处理(Natural Language Processing, NLP)是机器学习在生产软件中应用最广泛的领域之一。 @@ -19,7 +19,7 @@ 如果你曾经在手机上使用语音输入替代键盘输入或者向语音助手小娜提问,那么你的语音将被转录为文本形式后进行处理或者叫*解析*。被检测到的关键字最后将被处理成手机或语音助手可以理解并采取行动的格式。 -![comprehension](images/comprehension.png) +![comprehension](../images/comprehension.png) > 真实的语言理解十分困难!图源:[Jen Looper](https://twitter.com/jenlooper) ### 这项技术是如何实现的? @@ -127,7 +127,6 @@ 该任务的一种可能解决方案在[这里](solution/bot.py) - ✅ Stop and consider ✅ 停止并思考 1. Do you think the random responses would 'trick' someone into thinking that the bot actually understood them? From 31b963c1d8621b6f05e64e5361924ea3ce8645c4 Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:33:15 +0800 Subject: [PATCH 09/91] ind --- 6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 0b5b83f5..9d1e0665 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -102,8 +102,8 @@ "Did you catch the game last night?"] ``` - Here is some sample output to guide you (user input is on the lines starting with `>`): - + 以下是一些指导你的示例输出(用户输入位于以 `>` 开头的行上): + ```output Hello, I am Marvin, the simple robot. You can end this conversation at any time by typing 'bye' @@ -128,10 +128,6 @@ 该任务的一种可能解决方案在[这里](solution/bot.py) ✅ 停止并思考 - - 1. Do you think the random responses would 'trick' someone into thinking that the bot actually understood them? - 2. What features would the bot need to be more effective? - 3. If a bot could really 'understand' the meaning of a sentence, would it need to 'remember' the meaning of previous sentences in a conversation too? 1. 你认为随机响应会“欺骗”某人认为机器人实际上理解他们吗? 2. 机器人需要哪些功能才能更有效? From 4a7ab265381462067304e844d37d3ed7d3642736 Mon Sep 17 00:00:00 2001 From: lty <247969917@qq.com> Date: Wed, 14 Jul 2021 18:35:01 +0800 Subject: [PATCH 10/91] ind --- 6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 9d1e0665..75cd69da 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -45,7 +45,7 @@ python -m textblob.download_corpora ``` -> 💡 提示:可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 +> 💡 提示:可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 ## 与机器对话 @@ -61,7 +61,7 @@ ### Eliza的研发 -在 1960 年代,一位名叫 *Joseph Weizenbaum* 的麻省理工学院科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA),Eliza是一位计算机“治疗师”,它可以向人类提出问题并表现出理解他们的答案。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”,它可能会重新排列并替换句子中的单词以形成响应“How long have ** you been** sad"。 +在 1960 年代,一位名叫 *Joseph Weizenbaum* 的麻省理工学院科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA),Eliza是一位计算机“治疗师”,它可以向人类提出问题并表现出理解他们的答案。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”,它可能会重新排列并替换句子中的单词以形成响应“How long have **you been** sad"。 这给人的印象是伊丽莎理解了这句话,并在问一个后续问题,而实际上,它是在改变时态并添加一些词。如果 Eliza 无法识别它有响应的关键字,它会给出一个随机响应,该响应可以适用于许多不同的语句。 Eliza 很容易被欺骗,例如,如果用户写了**You are** a bicycle",它可能会回复"How long have **I been** a bicycle?",而不是更合理的回答。 @@ -103,7 +103,7 @@ ``` 以下是一些指导你的示例输出(用户输入位于以 `>` 开头的行上): - + ```output Hello, I am Marvin, the simple robot. You can end this conversation at any time by typing 'bye' From ac061faf5fdf6e409e94b2da01bfc0beb825fa29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 20:40:40 +0800 Subject: [PATCH 11/91] Add files via upload --- 2-Regression/translations/Readme.zh-cn.md | 34 +++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 2-Regression/translations/Readme.zh-cn.md diff --git a/2-Regression/translations/Readme.zh-cn.md b/2-Regression/translations/Readme.zh-cn.md new file mode 100644 index 00000000..853c73b5 --- /dev/null +++ b/2-Regression/translations/Readme.zh-cn.md @@ -0,0 +1,34 @@ +# 机器学习中的回归模型 +## 本节主题: 北美南瓜价格的回归模型 🎃 + +在北美,南瓜经常在万圣节被刻上吓人的鬼脸。让我们来深入研究一下这种奇妙的蔬菜 + +![jack-o-lanterns](./images/jack-o-lanterns.jpg) +> Photo by Beth Teutschmann on Unsplash + +##你会学到什么 + +这节的课程包括机器学习领域中的多种回归模型。回归模型可以明确多种变量间的_关系_。这种模型可以用来预测类似长度、温度和年龄之类的值, 通过分析数据点来揭示变量之间的关系。 + +在本节的一系列课程中,你会学到线性回归和逻辑回归之间的区别,并且你将知道对于特定问题如何在这两种模型中进行选择 + +在这组课程中,你会准备好包括为管理笔记而设置VS Code、配置数据科学家常用的环境等机器学习的初始任务。你会开始上手Scikit-learn学习项目(一个机器学习的百科),并且你会以回归模型为主构建起你的第一种机器学习模型 + +> 这里有一些代码难度较低但很有用的工具可以帮助你学习使用回归模型。 试一下 [Azure ML for this task](https://docs.microsoft.com/learn/modules/create-regression-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa) + + +### Lessons + +1. [交易的工具](1-Tools/README.md) +2. [管理数据](2-Data/README.md) +3. [线性和多项式回归](3-Linear/README.md) +4. [逻辑回归](4-Logistic/README.md) + +--- +### Credits + +"机器学习中的回归" 由[Jen Looper](https://twitter.com/jenlooper)♥️ 撰写 + +♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) + +南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类 \ No newline at end of file From aa5048fb0e5dba984d5f7bd949301b3031d513e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 21:04:12 +0800 Subject: [PATCH 12/91] Update Readme.zh-cn.md --- 2-Regression/translations/Readme.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-Regression/translations/Readme.zh-cn.md b/2-Regression/translations/Readme.zh-cn.md index 853c73b5..ee1243a2 100644 --- a/2-Regression/translations/Readme.zh-cn.md +++ b/2-Regression/translations/Readme.zh-cn.md @@ -31,4 +31,4 @@ ♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) -南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类 \ No newline at end of file +南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 From 10a7a93f1d050f22fcb63c8b4f93c29baddab0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 21:12:46 +0800 Subject: [PATCH 13/91] Add files via upload --- 2-Regression/translations/Readme.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-Regression/translations/Readme.zh-cn.md b/2-Regression/translations/Readme.zh-cn.md index ee1243a2..81c2c9d4 100644 --- a/2-Regression/translations/Readme.zh-cn.md +++ b/2-Regression/translations/Readme.zh-cn.md @@ -31,4 +31,4 @@ ♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) -南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 +南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 \ No newline at end of file From 11567b58cc5f88bfcd1fca645c1cc83fab48a8e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 21:13:48 +0800 Subject: [PATCH 14/91] Add files via upload --- 2-Regression/Readme.zh-cn.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 2-Regression/Readme.zh-cn.md diff --git a/2-Regression/Readme.zh-cn.md b/2-Regression/Readme.zh-cn.md new file mode 100644 index 00000000..4972c594 --- /dev/null +++ b/2-Regression/Readme.zh-cn.md @@ -0,0 +1,34 @@ +# 机器学习中的回归模型 +## 本节主题: 北美南瓜价格的回归模型 🎃 + +在北美,南瓜经常在万圣节被刻上吓人的鬼脸。让我们来深入研究一下这种奇妙的蔬菜 + +![jack-o-lanterns](../images/jack-o-lanterns.jpg) +> Photo by Beth Teutschmann on Unsplash + +##你会学到什么 + +这节的课程包括机器学习领域中的多种回归模型。回归模型可以明确多种变量间的_关系_。这种模型可以用来预测类似长度、温度和年龄之类的值, 通过分析数据点来揭示变量之间的关系。 + +在本节的一系列课程中,你会学到线性回归和逻辑回归之间的区别,并且你将知道对于特定问题如何在这两种模型中进行选择 + +在这组课程中,你会准备好包括为管理笔记而设置VS Code、配置数据科学家常用的环境等机器学习的初始任务。你会开始上手Scikit-learn学习项目(一个机器学习的百科),并且你会以回归模型为主构建起你的第一种机器学习模型 + +> 这里有一些代码难度较低但很有用的工具可以帮助你学习使用回归模型。 试一下 [Azure ML for this task](https://docs.microsoft.com/learn/modules/create-regression-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa) + + +### Lessons + +1. [交易的工具](1-Tools/README.md) +2. [管理数据](2-Data/README.md) +3. [线性和多项式回归](3-Linear/README.md) +4. [逻辑回归](4-Logistic/README.md) + +--- +### Credits + +"机器学习中的回归" 由[Jen Looper](https://twitter.com/jenlooper)♥️ 撰写 + +♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) + +南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 \ No newline at end of file From 7d9da49081ce7960872e84820c3adc205daa3b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 21:15:26 +0800 Subject: [PATCH 15/91] Delete Readme.zh-cn.md --- 2-Regression/Readme.zh-cn.md | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 2-Regression/Readme.zh-cn.md diff --git a/2-Regression/Readme.zh-cn.md b/2-Regression/Readme.zh-cn.md deleted file mode 100644 index 4972c594..00000000 --- a/2-Regression/Readme.zh-cn.md +++ /dev/null @@ -1,34 +0,0 @@ -# 机器学习中的回归模型 -## 本节主题: 北美南瓜价格的回归模型 🎃 - -在北美,南瓜经常在万圣节被刻上吓人的鬼脸。让我们来深入研究一下这种奇妙的蔬菜 - -![jack-o-lanterns](../images/jack-o-lanterns.jpg) -> Photo by Beth Teutschmann on Unsplash - -##你会学到什么 - -这节的课程包括机器学习领域中的多种回归模型。回归模型可以明确多种变量间的_关系_。这种模型可以用来预测类似长度、温度和年龄之类的值, 通过分析数据点来揭示变量之间的关系。 - -在本节的一系列课程中,你会学到线性回归和逻辑回归之间的区别,并且你将知道对于特定问题如何在这两种模型中进行选择 - -在这组课程中,你会准备好包括为管理笔记而设置VS Code、配置数据科学家常用的环境等机器学习的初始任务。你会开始上手Scikit-learn学习项目(一个机器学习的百科),并且你会以回归模型为主构建起你的第一种机器学习模型 - -> 这里有一些代码难度较低但很有用的工具可以帮助你学习使用回归模型。 试一下 [Azure ML for this task](https://docs.microsoft.com/learn/modules/create-regression-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa) - - -### Lessons - -1. [交易的工具](1-Tools/README.md) -2. [管理数据](2-Data/README.md) -3. [线性和多项式回归](3-Linear/README.md) -4. [逻辑回归](4-Logistic/README.md) - ---- -### Credits - -"机器学习中的回归" 由[Jen Looper](https://twitter.com/jenlooper)♥️ 撰写 - -♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) - -南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 \ No newline at end of file From f9f69077acc76f317c8c3ce3aa0e5837ccb2dc40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 21:16:48 +0800 Subject: [PATCH 16/91] Add files via upload --- 2-Regression/translations/Readme.zh-cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-Regression/translations/Readme.zh-cn.md b/2-Regression/translations/Readme.zh-cn.md index 81c2c9d4..3802d540 100644 --- a/2-Regression/translations/Readme.zh-cn.md +++ b/2-Regression/translations/Readme.zh-cn.md @@ -3,8 +3,8 @@ 在北美,南瓜经常在万圣节被刻上吓人的鬼脸。让我们来深入研究一下这种奇妙的蔬菜 -![jack-o-lanterns](./images/jack-o-lanterns.jpg) -> Photo by Beth Teutschmann on Unsplash +![jack-o-lantern](../images/jack-o-lanterns.jpg) +> Foto oleh Beth Teutschmann di Unsplash ##你会学到什么 From eda4113bebeaafd71be55a4a15edc6105b7d1a83 Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Wed, 14 Jul 2021 17:11:43 +0200 Subject: [PATCH 17/91] Italian Translation - Chapter 2-2 complete --- 2-Regression/2-Data/translations/README.it.md | 201 ++++++++++++++++++ .../2-Data/translations/assignment.it.md | 8 + 2 files changed, 209 insertions(+) create mode 100644 2-Regression/2-Data/translations/README.it.md create mode 100644 2-Regression/2-Data/translations/assignment.it.md diff --git a/2-Regression/2-Data/translations/README.it.md b/2-Regression/2-Data/translations/README.it.md new file mode 100644 index 00000000..3a67cdea --- /dev/null +++ b/2-Regression/2-Data/translations/README.it.md @@ -0,0 +1,201 @@ +# Costruire un modello di regressione usando Scikit-learn: preparare e visualizzare i dati + +> ![Infografica sulla visualizzazione dei dati](../images/data-visualization.png) +> Infografica di [Dasani Madipalli](https://twitter.com/dasani_decoded) + +## [Quiz Pre-Lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/11/) + +## Introduzione + +Ora che si hanno a disposizione gli strumenti necessari per iniziare ad affrontare la creazione di modelli di machine learning con Scikit-learn, si è pronti per iniziare a porre domande sui propri dati. Mentre si lavora con i dati e si applicano soluzioni ML, è molto importante capire come porre la domanda giusta per sbloccare correttamente le potenzialità del proprio insieme di dati. + +In questa lezione, si imparerà: + +- Come preparare i dati per la creazione del modello. +- Come utilizzare Matplotlib per la visualizzazione dei dati. + +## Fare la domanda giusta ai propri dati + +La domanda a cui si deve rispondere determinerà il tipo di algoritmi ML che verranno utilizzati. La qualità della risposta che si riceverà dipenderà fortemente dalla natura dei propri dati. + +Si dia un'occhiata ai [dati](../../data/US-pumpkins.csv) forniti per questa lezione. Si può aprire questo file .csv in VS Code. Una rapida scrematura mostra immediatamente che ci sono spazi vuoti e un mix di stringhe e dati numerici. C'è anche una strana colonna chiamata "Package" (pacchetto) in cui i dati sono un mix tra "sacks" (sacchi), "bins" (contenitori) e altri valori. I dati, infatti, sono un po' un pasticcio. + +In effetti, non è molto comune ricevere un insieme di dati completamente pronto per creare un modello ML pronto all'uso. In questa lezione si imparerà come preparare un insieme di dati non elaborato utilizzando le librerie standard di Python. Si impareranno anche varie tecniche per visualizzare i dati. + +## Caso di studio: 'il mercato della zucca' + +In questa cartella si troverà un file .csv nella cartella `data` radice chiamato [US-pumpkins.csv](../../data/US-pumpkins.csv) che include 1757 righe di dati sul mercato delle zucche, ordinate in raggruppamenti per città. Si tratta di dati grezzi estratti dai [Report Standard dei Mercati Terminali delle Colture Speciali](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) distribuiti dal Dipartimento dell'Agricoltura degli Stati Uniti. + +### Preparazione dati + +Questi dati sono di pubblico dominio. Possono essere scaricati in molti file separati, per città, dal sito web dell'USDA. Per evitare troppi file separati, sono stati concatenati tutti i dati della città in un unico foglio di calcolo, quindi un po' i dati sono già stati _preparati_ . Successivamente, si darà un'occhiata più da vicino ai dati. + +### I dati della zucca - prime conclusioni + +Cosa si nota riguardo a questi dati? Si è già visto che c'è un mix di stringhe, numeri, spazi e valori strani a cui occorre dare un senso. + +Che domanda si puà fare a questi dati, utilizzando una tecnica di Regressione? Che dire di "Prevedere il prezzo di una zucca in vendita durante un dato mese". Esaminando nuovamente i dati, ci sono alcune modifiche da apportare per creare la struttura dati necessaria per l'attività. + +## Esercizio: analizzare i dati della zucca + +Si usa [Pandas](https://pandas.pydata.org/), (il nome sta per `Python Data Analysis`) uno strumento molto utile per dare forma ai dati, per analizzare e preparare questi dati sulla zucca. + +### Innanzitutto, controllare le date mancanti + +Prima si dovranno eseguire i passaggi per verificare le date mancanti: + +1. Convertire le date in un formato mensile (queste sono date statunitensi, quindi il formato è `MM/GG/AAAA`). +2. Estrarre il mese in una nuova colonna. + +Aprire il file _notebook.ipynb_ in Visual Studio Code e importare il foglio di calcolo in un nuovo dataframe Pandas. + +1. Usare la funzione `head()` per visualizzare le prime cinque righe. + + ```python + import pandas as pd + pumpkins = pd.read_csv('../data/US-pumpkins.csv') + pumpkins.head() + ``` + + ✅ Quale funzione si userebbe per visualizzare le ultime cinque righe? + +1. Controllare se mancano dati nel dataframe corrente: + + ```python + pumpkins.isnull().sum() + ``` + + Ci sono dati mancanti, ma forse non avrà importanza per l'attività da svolgere. + +1. Per rendere più facile lavorare con il dataframe, si scartano molte delle sue colonne, usando `drop()`, mantenendo solo le colonne di cui si ha bisogno: + + ```python + new_columns = ['Package', 'Month', 'Low Price', 'High Price', 'Date'] + pumpkins = pumpkins.drop([c for c in pumpkins.columns if c not in new_columns], axis=1) + ``` + +### Secondo, determinare il prezzo medio della zucca + +Si pensi a come determinare il prezzo medio di una zucca in un dato mese. Quali colonne si sceglierebbero per questa attività? Suggerimento: serviranno 3 colonne. + +Soluzione: prendere la media delle colonne `Low Price` e `High Price` per popolare la nuova colonna Price e convertire la colonna Date per mostrare solo il mese. Fortunatamente, secondo il controllo di cui sopra, non mancano dati per date o prezzi. + +1. Per calcolare la media, aggiungere il seguente codice: + + ```python + price = (pumpkins['Low Price'] + pumpkins['High Price']) / 2 + + month = pd.DatetimeIndex(pumpkins['Date']).month + + ``` + + ✅ Si possono di stampare tutti i dati che si desidera controllare utilizzando `print(month)`. + +2. Ora copiare i dati convertiti in un nuovo dataframe Pandas: + + ```python + new_pumpkins = pd.DataFrame({'Month': month, 'Package': pumpkins['Package'], 'Low Price': pumpkins['Low Price'],'High Price': pumpkins['High Price'], 'Price': price}) + ``` + + La stampa del dataframe mostrerà un insieme di dati pulito e ordinato su cui si può costruire il nuovo modello di regressione. + +### Ma non è finita qui! C'è qualcosa di strano qui. + +Osservando la colonna `Package`, le zucche sono vendute in molte configurazioni diverse. Alcune sono venduti in misure '1 1/9 bushel' (bushel = staio) e alcuni in misure '1/2 bushel', alcuni per zucca, alcuni per libbra e alcuni in grandi scatole con larghezze variabili. + +> Le zucche sembrano molto difficili da pesare in modo coerente + +Scavando nei dati originali, è interessante notare che qualsiasi cosa con `Unit of Sale` (Unità di vendita) uguale a 'EACH' o 'PER BIN' ha anche il tipo di `Package` per 'inch' (pollice), per 'bin' (contenitore) o 'each' (entrambi). Le zucche sembrano essere molto difficili da pesare in modo coerente, quindi si filtrano selezionando solo zucche con la stringa "bushel" nella colonna `Package`. + +1. Aggiungere un filtro nella parte superiore del file, sotto l'importazione .csv iniziale: + + ```python + pumpkins = pumpkins[pumpkins['Package'].str.contains('bushel', case=True, regex=True)] + ``` + + Se si stampano i dati ora, si può vedere che si stanno ricevendo solo le circa 415 righe di dati contenenti zucche per bushel. + +### Ma non è finita qui! C'è un'altra cosa da fare. + +Si è notato che la quantità di bushel varia per riga? Si deve normalizzare il prezzo in modo da mostrare il prezzo per bushel, quindi si facciano un po' di calcoli per standardizzarlo. + +1. Aggiungere queste righe dopo il blocco che crea il dataframe new_pumpkins: + + ```python + new_pumpkins.loc[new_pumpkins['Package'].str.contains('1 1/9'), 'Price'] = price/(1 + 1/9) + + new_pumpkins.loc[new_pumpkins['Package'].str.contains('1/2'), 'Price'] = price/(1/2) + ``` + +✅ Secondo [The Spruce Eats](https://www.thespruceeats.com/how-much-is-a-bushel-1389308), il peso di un bushel dipende dal tipo di prodotto, poiché è una misura di volume. "Un bushel di pomodori, per esempio, dovrebbe pesare 56 libbre... Foglie e verdure occupano più spazio con meno peso, quindi un bushel di spinaci è solo 20 libbre". È tutto piuttosto complicato! Non occorre preoccuparsi di fare una conversione da bushel a libbra, e invece si valuta a bushel. Tutto questo studio sui bushel di zucche, però, dimostra quanto sia importante capire la natura dei propri dati! + +Ora si può analizzare il prezzo per unità in base alla misurazione del bushel. Se si stampano i dati ancora una volta, si può vedere come sono standardizzati. + +✅ Si è notato che le zucche vendute a metà bushel sono molto costose? Si riesce a capire perché? Suggerimento: le zucche piccole sono molto più costose di quelle grandi, probabilmente perché ce ne sono molte di più per bushel, dato lo spazio inutilizzato occupato da una grande zucca cava. + +## Strategie di Visualizzazione + +Parte del ruolo del data scientist è dimostrare la qualità e la natura dei dati con cui sta lavorando. Per fare ciò, si creano spesso visualizzazioni interessanti o tracciati, grafici e diagrammi, che mostrano diversi aspetti dei dati. In questo modo, sono in grado di mostrare visivamente relazioni e lacune altrimenti difficili da scoprire. + +Le visualizzazioni possono anche aiutare a determinare la tecnica di machine learning più appropriata per i dati. Un grafico a dispersione che sembra seguire una linea, ad esempio, indica che i dati sono un buon candidato per un esercizio di regressione lineare. + +Una libreria di visualizzazione dei dati che funziona bene nei notebook Jupyter è [Matplotlib](https://matplotlib.org/) (che si è visto anche nella lezione precedente). + +> Per fare più esperienza con la visualizzazione dei dati si seguano [questi tutorial](https://docs.microsoft.com/learn/modules/explore-analyze-data-with-python?WT.mc_id=academic-15963-cxa). + +## Esercizio - sperimentare con Matplotlib + +Provare a creare alcuni grafici di base per visualizzare il nuovo dataframe appena creato. Cosa mostrerebbe un grafico a linee di base? + +1. Importare Matplotlib nella parte superiore del file, sotto l'importazione di Pandas: + + ```python + import matplotlib.pyplot as plt + ``` + +1. Rieseguire l'intero notebook per aggiornare. +1. Nella parte inferiore del notebook, aggiungere una cella per tracciare i dati come una casella: + + ```python + price = new_pumpkins.Price + month = new_pumpkins.Month + plt.scatter(price, month) + plt.show() + ``` + + ![Un grafico a dispersione che mostra la relazione tra prezzo e mese](../images/scatterplot.png) + + È un tracciato utile? C'è qualcosa che sorprende? + + Non è particolarmente utile in quanto tutto ciò che fa è visualizzare nei propri dati come una diffusione di punti in un dato mese. + +### Renderlo utile + +Per fare in modo che i grafici mostrino dati utili, di solito è necessario raggruppare i dati in qualche modo. Si prova a creare un grafico in cui l'asse y mostra i prezzi e l'asse x mostra la distribuzione dei dati raggruppati per mese. + +1. Aggiungere una cella per creare un grafico a barre raggruppato: + + ```python + new_pumpkins.groupby(['Month'])['Price'].mean().plot(kind='bar') + plt.ylabel("Pumpkin Price") + ``` + + ![Un grafico a barre che mostra la relazione tra prezzo e mese](../images/barchart.png) + + Questa è una visualizzazione dei dati più utile! Sembra indicare che il prezzo più alto per le zucche si verifica a settembre e ottobre. Questo soddisfa le proprie aspettative? Perché o perché no? + +--- + +## 🚀 Sfida + +Esplorare i diversi tipi di visualizzazione offerti da Matplotlib. Quali tipi sono più appropriati per i problemi di regressione? + +## [Quiz post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/12/) + +## Revisione e Auto Apprendimento + +Dare un'occhiata ai molti modi per visualizzare i dati. Fare un elenco delle varie librerie disponibili e annotare quali sono le migliori per determinati tipi di attività, ad esempio visualizzazioni 2D rispetto a visualizzazioni 3D. Cosa si è scoperto? + +## Compito + +[Esplorazione della visualizzazione](assignment.it.md) diff --git a/2-Regression/2-Data/translations/assignment.it.md b/2-Regression/2-Data/translations/assignment.it.md new file mode 100644 index 00000000..6fe0cf50 --- /dev/null +++ b/2-Regression/2-Data/translations/assignment.it.md @@ -0,0 +1,8 @@ +# Esplorazione delle visualizzazioni + +Sono disponibili diverse librerie per la visualizzazione dei dati. Creare alcune visualizzazioni utilizzando i dati della zucca in questa lezione con matplotlib e seaborn in un notebook di esempio. Con quali librerie è più facile lavorare? +## Rubrica + +| Criteri | Ottimo | Adeguato | Necessita miglioramento | +| -------- | --------- | -------- | ----------------- | +| | Viene inviato un notebook con due esplorazioni/visualizzazioni | Viene inviato un notebook con una esplorazione/visualizzazione | Non è stato inviato un notebook | From c53bc86acdbfe218775faf6bf61903b216d9ba24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:37:01 +0800 Subject: [PATCH 18/91] Rename Readme.zh-cn.md to Readme.zh-ch.md --- 2-Regression/translations/{Readme.zh-cn.md => Readme.zh-ch.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename 2-Regression/translations/{Readme.zh-cn.md => Readme.zh-ch.md} (98%) diff --git a/2-Regression/translations/Readme.zh-cn.md b/2-Regression/translations/Readme.zh-ch.md similarity index 98% rename from 2-Regression/translations/Readme.zh-cn.md rename to 2-Regression/translations/Readme.zh-ch.md index 3802d540..f25a542a 100644 --- a/2-Regression/translations/Readme.zh-cn.md +++ b/2-Regression/translations/Readme.zh-ch.md @@ -31,4 +31,4 @@ ♥️ 测试的贡献者: [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan) 和 [Ornella Altunyan](https://twitter.com/ornelladotcom) -南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 \ No newline at end of file +南瓜数据集受此启发 [this project on Kaggle](https://www.kaggle.com/usda/a-year-of-pumpkin-prices) 并且其数据源自 [Specialty Crops Terminal Markets Standard Reports](https://www.marketnews.usda.gov/mnp/fv-report-config-step1?type=termPrice) 由美国农业部上传分享。我们根据种类添加了围绕颜色的一些数据点。这些数据处在公共的域名上。 From 95aa36df517eff69aabc23a583e384ffced6708d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:38:15 +0800 Subject: [PATCH 19/91] Update Readme.zh-ch.md --- 2-Regression/translations/Readme.zh-ch.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/2-Regression/translations/Readme.zh-ch.md b/2-Regression/translations/Readme.zh-ch.md index f25a542a..7ce096c3 100644 --- a/2-Regression/translations/Readme.zh-ch.md +++ b/2-Regression/translations/Readme.zh-ch.md @@ -19,10 +19,10 @@ ### Lessons -1. [交易的工具](1-Tools/README.md) -2. [管理数据](2-Data/README.md) -3. [线性和多项式回归](3-Linear/README.md) -4. [逻辑回归](4-Logistic/README.md) +1. [交易的工具](../1-Tools/README.md) +2. [管理数据](../2-Data/README.md) +3. [线性和多项式回归](../3-Linear/README.md) +4. [逻辑回归](../4-Logistic/README.md) --- ### Credits From 50a94e9ed8622fd6eb52489db602d710ba822f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:44:01 +0800 Subject: [PATCH 20/91] Rename Readme.zh-ch.md to README.zh-ch.md --- 2-Regression/translations/{Readme.zh-ch.md => README.zh-ch.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 2-Regression/translations/{Readme.zh-ch.md => README.zh-ch.md} (100%) diff --git a/2-Regression/translations/Readme.zh-ch.md b/2-Regression/translations/README.zh-ch.md similarity index 100% rename from 2-Regression/translations/Readme.zh-ch.md rename to 2-Regression/translations/README.zh-ch.md From c2f2beed8e8bcbfbfb006dfc62322a54223c39d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:50:08 +0800 Subject: [PATCH 21/91] Update README.zh-ch.md --- 2-Regression/translations/README.zh-ch.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/2-Regression/translations/README.zh-ch.md b/2-Regression/translations/README.zh-ch.md index 7ce096c3..24c7a26c 100644 --- a/2-Regression/translations/README.zh-ch.md +++ b/2-Regression/translations/README.zh-ch.md @@ -19,10 +19,10 @@ ### Lessons -1. [交易的工具](../1-Tools/README.md) -2. [管理数据](../2-Data/README.md) -3. [线性和多项式回归](../3-Linear/README.md) -4. [逻辑回归](../4-Logistic/README.md) +1. [交易的工具](../1-Tools/translations/README.zh-cn.md) +2. [管理数据](../2-Data/translations/README.zh-cn.md) +3. [线性和多项式回归](../3-Linear/translations/README.zh-cn.md) +4. [逻辑回归](../4-Logistic/translations/README.zh-cn.md) --- ### Credits From 38c3dfa0c332e03c8e4cefb52c7af5c014b9237e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Thu, 15 Jul 2021 01:19:49 +0800 Subject: [PATCH 22/91] rename --- 2-Regression/translations/{README.zh-ch.md => README.zh-cn.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 2-Regression/translations/{README.zh-ch.md => README.zh-cn.md} (100%) diff --git a/2-Regression/translations/README.zh-ch.md b/2-Regression/translations/README.zh-cn.md similarity index 100% rename from 2-Regression/translations/README.zh-ch.md rename to 2-Regression/translations/README.zh-cn.md From 109b2078e8b6eacb37a9174745ee26cac2cb086f Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Wed, 14 Jul 2021 20:30:41 +0200 Subject: [PATCH 23/91] Italian Translation - Chapter 2-3 complete --- .../2-Data/translations/assignment.it.md | 1 + .../3-Linear/translations/README.it.md | 339 ++++++++++++++++++ .../3-Linear/translations/assignment.it.md | 11 + 3 files changed, 351 insertions(+) create mode 100644 2-Regression/3-Linear/translations/README.it.md create mode 100644 2-Regression/3-Linear/translations/assignment.it.md diff --git a/2-Regression/2-Data/translations/assignment.it.md b/2-Regression/2-Data/translations/assignment.it.md index 6fe0cf50..14527fca 100644 --- a/2-Regression/2-Data/translations/assignment.it.md +++ b/2-Regression/2-Data/translations/assignment.it.md @@ -1,6 +1,7 @@ # Esplorazione delle visualizzazioni Sono disponibili diverse librerie per la visualizzazione dei dati. Creare alcune visualizzazioni utilizzando i dati della zucca in questa lezione con matplotlib e seaborn in un notebook di esempio. Con quali librerie è più facile lavorare? + ## Rubrica | Criteri | Ottimo | Adeguato | Necessita miglioramento | diff --git a/2-Regression/3-Linear/translations/README.it.md b/2-Regression/3-Linear/translations/README.it.md new file mode 100644 index 00000000..1aafa601 --- /dev/null +++ b/2-Regression/3-Linear/translations/README.it.md @@ -0,0 +1,339 @@ +# Costruire un modello di regressione usando Scikit-learn: regressione in due modi + +![Infografica di regressione lineare e polinomiale](../images/linear-polynomial.png) +> Infografica di [Dasani Madipalli](https://twitter.com/dasani_decoded) + +## [Quiz Pre-Lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/13/) + +### Introduzione + +Finora si è esplorato cos'è la regressione con dati di esempio raccolti dall'insieme di dati relativo ai prezzi della zucca, che verrà usato in questa lezione. Lo si è anche visualizzato usando Matplotlib. + +Ora si è pronti per approfondire la regressione per machine learning. In questa lezione si imparerà di più su due tipi di regressione: _regressione lineare di base_ e _regressione polinomiale_, insieme ad alcuni dei calcoli alla base di queste tecniche. + +> In questo programma di studi, si assume una conoscenza minima della matematica, e si cerca di renderla accessibile agli studenti provenienti da altri campi, quindi si faccia attenzione a note, 🧮 didascalie, diagrammi e altri strumenti di apprendimento che aiutano la comprensione. + +### Prerequisito + +Si dovrebbe ormai avere familiarità con la struttura dei dati della zucca che si sta esaminando. Lo si può trovare precaricato e prepulito nel file _notebook.ipynb_ di questa lezione. Nel file, il prezzo della zucca viene visualizzato per bushel (staio) in un nuovo dataframe. Assicurasi di poter eseguire questi notebook nei kernel in Visual Studio Code. + +### Preparazione + +Come promemoria, si stanno caricando questi dati in modo da porre domande su di essi. + +- Qual è il momento migliore per comprare le zucche? +- Che prezzo ci si può aspettare da una cassa di zucche in miniatura? +- Si devono acquistare in cestini da mezzo bushel o a scatola da 1 1/9 bushel? Si continua a scavare in questi dati. + +Nella lezione precedente, è stato creato un dataframe Pandas e si è popolato con parte dell'insieme di dati originale, standardizzando il prezzo per lo bushel. In questo modo, tuttavia, si sono potuti raccogliere solo circa 400 punti dati e solo per i mesi autunnali. + +Si dia un'occhiata ai dati precaricati nel notebook di accompagnamento di questa lezione. I dati sono precaricati e viene tracciato un grafico a dispersione iniziale per mostrare i dati mensili. Forse si può ottenere qualche dettaglio in più sulla natura dei dati pulendoli ulteriormente. + +## Una linea di regressione lineare + +Come si è appreso nella lezione 1, l'obiettivo di un esercizio di regressione lineare è essere in grado di tracciare una linea per: + +- **Mostrare le relazioni tra variabili**. +- **Fare previsioni**. Fare previsioni accurate su dove cadrebbe un nuovo punto dati in relazione a quella linea. + +È tipico della **Regressione dei Minimi Quadrati** disegnare questo tipo di linea. Il termine "minimi quadrati" significa che tutti i punti dati che circondano la linea di regressione sono elevati al quadrato e quindi sommati. Idealmente, quella somma finale è la più piccola possibile, perché si vuole un basso numero di errori, o `minimi quadrati`. + +Lo si fa perché si vuole modellare una linea che abbia la distanza cumulativa minima da tutti i punti dati. Si esegue anche il quadrato dei termini prima di aggiungerli poiché interessa la grandezza piuttosto che la direzione. + +> **🧮 Mostrami la matematica** +> +> Questa linea, chiamata _linea di miglior adattamento_ , può essere espressa da [un'equazione](https://en.wikipedia.org/wiki/Simple_linear_regression): +> +> ``` +> Y = a + bX +> ``` +> +> `X` è la "variabile esplicativa". `Y` è la "variabile dipendente". La pendenza della linea è `b` e `a` è l'intercetta di y, che si riferisce al valore di `Y` quando `X = 0`. +> +> ![calcolare la pendenza](../images/slope.png) +> +> Prima, calcolare la pendenza `b`. Infografica di [Jen Looper](https://twitter.com/jenlooper) +> +> In altre parole, facendo riferimento alla domanda originale per i dati sulle zucche: "prevedere il prezzo di una zucca per bushel per mese", `X` si riferisce al prezzo e `Y` si riferirisce al mese di vendita. +> +> ![completare l'equazione](../images/calculation.png) +> +> Si calcola il valore di Y. Se si sta pagando circa $4, deve essere aprile! Infografica di [Jen Looper](https://twitter.com/jenlooper) +> +> La matematica che calcola la linea deve dimostrare la pendenza della linea, che dipende anche dall'intercetta, o dove `Y` si trova quando `X = 0`. +> +> Si può osservare il metodo di calcolo per questi valori sul sito web [Math is Fun](https://www.mathsisfun.com/data/least-squares-regression.html) . Si visiti anche [questo calcolatore dei minimi quadrati](https://www.mathsisfun.com/data/least-squares-calculator.html) per vedere come i valori dei numeri influiscono sulla linea. + +## Correlazione + +Un altro termine da comprendere è il **Coefficiente di Correlazione** tra determinate variabili X e Y. Utilizzando un grafico a dispersione, è possibile visualizzare rapidamente questo coefficiente. Un grafico con punti dati sparsi in una linea ordinata ha un'alta correlazione, ma un grafico con punti dati sparsi ovunque tra X e Y ha una bassa correlazione. + +Un buon modello di regressione lineare sarà quello che ha un Coefficiente di Correlazione alto (più vicino a 1 rispetto a 0) utilizzando il Metodo di Regressione dei Minimi Quadrati con una linea di regressione. + +✅ Eseguire il notebook che accompagna questa lezione e guardare il grafico a dispersione City to Price. I dati che associano la città al prezzo per le vendite di zucca sembrano avere una correlazione alta o bassa, secondo la propria interpretazione visiva del grafico a dispersione? + + +## Preparare i dati per la regressione + +Ora che si ha una comprensione della matematica alla base di questo esercizio, si crea un modello di regressione per vedere se si può prevedere quale pacchetto di zucche avrà i migliori prezzi per zucca. Qualcuno che acquista zucche per una festa con tema un campo di zucche potrebbe desiderare che queste informazioni siano in grado di ottimizzare i propri acquisti di pacchetti di zucca per il campo. + +Dal momento che si utilizzerà Scikit-learn, non c'è motivo di farlo a mano (anche se si potrebbe!). Nel blocco di elaborazione dati principale del notebook della lezione, aggiungere una libreria da Scikit-learn per convertire automaticamente tutti i dati di tipo stringa in numeri: + +```python +from sklearn.preprocessing import LabelEncoder + +new_pumpkins.iloc[:, 0:-1] = new_pumpkins.iloc[:, 0:-1].apply(LabelEncoder().fit_transform) +``` + +Se si guarda ora il dataframe new_pumpkins, si vede che tutte le stringhe ora sono numeriche. Questo rende più difficile la lettura per un umano ma molto più comprensibile per Scikit-learn! +Ora si possono prendere decisioni più consapevoli (non solo basate sull'osservazione di un grafico a dispersione) sui dati più adatti alla regressione. + +Si provi a trovare una buona correlazione tra due punti nei propri dati per costruire potenzialmente un buon modello predittivo. A quanto pare, c'è solo una debole correlazione tra la città e il prezzo: + +```python +print(new_pumpkins['City'].corr(new_pumpkins['Price'])) +0.32363971816089226 +``` + +Tuttavia, c'è una correlazione leggermente migliore tra il pacchetto e il suo prezzo. Ha senso, vero? Normalmente, più grande è la scatola dei prodotti, maggiore è il prezzo. + +```python +print(new_pumpkins['Package'].corr(new_pumpkins['Price'])) +0.6061712937226021 +``` + +Una buona domanda da porre a questi dati sarà: "Che prezzo posso aspettarmi da un determinato pacchetto di zucca?" + +Si costruisce questo modello di regressione + +## Costruire un modello lineare + +Prima di costruire il modello, si esegue un altro riordino dei dati. Si eliminano tutti i dati nulli e si controlla ancora una volta che aspetto hanno i dati. + +```python +new_pumpkins.dropna(inplace=True) +new_pumpkins.info() +``` + +Quindi, si crea un nuovo dataframe da questo set minimo e lo si stampa: + +```python +new_columns = ['Package', 'Price'] +lin_pumpkins = new_pumpkins.drop([c for c in new_pumpkins.columns if c not in new_columns], axis='columns') + +lin_pumpkins +``` + +```output + Package Price +70 0 13.636364 +71 0 16.363636 +72 0 16.363636 +73 0 15.454545 +74 0 13.636364 +... ... ... +1738 2 30.000000 +1739 2 28.750000 +1740 2 25.750000 +1741 2 24.000000 +1742 2 24.000000 +415 rows × 2 columns +``` + +1. Ora si possono assegnare i dati delle coordinate X e y: + + ```python + X = lin_pumpkins.values[:, :1] + y = lin_pumpkins.values[:, 1:2] + ``` + +Cosa sta succedendo qui? Si sta usando [la notazione slice Python](https://stackoverflow.com/questions/509211/understanding-slice-notation/509295#509295) per creare array per popolare `X` e `y`. + +2. Successivamente, si avvia le routine di creazione del modello di regressione: + + ```python + from sklearn.linear_model import LinearRegression + from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error + from sklearn.model_selection import train_test_split + + X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0) + lin_reg = LinearRegression() + lin_reg.fit(X_train,y_train) + + pred = lin_reg.predict(X_test) + + accuracy_score = lin_reg.score(X_train,y_train) + print('Model Accuracy: ', accuracy_score) + ``` + + Poiché la correlazione non è particolarmente buona, il modello prodotto non è molto accurato. + + ```output + Model Accuracy: 0.3315342327998987 + ``` + +3. Si può visualizzare la linea tracciata nel processo: + + ```python + plt.scatter(X_test, y_test, color='black') + plt.plot(X_test, pred, color='blue', linewidth=3) + + plt.xlabel('Package') + plt.ylabel('Price') + + plt.show() + ``` + + ![Un grafico a dispersione che mostra il rapporto tra pacchetto e prezzo](../images/linear.png) + +4. Si testa il modello contro una varietà ipotetica: + + ```python + lin_reg.predict( np.array([ [2.75] ]) ) + ``` + + Il prezzo restituito per questa varietà mitologica è: + + ```output + array([[33.15655975]]) + ``` + +Quel numero ha senso, se la logica della linea di regressione è vera. + +🎃 Congratulazioni, si è appena creato un modello che può aiutare a prevedere il prezzo di alcune varietà di zucche. La zucca per le festività sarà bellissima. Ma probabilmente si può creare un modello migliore! + +## Regressione polinomiale + +Un altro tipo di regressione lineare è la regressione polinomiale. Mentre a volte c'è una relazione lineare tra le variabili - più grande è il volume della zucca, più alto è il prezzo - a volte queste relazioni non possono essere tracciate come un piano o una linea retta. + +✅ Ecco [alcuni altri esempi](https://online.stat.psu.edu/stat501/lesson/9/9.8) di dati che potrebbero utilizzare la regressione polinomiale + +Si dia un'altra occhiata alla relazione tra Varietà e Prezzo nel tracciato precedente. Questo grafico a dispersione deve essere necessariamente analizzato da una linea retta? Forse no. In questo caso, si può provare la regressione polinomiale. + +✅ I polinomi sono espressioni matematiche che possono essere costituite da una o più variabili e coefficienti + +La regressione polinomiale crea una linea curva per adattare meglio i dati non lineari. + +1. Viene ricreato un dataframe popolato con un segmento dei dati della zucca originale: + + ```python + new_columns = ['Variety', 'Package', 'City', 'Month', 'Price'] + poly_pumpkins = new_pumpkins.drop([c for c in new_pumpkins.columns if c not in new_columns], axis='columns') + + poly_pumpkins + ``` + +Un buon modo per visualizzare le correlazioni tra i dati nei dataframe è visualizzarli in un grafico "coolwarm": + +2. Si usa il metodo `Background_gradient()` con `coolwarm` come valore dell'argomento: + + ```python + corr = poly_pumpkins.corr() + corr.style.background_gradient(cmap='coolwarm') + ``` + + Questo codice crea una mappa di calore: + ![Una mappa di calore che mostra la correlazione dei dati](../images/heatmap.png) + +Guardando questo grafico, si può visualizzare la buona correlazione tra Pacchetto e Prezzo. Quindi si dovrebbe essere in grado di creare un modello un po' migliore dell'ultimo. + +### Creare una pipeline + +Scikit-learn include un'API utile per la creazione di modelli di regressione polinomiale: l'[API](https://scikit-learn.org/stable/modules/generated/sklearn.pipeline.make_pipeline.html?highlight=pipeline#sklearn.pipeline.make_pipeline) `make_pipeline`. Viene creata una 'pipeline' che è una catena di stimatori. In questo caso, la pipeline include caratteristiche polinomiali o previsioni che formano un percorso non lineare. + +1. Si costruiscono le colonne X e y: + + ```python + X=poly_pumpkins.iloc[:,3:4].values + y=poly_pumpkins.iloc[:,4:5].values + ``` + +2. Si crea la pipeline chiamando il metodo `make_pipeline()` : + + ```python + from sklearn.preprocessing import PolynomialFeatures + from sklearn.pipeline import make_pipeline + + pipeline = make_pipeline(PolynomialFeatures(4), LinearRegression()) + + X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0) + + pipeline.fit(np.array(X_train), y_train) + + y_pred=pipeline.predict(X_test) + ``` + +### Creare una sequenza + +A questo punto, è necessario creare un nuovo dataframe con dati _ordinati_ in modo che la pipeline possa creare una sequenza. + +Si aggiunge il seguente codice: + +```python +df = pd.DataFrame({'x': X_test[:,0], 'y': y_pred[:,0]}) +df.sort_values(by='x',inplace = True) +points = pd.DataFrame(df).to_numpy() + +plt.plot(points[:, 0], points[:, 1],color="blue", linewidth=3) +plt.xlabel('Package') +plt.ylabel('Price') +plt.scatter(X,y, color="black") +plt.show() +``` + +Si è creato un nuovo dataframe chiamato `pd.DataFrame`. Quindi si sono ordinati i valori chiamando `sort_values()`. Alla fine si è creato un grafico polinomiale: + +![Un grafico polinomiale che mostra la relazione tra pacchetto e prezzo](../images/polynomial.png) + +Si può vedere una linea curva che si adatta meglio ai dati. + +Si verifica la precisione del modello: + +```python +accuracy_score = pipeline.score(X_train,y_train) +print('Model Accuracy: ', accuracy_score) +``` + +E voilà! + +```output +Model Accuracy: 0.8537946517073784 +``` + +Ecco, meglio! Si prova a prevedere un prezzo: + +### Fare una previsione + +E possibile inserire un nuovo valore e ottenere una previsione? + +Si chiami `predict()` per fare una previsione: + +```python +pipeline.predict( np.array([ [2.75] ]) ) +``` + +Viene data questa previsione: + +```output +array([[46.34509342]]) +``` + +Ha senso, visto il tracciato! Se questo è un modello migliore del precedente, guardando gli stessi dati, si deve preventivare queste zucche più costose! + +Ben fatto! Sono stati creati due modelli di regressione in una lezione. Nella sezione finale sulla regressione, si imparerà a conoscere la regressione logistica per determinare le categorie. + +--- + +## 🚀 Sfida + +Testare diverse variabili in questo notebook per vedere come la correlazione corrisponde all'accuratezza del modello. + +## [Quiz post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/14/) + +## Revisione e Auto Apprendimento + +In questa lezione si è appreso della regressione lineare. Esistono altri tipi importanti di regressione. Leggere le tecniche Stepwise, Ridge, Lazo ed Elasticnet. Un buon corso per studiare per saperne di più è il [corso Stanford Statistical Learning](https://online.stanford.edu/courses/sohs-ystatslearning-statistical-learning) + +## Compito + +[Costruire un modello](assignment.it.md) diff --git a/2-Regression/3-Linear/translations/assignment.it.md b/2-Regression/3-Linear/translations/assignment.it.md new file mode 100644 index 00000000..e5aaaa77 --- /dev/null +++ b/2-Regression/3-Linear/translations/assignment.it.md @@ -0,0 +1,11 @@ +# Creare un Modello di Regressione + +## Istruzioni + +In questa lezione è stato mostrato come costruire un modello utilizzando sia la Regressione Lineare che Polinomiale. Usando questa conoscenza, trovare un insieme di dati o utilizzare uno degli insiemi integrati di Scikit-Learn per costruire un modello nuovo. Spiegare nel proprio notebook perché si è scelto una determinata tecnica e dimostrare la precisione del modello. Se non è accurato, spiegare perché. + +## Rubrica + +| Criteri | Ottimo | Adeguato | Necessita miglioramento | +| -------- | ------------------------------------------------------------ | -------------------------- | ------------------------------- | +| | presenta un notebook completo con una soluzione ben documentata | La soluzione è incompleta | La soluzione è difettosa o contiene bug | From 078846d8064d7fc2453e7c69a936b342426979bf Mon Sep 17 00:00:00 2001 From: edgargonarr <35715904+edgargonarr@users.noreply.github.com> Date: Wed, 14 Jul 2021 14:22:26 -0500 Subject: [PATCH 24/91] Update README.md The table for classification_report is not correctly aligned --- 4-Classification/2-Classifiers-1/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-Classification/2-Classifiers-1/README.md b/4-Classification/2-Classifiers-1/README.md index 15800922..bdff6bc9 100644 --- a/4-Classification/2-Classifiers-1/README.md +++ b/4-Classification/2-Classifiers-1/README.md @@ -217,7 +217,7 @@ Since you are using the multiclass case, you need to choose what _scheme_ to use print(classification_report(y_test,y_pred)) ``` - | precision | recall | f1-score | support | | | | | | | | | | | | | | | | | | | + | | precision | recall | f1-score| support | | | | | | | | | | | | | | | | | | | ------------ | ------ | -------- | ------- | ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | chinese | 0.73 | 0.71 | 0.72 | 229 | | | | | | | | | | | | | | | | | | | indian | 0.91 | 0.93 | 0.92 | 254 | | | | | | | | | | | | | | | | | | From ce68d9bf2214b9194a85fb3ab25227bd9bd20381 Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Wed, 14 Jul 2021 17:31:56 -0400 Subject: [PATCH 25/91] Update README.md --- quiz-app/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quiz-app/README.md b/quiz-app/README.md index 042d53ca..83b30d1d 100644 --- a/quiz-app/README.md +++ b/quiz-app/README.md @@ -1,6 +1,6 @@ # Quizzes -These quizzes are the pre- and post-lecture quizzes for the web development for ml curriculum at https://aka.ms/ml-beginners +These quizzes are the pre- and post-lecture quizzes for the ML curriculum at https://aka.ms/ml-beginners ## Project setup From 1be8c54849e3213b590f3ad8a986271c6aea0a07 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:38:49 +0200 Subject: [PATCH 26/91] Create README.fr.md --- .../1-intro-to-ML/translations/README.fr.md | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 1-Introduction/1-intro-to-ML/translations/README.fr.md diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md new file mode 100644 index 00000000..511f3764 --- /dev/null +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -0,0 +1,109 @@ +# Introduction au machine learning + +[![ML, AI, deep learning - Quelle est la différence ?](https://img.youtube.com/vi/lTd9RSxS9ZE/0.jpg)](https://youtu.be/lTd9RSxS9ZE "ML, AI, deep learning - What's the difference?") + +> 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. + +## [Quizz de pré-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) + +### Introduction + +Bienvenue à ce cours sur le machine learning classique pour débutant ! Que vous soyez complètement nouveau sur ce sujet ou que vous soyez un professonnel du ML expérimenté cherchant à peaufiner vos connaissances, nous sommes heureux de vous avoir avec nous ! Nous voulons créer un tremplin chaleureux pour vos études en ML et serions ravis d'évaluer, de répondre et d'apprendre de vos retours d'[expériences](https://github.com/microsoft/ML-For-Beginners/discussions). + +[![Introduction au ML](https://img.youtube.com/vi/h0e2HAPTGF4/0.jpg)](https://youtu.be/h0e2HAPTGF4 "Introduction to ML") + +> 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo: John Guttag du MIT introduit le machine learning +### Débuter avec le machine learning + +Avant de commencer avec ce cours, vous aurez besoin d'un ordinateur configuré et prêt à faire tourner des notebooks (jupyter) localement. + +- **Configurer votre ordinateur avec ces vidéos**. Apprendre comment configurer votre ordinateur avec cette [série de vidéos](https://www.youtube.com/playlist?list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6). +- **Apprendre Python**. Il est aussi recommandé d'avoir une connaissance basique de [Python](https://docs.microsoft.com/learn/paths/python-language/?WT.mc_id=academic-15963-cxa), un langage de programmaton utile pour les data scientist que nous utilisons tout au long de ce cours. +- **Apprendre Node.js et Javascript**. Nous utilisons aussi Javascript par moment dans ce cours afin de construire des applications WEB, vous aurez donc besoin de [node](https://nodejs.org) et [npm](https://www.npmjs.com/) installé, ainsi que de [Visual Studio Code](https://code.visualstudio.com/) pour développer en Python et Javascript. +- **Créer un compte GitHub**. Comme vous nous avez trouvé sur [GitHub](https://github.com), vous y avez sûrement un compte, mais si non, créez en un et répliquez ce cours afin de l'utiliser à votre grés. (N'oublier pas de nous donner une étoile aussi 😊) +- **Explorer Scikit-learn**. Familiariser vous avec [Scikit-learn](https://scikit-learn.org/stable/user_guide.html), un ensemble de librairies ML que nous mentionnons dans nos leçons. + +### Qu'est-ce que le machine learning + +Le terme `machine learning` est un des mots les plus populaire et le plus utilisé ces derniers temps. Il y a une probabilité accrue que vous l'ayez entendu au moins une fois si vous avez une appétence pour la technologie indépendamment du domaine dans lequel vous travaillez. Le fonctionnement du machine learning, cependant, reste un mystère pour la plupart des personnes. Pour un débutant en machine learning, le sujet peut nous submerger. Ainsi, il est important de comprendre ce qu'est le machine learning et de l'apprendre petit à petit au travers d'exemples pratiques. + +![ml hype curve](images/hype.png) + +> Google Trends montre la récente 'courbe de popularité' pour le mot 'machine learning' + +Nous vivons dans un univers rempli de mystères fascinants. De grands scientifiques comme Stephen Hawking, Albert Einstein et pleins d'autres ont dévoués leur vie à la recherche d'informations utiles afin de dévoiler les mystères qui nous entourent. C'est la condition humaine pour apprendre : un enfant apprend de nouvelles choses et découvre la structure du monde année après année jusqu'à qu'ils deviennent adultes. + +Le cerveau d'un enfant et ses sens perçoivent l'environnement qui les entourent et apprennent graduellement des schémas secrets de la vie qui vont l'aider à fabriquer des règles logiques afin d'identifier les schémas appris. Le processus d'apprentissage du cerveau humain est ce que rend les hommes comme la créature la plus sophistiquée du monde vivant. Apprendre continuellement par la découverte de schémas cachés et ensuite innover sur ces schémas nous permet de nous améliorer tout au long de notre vie. Cette capacité d'apprendre et d'évoluer est liée au concept de [plasticité neuronale](https://www.simplypsychology.org/brain-plasticity.html), nous pouvons tirer quelques motivations similaires entre le processus d'apprentissage du cerveau humain et le concept de machine learning. + +Le [cerveau humain](https://www.livescience.com/29365-human-brain.html) perçoit des choses du monde réel, assimile les informations perçues, fait des décisions rationnelles et entreprend certaines actions selon le contexte. C'est ce que l'on appelle se comporter intelligemment. Lorsque nous programmons une reproduction du processus de ce comportement à une machine, c'est ce que l'on appelle intelligence artificielle (IA). + +Bien que le terme peut être confu, machine learning (ML) est un important sous-ensemble de l'intelligence artificielle. **ML se réfère à l'utilisation d'algorithmes spécialisés afin de découvrir des informations utiles et de trouver des schémas cachés depuis des données perçues pour corroborer un processus de décision rationnel**. + +![AI, ML, deep learning, data science](images/ai-ml-ds.png) + +> Un diagramme montrant les relations entre AI, ML, deep learning et data science. Infographie par [Jen Looper](https://twitter.com/jenlooper) et inspiré par [ce graphique](https://softwareengineering.stackexchange.com/questions/366996/distinction-between-ai-ml-neural-networks-deep-learning-and-data-mining) + +## Ce que vous allez apprendre dans ce cours + +Dans ce cours, nous allons nous concentrer sur les concepts clés du machine learning qu'un débutant se doit de connaître. Nous parlerons ce que l'on appelle le 'machine learning classique' en utilisant principalement Scikit-learn, une excellente librairie que beaucoup d'étudiants utilisent afin d'apprendre les bases. Afin de comprendre les concepts plus larges de l'intelligence artificielle ou du deep learning, une profonde connaissance en machine learning est indispensable, et c'est ce que nous aimerions fournir ici. + +Dans ce cours, vous allez apprendre : + +- Les concepts clés du machine learning +- L'histoire du ML +- ML et équité (fairness) +- Les techniques de régression ML +- Les techniques de classification ML +- Les techniques de regroupement (clustering) ML +- Les techniques du traitement automatique des langues (NLP) ML +- Les techniques de prédictions à partir de séries chronologiques ML +- Apprentissage renforcé +- D'applications réels du ML + +## Ce que nous ne couvrirons pas + +- Deep learning +- Neural networks +- IA + +Afin d'avoir la meilleur expérience d'apprentissage, nous éviterons les complexités des réseaux neuronaux, du 'deep learning' (construire un modèle utilisant plusieurs couches de réseaux neuronaux) et IA, dont nous parlerons dans un cours différent. Nous offirons aussi un cours à venir sur la data science pour concentrer sur cet aspect de champs très large. + +## Pourquoi etudier le machine learning ? + +Le machine learning, depuis une perspective systémique, est défini comme la création de systèmes automatiques pouvant apprendre des schémas cachés depuis des données afin d'aider à prendre des décisions intelligentes. + +Ce but est faiblement inspiré de la manière dont le cerveau humain apprend certaines choses depuis les données qu'il perçoit du monde extérieur. + +✅ Penser une minute aux raisons qu'une entreprise aurait d'essayer d'utiliser des stratégies de machine learning au lieu de créer des règles codés en dur. + +### Les applications du machine learning + +Les applications du machine learning sont maintenant pratiquement partout, et sont aussi omniprésentes que les données qui circulent autour de notre société (générés par nos smartphones, appareils connectés ou autres systèmes). En prenant en considération l'immense potentiel des algorithmes dernier cri de machine learning, les chercheurs ont pu exploités leurs capacités afin de résoudre des problèmes multidimensionnels et interdisciplinaires de la vie avec d'important retours positifs + +**Vous pouvez utiliser le machine learning de plusieurs manières** : + +- Afin de prédire la possibilité d'avoir une maladie à partir des données médicales d'un patient. +- Pour tirer parti des données météorologiques afin de prédire les événements météorologiques. +- Afin de comprendre le sentiment d'un texte. +- Afin de détecter les fake news pour stopper la propagation de la propagande. + +La finance, l'économie, les sciences de la terre, l'exploration spatiale, le génie biomédical, les sciences cognitives et même les domaines des sciences humaines ont adapté le machine learning pour résoudre les problèmes ardus et lourds de traitement des données dans leur domaine respectif. + +Le machine learning automatise le processus de découverte de modèles en trouvant des informations significatives à partir de données réelles ou générées. Il s'est avéré très utile dans les applications commerciales, de santé et financières, entre autres. + +Dans un avenir proche, comprendre les bases du machine learning sera indispensable pour les personnes de tous les domaines en raison de son adoption généralisée. + +--- +## 🚀 Challenge + +Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. + +## [Quizz de post-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) + +## Révision et auto-apprentissage + +Pour en savoir plus sur la façon dont vous pouvez utiliser les algorithmes de ML dans le cloud, suivez ce [Parcours d'apprentissage](https://docs.microsoft.com/learn/paths/create-no-code-predictive-models-azure-machine- learning/?WT.mc_id=academic-15963-cxa). + +## Devoir + +[Être opérationnel](assignment.md) From 9439709d5b2a3a1311d6fbbd3f44bb56ae53112b Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:47:41 +0200 Subject: [PATCH 27/91] Editing assignment link --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 511f3764..19af588d 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -106,4 +106,4 @@ Pour en savoir plus sur la façon dont vous pouvez utiliser les algorithmes de M ## Devoir -[Être opérationnel](assignment.md) +[Être opérationnel](../assignment.md) From 5775c4b0690771414a7bdfb4f013beaaafa2df7f Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Wed, 14 Jul 2021 20:16:08 -0400 Subject: [PATCH 28/91] table tidy-up --- 4-Classification/2-Classifiers-1/README.md | 66 +++++++++++----------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/4-Classification/2-Classifiers-1/README.md b/4-Classification/2-Classifiers-1/README.md index bdff6bc9..0db1aeba 100644 --- a/4-Classification/2-Classifiers-1/README.md +++ b/4-Classification/2-Classifiers-1/README.md @@ -21,15 +21,14 @@ Assuming you completed [Lesson 1](../1-Introduction/README.md), make sure that a The data looks like this: - ```output - | | Unnamed: 0 | cuisine | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | - | --- | ---------- | ------- | ------ | -------- | ----- | ---------- | ----- | ------------ | ------- | -------- | --- | ------- | ----------- | ---------- | ----------------------- | ---- | ---- | --- | ----- | ------ | -------- | - | 0 | 0 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 1 | 1 | indian | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 2 | 2 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 3 | 3 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 4 | 4 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | - ``` +| | Unnamed: 0 | cuisine | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | +| --- | ---------- | ------- | ------ | -------- | ----- | ---------- | ----- | ------------ | ------- | -------- | --- | ------- | ----------- | ---------- | ----------------------- | ---- | ---- | --- | ----- | ------ | -------- | +| 0 | 0 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 1 | 1 | indian | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 2 | 2 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | 3 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 4 | 4 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + 1. Now, import several more libraries: @@ -68,13 +67,13 @@ Assuming you completed [Lesson 1](../1-Introduction/README.md), make sure that a Your features look like this: - | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | artemisia | artichoke | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | | - | -----: | -------: | ----: | ---------: | ----: | -----------: | ------: | -------: | --------: | --------: | ---: | ------: | ----------: | ---------: | ----------------------: | ---: | ---: | ---: | ----: | -----: | -------: | --- | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | +| almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | artemisia | artichoke | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | +| -----: | -------: | ----: | ---------: | ----: | -----------: | ------: | -------: | --------: | --------: | ---: | ------: | ----------: | ---------: | ----------------------: | ---: | ---: | ---: | ----: | -----: | -------: | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | Now you are ready to train your model! @@ -200,13 +199,13 @@ Since you are using the multiclass case, you need to choose what _scheme_ to use The result is printed - Indian cuisine is its best guess, with good probability: - | | 0 | | | | | | | | | | | | | | | | | | | | | - | -------: | -------: | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | - | indian | 0.715851 | | | | | | | | | | | | | | | | | | | | | - | chinese | 0.229475 | | | | | | | | | | | | | | | | | | | | | - | japanese | 0.029763 | | | | | | | | | | | | | | | | | | | | | - | korean | 0.017277 | | | | | | | | | | | | | | | | | | | | | - | thai | 0.007634 | | | | | | | | | | | | | | | | | | | | | + | | 0 | + | -------: | -------: | + | indian | 0.715851 | + | chinese | 0.229475 | + | japanese | 0.029763 | + | korean | 0.017277 | + | thai | 0.007634 | ✅ Can you explain why the model is pretty sure this is an Indian cuisine? @@ -217,22 +216,23 @@ Since you are using the multiclass case, you need to choose what _scheme_ to use print(classification_report(y_test,y_pred)) ``` - | | precision | recall | f1-score| support | | | | | | | | | | | | | | | | | | - | ------------ | ------ | -------- | ------- | ---- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | - | chinese | 0.73 | 0.71 | 0.72 | 229 | | | | | | | | | | | | | | | | | | - | indian | 0.91 | 0.93 | 0.92 | 254 | | | | | | | | | | | | | | | | | | - | japanese | 0.70 | 0.75 | 0.72 | 220 | | | | | | | | | | | | | | | | | | - | korean | 0.86 | 0.76 | 0.81 | 242 | | | | | | | | | | | | | | | | | | - | thai | 0.79 | 0.85 | 0.82 | 254 | | | | | | | | | | | | | | | | | | - | accuracy | 0.80 | 1199 | | | | | | | | | | | | | | | | | | | | - | macro avg | 0.80 | 0.80 | 0.80 | 1199 | | | | | | | | | | | | | | | | | | - | weighted avg | 0.80 | 0.80 | 0.80 | 1199 | | | | | | | | | | | | | | | | | | + | | precision | recall | f1-score | support | + | ------------ | ------ | -------- | ------- | ---- | + | chinese | 0.73 | 0.71 | 0.72 | 229 | + | indian | 0.91 | 0.93 | 0.92 | 254 | + | japanese | 0.70 | 0.75 | 0.72 | 220 | + | korean | 0.86 | 0.76 | 0.81 | 242 | + | thai | 0.79 | 0.85 | 0.82 | 254 | + | accuracy | 0.80 | 1199 | | | + | macro avg | 0.80 | 0.80 | 0.80 | 1199 | + | weighted avg | 0.80 | 0.80 | 0.80 | 1199 | ## 🚀Challenge In this lesson, you used your cleaned data to build a machine learning model that can predict a national cuisine based on a series of ingredients. Take some time to read through the many options Scikit-learn provides to classify data. Dig deeper into the concept of 'solver' to understand what goes on behind the scenes. ## [Post-lecture quiz](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/22/) + ## Review & Self Study Dig a little more into the math behind logistic regression in [this lesson](https://people.eecs.berkeley.edu/~russell/classes/cs194/f11/lectures/CS194%20Fall%202011%20Lecture%2006.pdf) From 59cefad031d40dba0abdc293a4ed912a492934ff Mon Sep 17 00:00:00 2001 From: ahaliu1 <247969917@qq.com> Date: Thu, 15 Jul 2021 11:07:53 +0800 Subject: [PATCH 29/91] Fix two path error --- 6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 75cd69da..3d122be6 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -125,7 +125,7 @@ It was nice talking to you, goodbye! ``` - 该任务的一种可能解决方案在[这里](solution/bot.py) + 该任务的一种可能解决方案在[这里](../solution/bot.py) ✅ 停止并思考 @@ -152,4 +152,4 @@ ## 任务 -[查找一个机器人](assignment.md) +[查找一个机器人](../assignment.md) From 4b18d4f145dbe5c584da60ee82993e0610ff439d Mon Sep 17 00:00:00 2001 From: ahaliu1 <247969917@qq.com> Date: Thu, 15 Jul 2021 11:08:36 +0800 Subject: [PATCH 30/91] Fix two file path error --- 6-NLP/1-Introduction-to-NLP/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/README.md b/6-NLP/1-Introduction-to-NLP/README.md index 227ad589..ea244c74 100644 --- a/6-NLP/1-Introduction-to-NLP/README.md +++ b/6-NLP/1-Introduction-to-NLP/README.md @@ -133,7 +133,7 @@ Let's create the bot next. We'll start by defining some phrases. It was nice talking to you, goodbye! ``` - One possible solution to the task is [here](solution/bot.py) + One possible solution to the task is [here](../solution/bot.py) ✅ Stop and consider @@ -162,4 +162,4 @@ Take a look at the references below as further reading opportunities. ## Assignment -[Search for a bot](assignment.md) +[Search for a bot](../assignment.md) From 27d16669d59fc09c8af6b651ff4bf9414b37029d Mon Sep 17 00:00:00 2001 From: Vishvanathan K Date: Thu, 15 Jul 2021 10:24:23 +0530 Subject: [PATCH 31/91] Update Markdown error --- 8-Reinforcement/1-QLearning/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/8-Reinforcement/1-QLearning/README.md b/8-Reinforcement/1-QLearning/README.md index bfa07ffe..6301c46e 100644 --- a/8-Reinforcement/1-QLearning/README.md +++ b/8-Reinforcement/1-QLearning/README.md @@ -229,8 +229,7 @@ We are now ready to implement the learning algorithm. Before we do that, we also We add a few `eps` to the original vector in order to avoid division by 0 in the initial case, when all components of the vector are identical. Run them learning algorithm through 5000 experiments, also called **epochs**: (code block 8) - - ```python +```python for epoch in range(5000): # Pick initial point @@ -255,11 +254,11 @@ Run them learning algorithm through 5000 experiments, also called **epochs**: (c ai = action_idx[a] Q[x,y,ai] = (1 - alpha) * Q[x,y,ai] + alpha * (r + gamma * Q[x+dpos[0], y+dpos[1]].max()) n+=1 - ``` +``` - After executing this algorithm, the Q-Table should be updated with values that define the attractiveness of different actions at each step. We can try to visualize the Q-Table by plotting a vector at each cell that will point in the desired direction of movement. For simplicity, we draw a small circle instead of an arrow head. +After executing this algorithm, the Q-Table should be updated with values that define the attractiveness of different actions at each step. We can try to visualize the Q-Table by plotting a vector at each cell that will point in the desired direction of movement. For simplicity, we draw a small circle instead of an arrow head. - + ## Checking the policy From 829ac30282d356b1b4b601452c1ab48cd1da390e Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Thu, 15 Jul 2021 09:30:48 +0200 Subject: [PATCH 32/91] Changed url for images --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 19af588d..a65367b5 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -27,7 +27,7 @@ Avant de commencer avec ce cours, vous aurez besoin d'un ordinateur configuré e Le terme `machine learning` est un des mots les plus populaire et le plus utilisé ces derniers temps. Il y a une probabilité accrue que vous l'ayez entendu au moins une fois si vous avez une appétence pour la technologie indépendamment du domaine dans lequel vous travaillez. Le fonctionnement du machine learning, cependant, reste un mystère pour la plupart des personnes. Pour un débutant en machine learning, le sujet peut nous submerger. Ainsi, il est important de comprendre ce qu'est le machine learning et de l'apprendre petit à petit au travers d'exemples pratiques. -![ml hype curve](images/hype.png) +![ml hype curve](../images/hype.png) > Google Trends montre la récente 'courbe de popularité' pour le mot 'machine learning' @@ -39,7 +39,7 @@ Le [cerveau humain](https://www.livescience.com/29365-human-brain.html) perçoit Bien que le terme peut être confu, machine learning (ML) est un important sous-ensemble de l'intelligence artificielle. **ML se réfère à l'utilisation d'algorithmes spécialisés afin de découvrir des informations utiles et de trouver des schémas cachés depuis des données perçues pour corroborer un processus de décision rationnel**. -![AI, ML, deep learning, data science](images/ai-ml-ds.png) +![AI, ML, deep learning, data science](../images/ai-ml-ds.png) > Un diagramme montrant les relations entre AI, ML, deep learning et data science. Infographie par [Jen Looper](https://twitter.com/jenlooper) et inspiré par [ce graphique](https://softwareengineering.stackexchange.com/questions/366996/distinction-between-ai-ml-neural-networks-deep-learning-and-data-mining) From 091d096eb19e3d8229e9556e3217c6c7823bb7fa Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Thu, 15 Jul 2021 09:33:50 +0200 Subject: [PATCH 33/91] Corrected Quizz to Quiz --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index a65367b5..828e7c62 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quizz de pré-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz de pré-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) ### Introduction @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quizz de post-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz de post-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) ## Révision et auto-apprentissage From a0c925fdaf878c8c1017fdef25b339297b9e9c38 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Thu, 15 Jul 2021 12:22:53 +0200 Subject: [PATCH 34/91] Correction de traduction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Post-conférence -> Postlecture * Pré-conférence -> Prélecture * Hidden patterns -> Schémas non observés Comme discuté dans le groupe --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 828e7c62..fd396d69 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quiz de pré-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz prélecture](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) ### Introduction @@ -33,11 +33,11 @@ Le terme `machine learning` est un des mots les plus populaire et le plus utilis Nous vivons dans un univers rempli de mystères fascinants. De grands scientifiques comme Stephen Hawking, Albert Einstein et pleins d'autres ont dévoués leur vie à la recherche d'informations utiles afin de dévoiler les mystères qui nous entourent. C'est la condition humaine pour apprendre : un enfant apprend de nouvelles choses et découvre la structure du monde année après année jusqu'à qu'ils deviennent adultes. -Le cerveau d'un enfant et ses sens perçoivent l'environnement qui les entourent et apprennent graduellement des schémas secrets de la vie qui vont l'aider à fabriquer des règles logiques afin d'identifier les schémas appris. Le processus d'apprentissage du cerveau humain est ce que rend les hommes comme la créature la plus sophistiquée du monde vivant. Apprendre continuellement par la découverte de schémas cachés et ensuite innover sur ces schémas nous permet de nous améliorer tout au long de notre vie. Cette capacité d'apprendre et d'évoluer est liée au concept de [plasticité neuronale](https://www.simplypsychology.org/brain-plasticity.html), nous pouvons tirer quelques motivations similaires entre le processus d'apprentissage du cerveau humain et le concept de machine learning. +Le cerveau d'un enfant et ses sens perçoivent l'environnement qui les entourent et apprennent graduellement des schémas non observés de la vie qui vont l'aider à fabriquer des règles logiques afin d'identifier les schémas appris. Le processus d'apprentissage du cerveau humain est ce que rend les hommes comme la créature la plus sophistiquée du monde vivant. Apprendre continuellement par la découverte de schémas non observés et ensuite innover sur ces schémas nous permet de nous améliorer tout au long de notre vie. Cette capacité d'apprendre et d'évoluer est liée au concept de [plasticité neuronale](https://www.simplypsychology.org/brain-plasticity.html), nous pouvons tirer quelques motivations similaires entre le processus d'apprentissage du cerveau humain et le concept de machine learning. Le [cerveau humain](https://www.livescience.com/29365-human-brain.html) perçoit des choses du monde réel, assimile les informations perçues, fait des décisions rationnelles et entreprend certaines actions selon le contexte. C'est ce que l'on appelle se comporter intelligemment. Lorsque nous programmons une reproduction du processus de ce comportement à une machine, c'est ce que l'on appelle intelligence artificielle (IA). -Bien que le terme peut être confu, machine learning (ML) est un important sous-ensemble de l'intelligence artificielle. **ML se réfère à l'utilisation d'algorithmes spécialisés afin de découvrir des informations utiles et de trouver des schémas cachés depuis des données perçues pour corroborer un processus de décision rationnel**. +Bien que le terme peut être confu, machine learning (ML) est un important sous-ensemble de l'intelligence artificielle. **ML se réfère à l'utilisation d'algorithmes spécialisés afin de découvrir des informations utiles et de trouver des schémas non observés depuis des données perçues pour corroborer un processus de décision rationnel**. ![AI, ML, deep learning, data science](../images/ai-ml-ds.png) @@ -70,7 +70,7 @@ Afin d'avoir la meilleur expérience d'apprentissage, nous éviterons les comple ## Pourquoi etudier le machine learning ? -Le machine learning, depuis une perspective systémique, est défini comme la création de systèmes automatiques pouvant apprendre des schémas cachés depuis des données afin d'aider à prendre des décisions intelligentes. +Le machine learning, depuis une perspective systémique, est défini comme la création de systèmes automatiques pouvant apprendre des schémas non observés depuis des données afin d'aider à prendre des décisions intelligentes. Ce but est faiblement inspiré de la manière dont le cerveau humain apprend certaines choses depuis les données qu'il perçoit du monde extérieur. @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quiz de post-conférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz postlecture](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) ## Révision et auto-apprentissage From bd08fb25c2e3f49a95aefabfd976ea77d44775d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Thu, 15 Jul 2021 19:04:56 +0800 Subject: [PATCH 35/91] Add files via upload --- .../translations/README.zh-cn.md | 294 ++++++++++++++++++ 1 file changed, 294 insertions(+) create mode 100644 4-Classification/1-Introduction/translations/README.zh-cn.md diff --git a/4-Classification/1-Introduction/translations/README.zh-cn.md b/4-Classification/1-Introduction/translations/README.zh-cn.md new file mode 100644 index 00000000..d85c266c --- /dev/null +++ b/4-Classification/1-Introduction/translations/README.zh-cn.md @@ -0,0 +1,294 @@ +# 对分类方法的介绍 + +在这四节课程中,你将会学习机器学习中一个基本的重点 - _分类_. 我们会在关于亚洲和印度的神奇的美食的数据集上尝试使用多种分类算法。希望你有点饿了。 + +![一个桃子!](../images/pinch.png) + +>在学习的课程中赞叹泛亚地区的美食吧! 图片由 [Jen Looper](https://twitter.com/jenlooper)提供 + +分类算法是[监督学习](https://wikipedia.org/wiki/Supervised_learning) 的一种。它与回归算法在很多方面都有相同之处。如果机器学习所有的目标都是使用数据集来预测数值或物品的名字,那么分类算法通常可以分为两类 _二元分类_ 和 _多元分类_。 + +[![对分类算法的介绍](https://img.youtube.com/vi/eg8DJYwdMyg/0.jpg)](https://youtu.be/eg8DJYwdMyg "对分类算法的介绍") + +> 🎥 点击上方给的图片可以跳转到一个视频-MIT的John对分类算法的介绍 + +请记住: + +- **线性回归** 帮助你预测变量之间的关系并对一个新的数据点会落在哪条线上做出精确的预测。因此,你可以预测 _南瓜在九月的价格和十月的价格_。 +- **逻辑回归** 帮助你发现“二元范畴”:即在当前这个价格, _这个南瓜是不是橙色_? + +分类方法采用多种算法来确定其他可以用来确定一个数据点的标签或类别的方法。让我们来研究一下这个数据集,看看我们能否通过观察菜肴的原料来确定它的源头。 + +## [课程前的小问题](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/19/) + +分类是机器学习研究者和数据科学家使用的一种基本方法。从基本的二元分类(这是不是一份垃圾邮件?)到复杂的图片分类和使用计算机视觉的分割技术,它都是将数据分类并提出相关问题的有效工具。 + +![二元分类 vs 多元分类](../images/binary-multiclass.png) + +> 需要分类算法解决的二元分类和多元分类问题的对比. 信息图由[Jen Looper](https://twitter.com/jenlooper)提供 + +在开始清洗数据、数据可视化和调整数据以适应机器学习的任务前,让我们来了解一下多种可用来数据分类的机器学习方法。 + +派生自[统计数学](https://wikipedia.org/wiki/Statistical_classification),分类算法使用经典的机器学习的一些特征,比如通过'吸烟者'、'体重'和'年龄'来推断 _罹患某种疾病的可能性_。作为一个与你刚刚实践过的回归算法很相似的监督学习算法,你的数据是被标记过的并且算法通过采集这些标签来进行分类和预测并进行输出。 + +✅ 花一点时间来想象一下一个关于菜肴的数据集。一个多元分类的模型应该能回答什么问题?一个二元分类的模型又应该能回答什么?如果你想确定一个给定的菜肴是否会用到葫芦巴(一种植物,种子用来调味)该怎么做?如果你想知道给你一个装满了八角茴香、花椰菜和辣根的购物袋你能否做出一道代表性的印度菜又该怎么做? + +[![Crazy mystery baskets](https://img.youtube.com/vi/GuTeDbaNoEU/0.jpg)](https://youtu.be/GuTeDbaNoEU "疯狂的神秘篮子") + +> 🎥 点击图像观看视频。整个'Chopped'节目的前提都是建立在神秘的篮子上,在这个节目中厨师必须利用随机给定的食材做菜。可见一个机器学习模型能起到不小的作用 + +## 初见-分类器 + +我们关于这个菜肴数据集想要提出的问题其实是一个 **多元问题**,因为我们有很多潜在的具有代表性的菜肴。给定一系列食材数据,数据能够符合这些类别中的哪一类? + +Scikit-learn项目提供多种对数据进行分类的算法,你需要根据问题的具体类型来进行选择。在下两节课程中你会学到这些算法中的几个。 + +## 练习 - 清洗并平衡你的数据 + +在你开始进行这个项目前的第一个上手的任务就是清洗和 **平衡**你的数据来得到更好的结果。从当前目录的根目录中的 _nodebook.ipynb_ 开始。 + +第一个需要安装的东西是 [imblearn](https://imbalanced-learn.org/stable/)这是一个Scikit-learn项目中的一个包,它可以让你更好的平衡数据 (关于这个任务你很快你就会学到更多)。 + +1. 安装 `imblearn`, 运行命令 `pip install`: + + ```python + pip install imblearn + ``` + +1. 为了导入和可视化数据你需要导入下面的这些包, 你还需要从`imblearn`导入`SMOTE` + + ```python + import pandas as pd + import matplotlib.pyplot as plt + import matplotlib as mpl + import numpy as np + from imblearn.over_sampling import SMOTE + ``` + + 现在你已经准备好导入数据了。 + +1. 下一项任务是导入数据: + + ```python + df = pd.read_csv('../data/cuisines.csv') + ``` + + 使用函数 `read_csv()` 会读取csv文件的内容 _cusines.csv_ 并将内容放置在 变量`df`中。 + +1. 检查数据的形状是否正确: + + ```python + df.head() + ``` + + 前五行输出应该是这样的: + + ```output + | | Unnamed: 0 | cuisine | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | + | --- | ---------- | ------- | ------ | -------- | ----- | ---------- | ----- | ------------ | ------- | -------- | --- | ------- | ----------- | ---------- | ----------------------- | ---- | ---- | --- | ----- | ------ | -------- | + | 0 | 65 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 1 | 66 | indian | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 2 | 67 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 3 | 68 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 4 | 69 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + ``` + +1. 调用函数 `info()` 可以获得有关这个数据集的信息: + + ```python + df.info() + ``` + + Your out resembles: + + ```output + + RangeIndex: 2448 entries, 0 to 2447 + Columns: 385 entries, Unnamed: 0 to zucchini + dtypes: int64(384), object(1) + memory usage: 7.2+ MB + ``` + + ## 练习 - 了解这些菜肴 + +现在任务变得更有趣了,让我们来探索如何将数据分配给各个菜肴 + +1. 调用函数 `barh()`可以绘制出数据的条形图: + + ```python + df.cuisine.value_counts().plot.barh() + ``` + + ![菜肴数据分配](../images/cuisine-dist.png) + + 这里有有限的一些菜肴,但是数据的分配是不平均的。但是你可以修正这一现象!在这样做之前再稍微探索一下。 + +1. 找出对于每个菜肴有多少数据是有效的并将其打印出来: + + ```python + thai_df = df[(df.cuisine == "thai")] + japanese_df = df[(df.cuisine == "japanese")] + chinese_df = df[(df.cuisine == "chinese")] + indian_df = df[(df.cuisine == "indian")] + korean_df = df[(df.cuisine == "korean")] + + print(f'thai df: {thai_df.shape}') + print(f'japanese df: {japanese_df.shape}') + print(f'chinese df: {chinese_df.shape}') + print(f'indian df: {indian_df.shape}') + print(f'korean df: {korean_df.shape}') + ``` + + 输出应该是这样的 : + + ```output + thai df: (289, 385) + japanese df: (320, 385) + chinese df: (442, 385) + indian df: (598, 385) + korean df: (799, 385) + ``` +## 探索有关食材的内容 + +现在你可以在数据中探索的更深一点并了解每道菜肴的代表性食材。你需要将反复出现的、容易造成混淆的数据清理出去,那么让我们来学习解决这个问题。 + +1. 在Python中创建一个函数 `create_ingredient()` 来创建一个食材的数据帧。这个函数会去掉数据中无用的列并按食材的数量进行分类。 + + ```python + def create_ingredient_df(df): + ingredient_df = df.T.drop(['cuisine','Unnamed: 0']).sum(axis=1).to_frame('value') + ingredient_df = ingredient_df[(ingredient_df.T != 0).any()] + ingredient_df = ingredient_df.sort_values(by='value', ascending=False + inplace=False) + return ingredient_df + ``` +现在你可以使用这个函数来得到理想的每道菜肴最重要的10种食材。 + +1. 调用函数 `create_ingredient()` 然后通过函数`barh()`来绘制图像: + + ```python + thai_ingredient_df = create_ingredient_df(thai_df) + thai_ingredient_df.head(10).plot.barh() + ``` + + ![thai](../images/thai.png) + +1. 对日本的数据进行相同的操作: + + ```python + japanese_ingredient_df = create_ingredient_df(japanese_df) + japanese_ingredient_df.head(10).plot.barh() + ``` + + ![日本](../images/japanese.png) + +1. 现在处理中国的数据: + + ```python + chinese_ingredient_df = create_ingredient_df(chinese_df) + chinese_ingredient_df.head(10).plot.barh() + ``` + + ![中国](../images/chinese.png) + +1. 绘制印度食材的数据: + + ```python + indian_ingredient_df = create_ingredient_df(indian_df) + indian_ingredient_df.head(10).plot.barh() + ``` + + ![印度](../images/indian.png) + +1. 最后,绘制韩国的食材的数据: + + ```python + korean_ingredient_df = create_ingredient_df(korean_df) + korean_ingredient_df.head(10).plot.barh() + ``` + + ![韩国](../images/korean.png) + +1. 现在,去除在不同的菜肴间最普遍的容易造成混乱的食材,调用函数 `drop()`: + + 大家都喜欢米饭、大蒜和生姜 + + ```python + feature_df= df.drop(['cuisine','Unnamed: 0','rice','garlic','ginger'], axis=1) + labels_df = df.cuisine #.unique() + feature_df.head() + ``` + +## 平衡数据集 + +现在你已经清理过数据集了, 使用 [SMOTE](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTE.html) - "Synthetic Minority Over-sampling Technique" - 来平衡数据集。 + +1. 调用函数 `fit_resample()`, 此方法通过插入数据来生成新的样本 + + ```python + oversample = SMOTE() + transformed_feature_df, transformed_label_df = oversample.fit_resample(feature_df, labels_df) + ``` + + 通过对数据集的平衡,当你对数据进行分类时能够得到更好的结果。现在考虑一个二元分类的问题,如果你的数据集中的大部分数据都属于其中一个类别,那么机器学习的模型就会因为在那个类别的数据更多而判断那个类别更为常见。平衡数据能够去除不公平的数据点。 + +1. 现在你可以查看每个食材的标签数量: + + ```python + print(f'new label count: {transformed_label_df.value_counts()}') + print(f'old label count: {df.cuisine.value_counts()}') + ``` + + 输出应该是这样的 : + + ```output + new label count: korean 799 + chinese 799 + indian 799 + japanese 799 + thai 799 + Name: cuisine, dtype: int64 + old label count: korean 799 + indian 598 + chinese 442 + japanese 320 + thai 289 + Name: cuisine, dtype: int64 + ``` + + 现在这个数据集不仅干净、平衡而且还很“美味” ! + +1. 最后一步是保存你处理过后的平衡的数据(包括标签和特征),将其保存为一个可以被输出到文件中的数据帧。 + + ```python + transformed_df = pd.concat([transformed_label_df,transformed_feature_df],axis=1, join='outer') + ``` + +1. 你可以通过调用函数 `transformed_df.head()` 和 `transformed_df.info()`再检查一下你的数据。 接下来要将数据保存以供在未来的课程中使用: + + ```python + transformed_df.head() + transformed_df.info() + transformed_df.to_csv("../data/cleaned_cuisine.csv") + ``` + + 这个全新的CSV文件可以在数据根目录中被找到。 + +--- + +## 🚀小练习 + +本项目的全部课程含有很多有趣的数据集。 探索一下 `data`文件夹,看看这里面有没有适合二元分类、多元分类算法的数据集,再想一下你对这些数据集有没有什么想问的问题。 + +## [课后练习](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/20/) + +## Review & Self Study + +探索一下 SMOTE的API文档。思考一下它最适合于什么样的情况、它能够解决什么样的问题。 + +## Assignment + +[探索一下分类方法](../assignment.md) +{"mode":"full","isActive":false} + + From bb1821234ebf62cb6f3b9827d5e7b0216b7b00ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:04:43 +0800 Subject: [PATCH 36/91] Add files via upload --- .../1-Introduction/translations/README.zh-cn.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/4-Classification/1-Introduction/translations/README.zh-cn.md b/4-Classification/1-Introduction/translations/README.zh-cn.md index d85c266c..1dbc3598 100644 --- a/4-Classification/1-Introduction/translations/README.zh-cn.md +++ b/4-Classification/1-Introduction/translations/README.zh-cn.md @@ -282,13 +282,11 @@ Scikit-learn项目提供多种对数据进行分类的算法,你需要根据 ## [课后练习](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/20/) -## Review & Self Study +## 回顾 & 自学 探索一下 SMOTE的API文档。思考一下它最适合于什么样的情况、它能够解决什么样的问题。 -## Assignment +## 课后作业 [探索一下分类方法](../assignment.md) -{"mode":"full","isActive":false} - - +{"mode":"full","isActive":false} \ No newline at end of file From 05b028a5b2755a92c3c1f43fb7dd1be6cae01615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=87=E4=BD=93=E4=B8=A4=E5=BC=80=E8=8A=B1=E7=94=9F?= <56857145+loap-a@users.noreply.github.com> Date: Thu, 15 Jul 2021 21:07:43 +0800 Subject: [PATCH 38/91] Update README.zh-cn.md --- 4-Classification/1-Introduction/translations/README.zh-cn.md | 1 - 1 file changed, 1 deletion(-) diff --git a/4-Classification/1-Introduction/translations/README.zh-cn.md b/4-Classification/1-Introduction/translations/README.zh-cn.md index 1dbc3598..2e258f3f 100644 --- a/4-Classification/1-Introduction/translations/README.zh-cn.md +++ b/4-Classification/1-Introduction/translations/README.zh-cn.md @@ -289,4 +289,3 @@ Scikit-learn项目提供多种对数据进行分类的算法,你需要根据 ## 课后作业 [探索一下分类方法](../assignment.md) -{"mode":"full","isActive":false} \ No newline at end of file From baa5cabaae13c85ac031ba836f37c416e8b1a875 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Thu, 15 Jul 2021 15:41:26 +0200 Subject: [PATCH 39/91] Corrected to accepted words MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Postconférence Préconférence --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index fd396d69..08ad7a09 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quiz prélecture](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz préconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) ### Introduction @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quiz postlecture](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz postconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) ## Révision et auto-apprentissage From f49981f258791b6a7735f090367bae716c2bfba3 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Thu, 15 Jul 2021 15:55:38 +0200 Subject: [PATCH 40/91] Update README.fr.md --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 08ad7a09..5fae99cd 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quiz préconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz de préconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) ### Introduction @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quiz postconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz de postconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) ## Révision et auto-apprentissage From 846b62d0f7f9c5ac76ae9cf31c9c75c0e4b3426e Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Thu, 15 Jul 2021 17:41:04 +0200 Subject: [PATCH 41/91] Italian Translation - Chapter 2 complete --- .../4-Logistic/translations/README.it.md | 299 ++++++++++++++++++ .../4-Logistic/translations/assignment.it.md | 10 + 2 files changed, 309 insertions(+) create mode 100644 2-Regression/4-Logistic/translations/README.it.md create mode 100644 2-Regression/4-Logistic/translations/assignment.it.md diff --git a/2-Regression/4-Logistic/translations/README.it.md b/2-Regression/4-Logistic/translations/README.it.md new file mode 100644 index 00000000..6a31f5fb --- /dev/null +++ b/2-Regression/4-Logistic/translations/README.it.md @@ -0,0 +1,299 @@ +# Regressione logistica per prevedere le categorie + +![Infografica di regressione lineare e logistica](../images/logistic-linear.png) +> Infografica di [Dasani Madipalli](https://twitter.com/dasani_decoded) + +## [Quiz Pre-Lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/15/) + +## Introduzione + +In questa lezione finale sulla Regressione, una delle tecniche _classiche_ di base di machine learning, si darà un'occhiata alla Regressione Logistica. Si dovrebbe utilizzare questa tecnica per scoprire modelli per prevedere le categorie binarie. Questa caramella è al cioccolato o no? Questa malattia è contagiosa o no? Questo cliente sceglierà questo prodotto o no? + +In questa lezione, si imparerà: + +- Una nuova libreria per la visualizzazione dei dati +- Tecniche per la regressione logistica + +✅ Con questo [modulo di apprendimento](https://docs.microsoft.com/learn/modules/train-evaluate-classification-models?WT.mc_id=academic-15963-cxa) si potrà approfondire la comprensione del lavoro con questo tipo di regressione +## Prerequisito + +Avendo lavorato con i dati della zucca, ora si ha abbastanza familiarità con essi per rendersi conto che esiste una categoria binaria con cui è possibile lavorare: `Color` (Colore). + +Si costruisce un modello di regressione logistica per prevedere, date alcune variabili, di _che colore sarà probabilmente una data zucca_ (arancione 🎃 o bianca 👻). + +> Perché si parla di classificazione binaria in un gruppo di lezioni sulla regressione? Solo per comodità linguistica, poiché la regressione logistica è in [realtà un metodo di classificazione](https://scikit-learn.org/stable/modules/linear_model.html#logistic-regression), anche se lineare. Si scopriranno altri modi per classificare i dati nel prossimo gruppo di lezioni. + +## Definire la domanda + +Allo scopo, verrà espressa come binaria: 'Arancio' o 'Non Arancio'. C'è anche una categoria "striped" (a strisce) nell'insieme di dati, ma ci sono pochi casi, quindi non verrà presa in considerazione. Comunque scompare una volta rimossi i valori null dall'insieme di dati. + +> 🎃 Fatto divertente, a volte le zucche bianche vengono chiamate zucche "fantasma" Non sono molto facili da intagliare, quindi non sono così popolari come quelle arancioni ma hanno un bell'aspetto! + +## Informazioni sulla regressione logistica + +La regressione logistica differisce dalla regressione lineare, che si è appresa in precedenza, in alcuni importanti modi. + +### Classificazione Binaria + +La regressione logistica non offre le stesse caratteristiche della regressione lineare. La prima offre una previsione su una categoria binaria ("arancione o non arancione") mentre la seconda è in grado di prevedere valori continui, ad esempio data l'origine di una zucca e il momento del raccolto, di _quanto aumenterà il suo prezzo_. + +![Modello di classificazione della zucca](../images/pumpkin-classifier.png) +> Infografica di [Dasani Madipalli](https://twitter.com/dasani_decoded) +### Altre classificazioni: + +Esistono altri tipi di regressione logistica, inclusi multinomiale e ordinale: + +- **Multinomiale**, che implica avere più di una categoria: "arancione, bianco e a strisce". +- **Ordinale**, che coinvolge categorie ordinate, utile se si volessero ordinare i risultati in modo logico, come le zucche che sono ordinate per un numero finito di dimensioni (mini,sm,med,lg,xl,xxl). + +![Regressione multinomiale contro ordinale](../images/multinomial-ordinal.png) +> Infografica di [Dasani Madipalli](https://twitter.com/dasani_decoded) + +### È ancora lineare + +Anche se questo tipo di Regressione riguarda le "previsioni di categoria", funziona ancora meglio quando esiste una chiara relazione lineare tra la variabile dipendente (colore) e le altre variabili indipendenti (il resto dell'insieme di dati, come il nome della città e le dimensioni) . È bene avere un'idea se c'è qualche linearità che divide queste variabili o meno. + +### Le variabili NON devono essere correlate + +Si ricorda come la regressione lineare ha funzionato meglio con più variabili correlate? La regressione logistica è l'opposto: le variabili non devono essere allineate. Funziona per questi dati che hanno correlazioni alquanto deboli. + +### Servono molti dati puliti + +La regressione logistica fornirà risultati più accurati se si utilizzano più dati; quindi si tenga a mente che, essendo l'insieme di dati sulla zucca piccolo, non è ottimale per questo compito + +✅ Si pensi ai tipi di dati che si prestano bene alla regressione logistica + +## Esercizio: riordinare i dati + +Innanzitutto, si puliscono un po 'i dati, eliminando i valori null e selezionando solo alcune delle colonne: + +1. Aggiungere il seguente codice: + + ```python + from sklearn.preprocessing import LabelEncoder + + new_columns = ['Color','Origin','Item Size','Variety','City Name','Package'] + + new_pumpkins = pumpkins.drop([c for c in pumpkins.columns if c not in new_columns], axis=1) + + new_pumpkins.dropna(inplace=True) + + new_pumpkins = new_pumpkins.apply(LabelEncoder().fit_transform) + ``` + + Si può sempre dare un'occhiata al nuovo dataframe: + + ```python + new_pumpkins.info + ``` + +### Visualizzazione - griglia affiancata + +A questo punto si è caricato di nuovo il [notebook iniziale](../notebook.ipynb) con i dati della zucca e lo si è pulito in modo da preservare un insieme di dati contenente alcune variabili, incluso `Color`. Si visualizza il dataframe nel notebook utilizzando una libreria diversa: [Seaborn](https://seaborn.pydata.org/index.html), che è costruita su Matplotlib, usata in precedenza. + +Seaborn offre alcuni modi accurati per visualizzare i dati. Ad esempio, si possono confrontare le distribuzioni dei dati per ogni punto in una griglia affiancata. + +1. Si crea una griglia di questo tipo istanziando `PairGrid`, usando i dati della zucca `new_pumpkins`, poi chiamando `map()`: + + ```python + import seaborn as sns + + g = sns.PairGrid(new_pumpkins) + g.map(sns.scatterplot) + ``` + + ![Una griglia di dati visualizzati](../images/grid.png) + + Osservando i dati fianco a fianco, si può vedere come i dati di Color si riferiscono alle altre colonne. + + ✅ Data questa griglia del grafico a dispersione, quali sono alcune esplorazioni interessanti che si possono immaginare? + +### Usare un grafico a sciame + +Poiché Color è una categoria binaria (arancione o no), viene chiamata "dati categoriali" e richiede "un [approccio più specializzato](https://seaborn.pydata.org/tutorial/categorical.html?highlight=bar) alla visualizzazione". Esistono altri modi per visualizzare la relazione di questa categoria con altre variabili. + +È possibile visualizzare le variabili fianco a fianco con i grafici di Seaborn. + +1. Si provi un grafico a "sciame" per mostrare la distribuzione dei valori: + + ```python + sns.swarmplot(x="Color", y="Item Size", data=new_pumpkins) + ``` + + ![Uno sciame di dati visualizzati](../images/swarm.png) + +### Grafico violino + +Un grafico di tipo "violino" è utile in quanto è possibile visualizzare facilmente il modo in cui sono distribuiti i dati nelle due categorie. I grafici di tipo violino non funzionano così bene con insieme di dati più piccoli poiché la distribuzione viene visualizzata in modo più "liscio". + +1. Chiamare `catplot()` passando i parametri `x=Color`, `kind="violin"` : + + ```python + sns.catplot(x="Color", y="Item Size", + kind="violin", data=new_pumpkins) + ``` + + ![una tabella di un grafico di tipo violino](../images/violin.png) + + ✅ Provare a creare questo grafico e altri grafici Seaborn, utilizzando altre variabili. + +Ora che si ha un'idea della relazione tra le categorie binarie di colore e il gruppo più ampio di dimensioni, si esplora la regressione logistica per determinare il probabile colore di una data zucca. + +> **🧮 Mostrami la matematica** +> +> Si ricorda come la regressione lineare usava spesso i minimi quadrati ordinari per arrivare a un valore? La regressione logistica si basa sul concetto di "massima verosimiglianza" utilizzando [le funzioni sigmoidi](https://wikipedia.org/wiki/Sigmoid_function). Una "Funzione Sigmoide" su un grafico ha l'aspetto di una forma a "S". Prende un valore e lo mappa da qualche parte tra 0 e 1. La sua curva è anche chiamata "curva logistica". La sua formula si presenta così: +> +> ![funzione logistica](../images/sigmoid.png) +> +> dove il punto medio del sigmoide si trova nel punto 0 di x, L è il valore massimo della curva e k è la pendenza della curva. Se l'esito della funzione è maggiore di 0,5, all'etichetta in questione verrà assegnata la classe '1' della scelta binaria. In caso contrario, sarà classificata come '0'. + +## Costruire il modello + +Costruire un modello per trovare queste classificazioni binarie è sorprendentemente semplice in Scikit-learn. + +1. Si selezionano le variabili da utilizzare nel modello di classificazione e si dividono gli insiemi di training e test chiamando `train_test_split()`: + + ```python + from sklearn.model_selection import train_test_split + + Selected_features = ['Origin','Item Size','Variety','City Name','Package'] + + X = new_pumpkins[Selected_features] + y = new_pumpkins['Color'] + + X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0) + + ``` + +1. Ora si può addestrare il modello, chiamando `fit()` con i dati di addestramento e stamparne il risultato: + + ```python + from sklearn.model_selection import train_test_split + from sklearn.metrics import accuracy_score, classification_report + from sklearn.linear_model import LogisticRegression + + model = LogisticRegression() + model.fit(X_train, y_train) + predictions = model.predict(X_test) + + print(classification_report(y_test, predictions)) + print('Predicted labels: ', predictions) + print('Accuracy: ', accuracy_score(y_test, predictions)) + ``` + + Si dia un'occhiata al tabellone segnapunti del modello. Non è male, considerando che si hanno solo circa 1000 righe di dati: + + ```output + precision recall f1-score support + + 0 0.85 0.95 0.90 166 + 1 0.38 0.15 0.22 33 + + accuracy 0.82 199 + macro avg 0.62 0.55 0.56 199 + weighted avg 0.77 0.82 0.78 199 + + Predicted labels: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 1 0 1 0 0 1 0 0 0 1 0] + ``` + +## Migliore comprensione tramite una matrice di confusione + +Sebbene si possano ottenere [i termini](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.classification_report.html?highlight=classification_report#sklearn.metrics.classification_report) del rapporto dei punteggi stampando gli elementi di cui sopra, si potrebbe essere in grado di comprendere più facilmente il modello utilizzando una [matrice di confusione](https://scikit-learn.org/stable/modules/model_evaluation.html#confusion-matrix) che aiuti a capire come lo stesso sta funzionando. + +> 🎓 Una '[matrice di confusione](https://it.wikipedia.org/wiki/Matrice_di_confusione)' (o 'matrice di errore') è una tabella che esprime i veri contro i falsi positivi e negativi del modello, misurando così l'accuratezza delle previsioni. + +1. Per utilizzare una metrica di confusione, si `chiama confusion_matrix()`: + + ```python + from sklearn.metrics import confusion_matrix + confusion_matrix(y_test, predictions) + ``` + + Si dia un'occhiata alla matrice di confusione del modello: + + ```output + array([[162, 4], + [ 33, 0]]) + ``` + +Cosa sta succedendo qui? Si supponga che al modello venga chiesto di classificare gli elementi tra due categorie binarie, la categoria "zucca" e la categoria "non una zucca". + +- Se il modello prevede qualcosa come una zucca e appartiene alla categoria 'zucca' in realtà lo si chiama un vero positivo, mostrato dal numero in alto a sinistra. +- Se il modello prevede qualcosa come non una zucca e appartiene alla categoria 'zucca' in realtà si chiama falso positivo, mostrato dal numero in alto a destra. +- Se il modello prevede qualcosa come una zucca e appartiene alla categoria 'non-una-zucca' in realtà si chiama falso negativo, mostrato dal numero in basso a sinistra. +- Se il modello prevede qualcosa come non una zucca e appartiene alla categoria 'non-una-zucca' in realtà lo si chiama un vero negativo, mostrato dal numero in basso a destra. + +![Matrice di Confusione](../images/confusion-matrix.png) + +> Infografica di [Jen Looper](https://twitter.com/jenlooper) + +Come si sarà intuito, è preferibile avere un numero maggiore di veri positivi e veri negativi e un numero inferiore di falsi positivi e falsi negativi, il che implica che il modello funziona meglio. + +✅ Domanda: Secondo la matrice di confusione, come si è comportato il modello? Risposta: Non male; ci sono un buon numero di veri positivi ma anche diversi falsi negativi. + +I termini visti in precedenza vengono rivisitati con l'aiuto della mappatura della matrice di confusione di TP/TN e FP/FN: + +🎓 Precisione: TP/(TP + FN) La frazione di istanze rilevanti tra le istanze recuperate (ad es. quali etichette erano ben etichettate) + +🎓 Richiamo: TP/(TP + FP) La frazione di istanze rilevanti che sono state recuperate, ben etichettate o meno + +🎓 f1-score: (2 * precisione * richiamo)/(precisione + richiamo) Una media ponderata della precisione e del richiamo, dove il migliore è 1 e il peggiore è 0 + +🎓 Supporto: il numero di occorrenze di ciascuna etichetta recuperata + +🎓 Accuratezza: (TP + TN)/(TP + TN + FP + FN) La percentuale di etichette prevista accuratamente per un campione. + +🎓 Macro Media: il calcolo delle metriche medie non ponderate per ciascuna etichetta, senza tener conto dello squilibrio dell'etichetta. + +🎓 Media ponderata: il calcolo delle metriche medie per ogni etichetta, tenendo conto dello squilibrio dell'etichetta pesandole in base al loro supporto (il numero di istanze vere per ciascuna etichetta). + +✅ Si riesce a pensare a quale metrica si dovrebbe guardare se si vuole che il modello riduca il numero di falsi negativi? + +## Visualizzare la curva ROC di questo modello + +Questo non è un cattivo modello; la sua precisione è nell'intervallo dell'80%, quindi idealmente si potrebbe usare per prevedere il colore di una zucca dato un insieme di variabili. + +Si rende un'altra visualizzazione per vedere il cosiddetto punteggio 'ROC': + +```python +from sklearn.metrics import roc_curve, roc_auc_score + +y_scores = model.predict_proba(X_test) +# calculate ROC curve +fpr, tpr, thresholds = roc_curve(y_test, y_scores[:,1]) +sns.lineplot([0, 1], [0, 1]) +sns.lineplot(fpr, tpr) +``` +Usando di nuovo Seaborn, si traccia la [Caratteristica Operativa di Ricezione](https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc.html?highlight=roc) o il ROC del modello. Le curve ROC vengono spesso utilizzate per ottenere una visualizzazione dell'output di un classificatore in termini di veri e falsi positivi. "Le curve ROC in genere presentano un tasso di veri positivi sull'asse Y e un tasso di falsi positivi sull'asse X". Pertanto, la ripidità della curva e lo spazio tra la linea del punto medio e la curva contano: si vuole una curva che si sposti rapidamente verso l'alto e oltre la linea. In questo caso, ci sono falsi positivi con cui iniziare, quindi la linea si dirige correttamente: + +![ROC](../images/ROC.png) + +Infine, si usa l'[`API roc_auc_score`](https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html?highlight=roc_auc#sklearn.metrics.roc_auc_score) di Scikit-learn per calcolare l'effettiva "Area sotto la curva" (AUC): + +```python +auc = roc_auc_score(y_test,y_scores[:,1]) +print(auc) +``` +Il risultato è `0.6976998904709748`. Dato che l'AUC varia da 0 a 1, si desidera un punteggio elevato, poiché un modello corretto al 100% nelle sue previsioni avrà un AUC di 1; in questo caso, il modello è _abbastanza buono_. + +Nelle lezioni future sulle classificazioni si imparerà come eseguire l'iterazione per migliorare i punteggi del modello. Ma per ora, congratulazioni! Si sono completate queste lezioni di regressione! + +--- +## 🚀 Sfida + +C'è molto altro da svelare riguardo alla regressione logistica! Ma il modo migliore per imparare è sperimentare. Trovare un insieme di dati che si presti a questo tipo di analisi e costruire un modello con esso. Cosa si è appreso? suggerimento: provare [Kaggle](https://kaggle.com) per ottenere insiemi di dati interessanti. + +## [Quiz post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/16/) + +## Revisione e Auto Apprendimento + +Leggere le prime pagine di [questo articolo da Stanford](https://web.stanford.edu/~jurafsky/slp3/5.pdf) su alcuni usi pratici della regressione logistica. Si pensi alle attività più adatte per l'uno o l'altro tipo di attività di regressione studiate fino a questo punto. Cosa funzionerebbe meglio? + +## Compito + +[Ritentare questa regressione](assignment.it.md) diff --git a/2-Regression/4-Logistic/translations/assignment.it.md b/2-Regression/4-Logistic/translations/assignment.it.md new file mode 100644 index 00000000..7b9b2016 --- /dev/null +++ b/2-Regression/4-Logistic/translations/assignment.it.md @@ -0,0 +1,10 @@ +# Riprovare un po' di Regressione + +## Istruzioni + +Nella lezione è stato usato un sottoinsieme dei dati della zucca. Ora si torna ai dati originali e si prova a usarli tutti, puliti e standardizzati, per costruire un modello di regressione logistica. +## Rubrica + +| Criteri | Ottimo | Adeguato | Necessita miglioramento | +| -------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| | Un notebook viene presentato con un modello ben spiegato con buone prestazioni | Un notebook viene presentato con un modello dalle prestazioni minime | Un notebook viene presentato con un modello con scarse o nessuna prestazione | From 93bcc7ff1b5416161067655086fdb7710405c30e Mon Sep 17 00:00:00 2001 From: JudyZhangYifan Date: Thu, 15 Jul 2021 17:54:36 -0400 Subject: [PATCH 42/91] 8-Reinforcement intro README translation --- 8-Reinforcement/translations/README.zh-cn.md | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 8-Reinforcement/translations/README.zh-cn.md diff --git a/8-Reinforcement/translations/README.zh-cn.md b/8-Reinforcement/translations/README.zh-cn.md new file mode 100644 index 00000000..c033d1db --- /dev/null +++ b/8-Reinforcement/translations/README.zh-cn.md @@ -0,0 +1,53 @@ +# 强化学习介绍 + +强化学习(Reinforcement learning,RL)被视为基础机器学习除监督学习以及无监督学习之外的范式之一。强化学习是完全关于决策的,它可以提供正确的决策或者至少能从他们中学习。 + +想象你现在有一个例如股票市场的模拟环境。如果你施加了一条给定的规章制度的话,将会发生什么呢?这条规章制度会带来积极还是消极的影响呢?如果产生了负面影响的话,那么你就需要接受这种 _负强化_ ,从中学习并改变方针。如果产生了正面的成果,那么你就需要基于这种 _正强化_ 越做越好。 + +![彼得与狼](../images/peter.png) + +> 彼得和他的朋友们需要逃离饥饿的狼!(图片来自:[Jen Looper](https://twitter.com/jenlooper)) + +## 区域主题:彼得与狼(俄罗斯) + +[彼得与狼](https://zh.wikipedia.org/wiki/%E5%BD%BC%E5%BE%97%E5%92%8C%E7%8B%BC) 是前苏联作曲家[普罗科菲耶夫](https://zh.wikipedia.org/wiki/%E8%B0%A2%E5%B0%94%E7%9B%96%C2%B7%E6%99%AE%E7%BD%97%E7%A7%91%E8%8F%B2%E8%80%B6%E5%A4%AB)写的一部交响童话。它讲述的是少先队员彼得勇敢地离家到森林空地去追捕狼的故事。在本节中,我们将训练可以帮助彼得的机器学习算法: + +- **探索** 周边区域并构建一张最佳的导航地图 +- **学习** 如何使用滑板并在上面保持平衡,以便更加快速地移动。 + +[![彼得与狼](https://img.youtube.com/vi/Fmi5zHg4QSM/0.jpg)](https://www.youtube.com/watch?v=Fmi5zHg4QSM) + +> 🎥 点击上图聆听普罗科菲耶夫的《彼得与狼》 + +## 强化学习 + +在之前的章节中,你已经看到了两个机器学习问题的例子: + +- **有监督的**——我们有数据集可以为我们想要解决的问题提出示例解决方案。[分类模型](../../4-Classification/README.md)与[回归模型](../../2-Regression/translations/README.zh-cn.md)都是有监督的任务。 +- **无监督的**——我们的训练数据没有标签。无监督学习的一个主要例子就是[聚类分析](../../5-Clustering/README.md)。 + +在本节中,我们会向你介绍一种新的学习问题。这种问题不需要有标签的训练数据,它们有以下几类问题: + +- **[半监督学习](https://wikipedia.org/wiki/Semi-supervised_learning)**——我们有很多没有标签的数据可以用于预先训练模型。 +- **[强化学习](https://wikipedia.org/wiki/Reinforcement_learning)**——一个智能体(agent)在某些模拟环境中进行实验并以此学习如何表现。 + +### 例子 - 电脑游戏 + +假设你想要教会电脑如何玩一个例如国际象棋或者[超级马里奥](https://wikipedia.org/wiki/Super_Mario)的游戏。对于电脑来说,我们需要让它预测在每个游戏状态下它的动作才能使它成功地玩游戏。虽然这看上去像是个分类问题,但是事实并非如此——因为我们没有包含(游戏)状态和相应动作的数据集。虽然我们可能有一些现有的国际象棋比赛数据或者玩家玩超级马里奥的记录,但是那些数据很可能无法包含足够多的潜在(游戏)状态。 + +**强化学习** (RL) 不是寻找现有的游戏数据,而是基于一种*想让电脑玩* 多次并观察结果的想法。因此,我们需要做以下两件事来应用强化学习: + +- **环境** 和 **模拟器** ——可以让我们多次玩游戏。这个模拟器将定义所有游戏的规则、可能的状态以及动作。 + +- **奖励函数** ——会告诉我们在每个动作或游戏中的表现如何。 + +其他机器学习和强化学习(RL)的主要差别就是在RL中我们通常无法在完成游戏之前知道我们是赢还是输。因此,我们无法评价游戏中的某一个特定动作是好是坏——我们只会在游戏结束时才得到奖励。我们的目标是设计一种可以在不确定条件下帮我们训练模型的算法。接下来我们将要学习一种叫**Q-learning**的RL算法。 + +## 课程 + +1. [强化学习与Q-Learning介绍](../1-QLearning/README.md) +2. [使用Gym模拟环境](../2-Gym/README.md) + +## Credits + +"强化学习介绍"由[Dmitry Soshnikov](http://soshnikov.com)撰写 ♥️ From 034b28edb4c39e4d56ba5a8377988f2c448c227d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jul 2021 11:24:28 +0800 Subject: [PATCH 43/91] Translated 1-intro-to-ML assignment.md into Simplified Chinese --- .../1-intro-to-ML/translations/assignment.zh-cn.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 1-Introduction/1-intro-to-ML/translations/assignment.zh-cn.md diff --git a/1-Introduction/1-intro-to-ML/translations/assignment.zh-cn.md b/1-Introduction/1-intro-to-ML/translations/assignment.zh-cn.md new file mode 100644 index 00000000..fd59f691 --- /dev/null +++ b/1-Introduction/1-intro-to-ML/translations/assignment.zh-cn.md @@ -0,0 +1,9 @@ +# 启动和运行 + +## 说明 + +在这个不评分的作业中,你应该温习一下 Python,将 Python 环境能够运行起来,并且可以运行 notebooks。 + +学习这个 [Python 学习路径](https://docs.microsoft.com/learn/paths/python-language/?WT.mc_id=academic-15963-cxa),然后通过这些介绍性的视频将你的系统环境设置好: + +https://www.youtube.com/playlist?list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6 From 89ea1f05fa130042de972a6d4cfac97a7fca12b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jul 2021 14:05:43 +0800 Subject: [PATCH 44/91] Translated 2-history-of-ML assignment.md into Simplified Chinese --- .../2-history-of-ML/translations/assignment.zh-cn.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 1-Introduction/2-history-of-ML/translations/assignment.zh-cn.md diff --git a/1-Introduction/2-history-of-ML/translations/assignment.zh-cn.md b/1-Introduction/2-history-of-ML/translations/assignment.zh-cn.md new file mode 100644 index 00000000..adf3ee15 --- /dev/null +++ b/1-Introduction/2-history-of-ML/translations/assignment.zh-cn.md @@ -0,0 +1,11 @@ +# 建立一个时间轴 + +## 说明 + +使用这个 [仓库](https://github.com/Digital-Humanities-Toolkit/timeline-builder),创建一个关于算法、数学、统计学、人工智能、机器学习的某个方面或者可以综合多个以上学科来讲。你可以着重介绍某个人,某个想法,或者一个经久不衰的思想。请确保添加了多媒体元素在你的时间线中。 + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| ------------ | ---------------------------------- | ---------------------- | ------------------------------------------ | +| | 有一个用 GitHub page 展示的 timeline | 代码还不完整并且没有部署 | 时间线不完整,没有经过充分的研究,并且没有部署 | From 8f99e59b7722930941719b50905f854483b87fe7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jul 2021 15:16:20 +0800 Subject: [PATCH 45/91] Translated 3-fairness assignment.md into Simplified Chinese --- .../3-fairness/translations/assignment.zh-cn.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 1-Introduction/3-fairness/translations/assignment.zh-cn.md diff --git a/1-Introduction/3-fairness/translations/assignment.zh-cn.md b/1-Introduction/3-fairness/translations/assignment.zh-cn.md new file mode 100644 index 00000000..a8124199 --- /dev/null +++ b/1-Introduction/3-fairness/translations/assignment.zh-cn.md @@ -0,0 +1,11 @@ +# 探索 Fairlearn + +## 说明 + +在这节课中,你了解了 Fairlearn,一个“开源的,社区驱动的项目,旨在帮助数据科学家们提高人工智能系统的公平性”。在这项作业中,探索 Fairlearn [笔记本](https://fairlearn.org/v0.6.2/auto_examples/index.html)中的一个例子,之后你可以用论文或者 ppt 的形式叙述你学习后的发现。 + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| -------- | --------- | -------- | ----------------- | +| | 提交了一篇论文或者ppt 关于讨论 Fairlearn 系统、挑选运行的例子、和运行这个例子后所得出来的心得结论 | 提交了一篇没有结论的论文 | 没有提交论文 | From 01c53fb14613d1fcb248e0bd4500a4674ea95fea Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Jul 2021 17:28:11 +0800 Subject: [PATCH 46/91] Translated 4-techniques-of-ML assignment.md into Simplified Chinese --- .../translations/assignment.zh-cn.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 1-Introduction/4-techniques-of-ML/translations/assignment.zh-cn.md diff --git a/1-Introduction/4-techniques-of-ML/translations/assignment.zh-cn.md b/1-Introduction/4-techniques-of-ML/translations/assignment.zh-cn.md new file mode 100644 index 00000000..ba28b554 --- /dev/null +++ b/1-Introduction/4-techniques-of-ML/translations/assignment.zh-cn.md @@ -0,0 +1,11 @@ +# 采访一位数据科学家 + +## 说明 + +在你的公司、你所在的社群、或者在你的朋友和同学中,找到一位从事数据科学专业工作的人,与他或她交流一下。写一篇关于他们工作日常的小短文(500字左右)。他们是专家,还是说他们是“全栈”开发者? + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| -------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------ | --------------------- | +| | 提交一篇清晰描述了职业属性且字数符合规范的word文档 | 提交的文档职业属性描述得不清晰或者字数不合规范 | 啥都没有交 | From 39bf19bd05443b2b56111eb20de6ef02937d114d Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Fri, 16 Jul 2021 11:39:42 +0200 Subject: [PATCH 47/91] Modifying Quiz translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pre-lecture: Quiz préalable post-lecture: Quiz de validation des connaissances --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 5fae99cd..1e27ca32 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quiz de préconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) ### Introduction @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quiz de postconférence](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) ## Révision et auto-apprentissage From d5ef7e07218b043b967282b0656767f61684b771 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Fri, 16 Jul 2021 11:48:42 +0200 Subject: [PATCH 48/91] Create assignment.fr.md --- .../1-intro-to-ML/translations/assignment.fr.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 1-Introduction/1-intro-to-ML/translations/assignment.fr.md diff --git a/1-Introduction/1-intro-to-ML/translations/assignment.fr.md b/1-Introduction/1-intro-to-ML/translations/assignment.fr.md new file mode 100644 index 00000000..0d703d26 --- /dev/null +++ b/1-Introduction/1-intro-to-ML/translations/assignment.fr.md @@ -0,0 +1,10 @@ +# Être opérationnel + + +## Instructions + +Dans ce devoir non noté, vous devez vous familiariser avec Python et rendre votre environnement opérationnel et capable d'exécuter des notebook. + +Suivez ce [parcours d'apprentissage Python](https://docs.microsoft.com/learn/paths/python-language/?WT.mc_id=academic-15963-cxa), puis configurez votre système en parcourant ces vidéos introductives : + +https://www.youtube.com/playlist?list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6 From 2a0c80f8c0d687016e8a737a537ae935e36723b4 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Fri, 16 Jul 2021 11:49:44 +0200 Subject: [PATCH 49/91] Changed url to assignment translation --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 1e27ca32..a178790c 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -106,4 +106,4 @@ Pour en savoir plus sur la façon dont vous pouvez utiliser les algorithmes de M ## Devoir -[Être opérationnel](../assignment.md) +[Être opérationnel](assignment.fr.md) From c3074d622c0fe323c9f3d94a58c345f684431246 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Fri, 16 Jul 2021 14:39:00 +0200 Subject: [PATCH 50/91] Update README.fr.md --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index a178790c..e762c7f6 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -8,7 +8,7 @@ ### Introduction -Bienvenue à ce cours sur le machine learning classique pour débutant ! Que vous soyez complètement nouveau sur ce sujet ou que vous soyez un professonnel du ML expérimenté cherchant à peaufiner vos connaissances, nous sommes heureux de vous avoir avec nous ! Nous voulons créer un tremplin chaleureux pour vos études en ML et serions ravis d'évaluer, de répondre et d'apprendre de vos retours d'[expériences](https://github.com/microsoft/ML-For-Beginners/discussions). +Bienvenue à ce cours sur le machine learning classique pour débutant ! Que vous soyez complètement nouveau sur ce sujet ou que vous soyez un professionnel du ML expérimenté cherchant à peaufiner vos connaissances, nous sommes heureux de vous avoir avec nous ! Nous voulons créer un tremplin chaleureux pour vos études en ML et serions ravis d'évaluer, de répondre et d'apprendre de vos retours d'[expériences](https://github.com/microsoft/ML-For-Beginners/discussions). [![Introduction au ML](https://img.youtube.com/vi/h0e2HAPTGF4/0.jpg)](https://youtu.be/h0e2HAPTGF4 "Introduction to ML") @@ -45,7 +45,7 @@ Bien que le terme peut être confu, machine learning (ML) est un important sous- ## Ce que vous allez apprendre dans ce cours -Dans ce cours, nous allons nous concentrer sur les concepts clés du machine learning qu'un débutant se doit de connaître. Nous parlerons ce que l'on appelle le 'machine learning classique' en utilisant principalement Scikit-learn, une excellente librairie que beaucoup d'étudiants utilisent afin d'apprendre les bases. Afin de comprendre les concepts plus larges de l'intelligence artificielle ou du deep learning, une profonde connaissance en machine learning est indispensable, et c'est ce que nous aimerions fournir ici. +Dans ce cours, nous allons nous concentrer sur les concepts clés du machine learning qu'un débutant se doit de connaître. Nous parlerons de ce que l'on appelle le 'machine learning classique' en utilisant principalement Scikit-learn, une excellente librairie que beaucoup d'étudiants utilisent afin d'apprendre les bases. Afin de comprendre les concepts plus larges de l'intelligence artificielle ou du deep learning, une profonde connaissance en machine learning est indispensable, et c'est ce que nous aimerions fournir ici. Dans ce cours, vous allez apprendre : From 0ea938006f66fa8a4453342f765f41b82f923a8b Mon Sep 17 00:00:00 2001 From: manusquall Date: Fri, 16 Jul 2021 12:55:26 +0000 Subject: [PATCH 51/91] add vscode option folder to gitignore, add fr option to quiz-app vue --- .gitignore | 2 + quiz-app/package-lock.json | 170 +- quiz-app/src/App.vue | 1 + quiz-app/src/assets/translations/fr.json | 2811 +++++++++++++++++++++ quiz-app/src/assets/translations/index.js | 2 + 5 files changed, 2895 insertions(+), 91 deletions(-) create mode 100644 quiz-app/src/assets/translations/fr.json diff --git a/.gitignore b/.gitignore index a80a15e3..51f47a5a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,8 @@ bld/ # Visual Studio 2015/2017 cache/options directory .vs/ +# Visual Studio Code cache/options directory +.vscode/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ diff --git a/quiz-app/package-lock.json b/quiz-app/package-lock.json index e9aebee3..8f51a0ba 100644 --- a/quiz-app/package-lock.json +++ b/quiz-app/package-lock.json @@ -1087,16 +1087,6 @@ "postcss": "^7.0.0" } }, - "@kazupon/vue-i18n-loader": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@kazupon/vue-i18n-loader/-/vue-i18n-loader-0.5.0.tgz", - "integrity": "sha512-Tp2mXKemf9/RBhI9CW14JjR9oKjL2KH7tV6S0eKEjIBuQBAOFNuPJu3ouacmz9hgoXbNp+nusw3MVQmxZWFR9g==", - "dev": true, - "requires": { - "js-yaml": "^3.13.1", - "json5": "^2.1.1" - } - }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -1720,6 +1710,16 @@ "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "cacache": { "version": "13.0.1", "resolved": "https://registry.npmjs.org/cacache/-/cacache-13.0.1.tgz", @@ -1746,6 +1746,53 @@ "unique-filename": "^1.1.1" } }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1762,6 +1809,16 @@ "minipass": "^3.1.1" } }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "terser-webpack-plugin": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.8.tgz", @@ -1778,6 +1835,18 @@ "terser": "^4.6.12", "webpack-sources": "^1.4.3" } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.3.0", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.3.0.tgz", + "integrity": "sha512-UDgni/tUVSdwHuQo+vuBmEgamWx88SuSlEb5fgdvHrlJSPB9qMBRF6W7bfPWSqDns425Gt1wxAUif+f+h/rWjg==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } } } }, @@ -10953,87 +11022,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.1.2", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.1.2.tgz", - "integrity": "sha512-8QTxh+Fd+HB6fiL52iEVLKqE9N1JSlMXLR92Ijm6g8PZrwIxckgpqjPDWRP5TWxdiPaHR+alUWsnu1ShQOwt+Q==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-router": { "version": "3.4.9", "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.9.tgz", diff --git a/quiz-app/src/App.vue b/quiz-app/src/App.vue index 78482d49..6baabd0c 100644 --- a/quiz-app/src/App.vue +++ b/quiz-app/src/App.vue @@ -6,6 +6,7 @@
diff --git a/quiz-app/src/assets/translations/fr.json b/quiz-app/src/assets/translations/fr.json new file mode 100644 index 00000000..ec8111c0 --- /dev/null +++ b/quiz-app/src/assets/translations/fr.json @@ -0,0 +1,2811 @@ +[ + { + "title": "Machine Learning pour les débutants: quiz", + "complete": "Félicitations, vous avez terminé le quiz!", + "error": "Désolé, essayez à nouveau", + "quizzes": [ + { + "id": 1, + "title": "Introduction au machine learning: quiz préalable", + "quiz": [ + { + "questionText": "Les applications de machine learning sont toutes autour de nous", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle est la différence technique entre le ml classique et le deep learning?", + "answerOptions": [ + { + "answerText": "ML classique a été inventé en premier", + "isCorrect": "false" + }, + { + "answerText": "L'utilisation de réseaux de neurones", + "isCorrect": "true" + }, + { + "answerText": "Le deep learning est utilisé dans les robots", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Pourquoi une entreprise pourrait-elle vouloir utiliser des stratégies ML?", + "answerOptions": [ + { + "answerText": "Pour automatiser la résolution de problèmes multidimensionnels", + "isCorrect": "false" + }, + { + "answerText": "Pour personnaliser une expérience de magasinage basée sur le type de client", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 2, + "title": "Introduction au machine learning: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Les algorithmes de machine learning sont destinés à simuler", + "answerOptions": [ + { + "answerText": "Des machines intelligentes", + "isCorrect": "false" + }, + { + "answerText": "Le cerveau humain", + "isCorrect": "true" + }, + { + "answerText": "Des orangutans", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Qu'est-ce qu'un exemple de technique classique de ML?", + "answerOptions": [ + { + "answerText": "Le traitement des langues naturelles", + "isCorrect": "true" + }, + { + "answerText": "Le deep learning", + "isCorrect": "false" + }, + { + "answerText": "Des neural networks", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Pourquoi tout le monde devrait-il apprendre les bases du ML?", + "answerOptions": [ + { + "answerText": "L'apprentissage ml est amusant et accessible à tout le monde", + "isCorrect": "false" + }, + { + "answerText": "Les stratégies ML sont utilisées dans de nombreuses industries et domaines", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 3, + "title": "Historique du machine learning: quiz préalable", + "quiz": [ + { + "questionText": "Quand approximativement le terme 'intelligence artificielle' a-t-il été inventé ?", + "answerOptions": [ + { + "answerText": "1980s", + "isCorrect": "false" + }, + { + "answerText": "années 1950", + "isCorrect": "true" + }, + { + "answerText": "années 1930", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Qui était l'un des premiers pionniers du machine learning?", + "answerOptions": [ + { + "answerText": "Alan Turing", + "isCorrect": "true" + }, + { + "answerText": "Bill Gates", + "isCorrect": "false" + }, + { + "answerText": "Shakey the Robot", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle est l'une des raisons pour lesquelles l'avancement de l'AI a ralenti dans les années 1970?", + "answerOptions": [ + { + "answerText": "Puissance de calcul limitée", + "isCorrect": "true" + }, + { + "answerText": "Pas assez d'ingénieurs qualifiés", + "isCorrect": "false" + }, + { + "answerText": "Conflits entre pays", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 4, + "title": "Historique du machine learning: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Qu'est-ce qu'un exemple de système d'IA \" Scruffy \" AI?", + "answerOptions": [ + { + "answerText": "ELIZA", + "isCorrect": "true" + }, + { + "answerText": "HACKML", + "isCorrect": "false" + }, + { + "answerText": "SSYSTEM", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quel est l'exemple d'une technologie qui a été développée pendant les « années d'or » ?", + "answerOptions": [ + { + "answerText": "Blocks World", + "isCorrect": "true" + }, + { + "answerText": "Jibo", + "isCorrect": "false" + }, + { + "answerText": "Robot Dogs", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quel événement était fondé sur la création et l'expansion du domaine de l'intelligence artificielle?", + "answerOptions": [ + { + "answerText": "Turing Test", + "isCorrect": "false" + }, + { + "answerText": "Projet de recherche d'été de Dartmouth", + "isCorrect": "true" + }, + { + "answerText": "AI Winter", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 5, + "title": "L'équité et machine learning: quiz préalable", + "quiz": [ + { + "questionText": "L'injustice dans le machine learning peut arriver", + "answerOptions": [ + { + "answerText": "intentionnellement", + "isCorrect": "false" + }, + { + "answerText": "Indormalement", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Le terme \" injustice \" en ml connotes:", + "answerOptions": [ + { + "answerText": "nuit à un groupe de personnes", + "isCorrect": "true" + }, + { + "answerText": "Dommage à une personne", + "isCorrect": "false" + }, + { + "answerText": "nuit à la majorité des gens", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Les cinq principaux types de préjudices incluent", + "answerOptions": [ + { + "answerText": "Allocation, qualité de service, stéréotypage, dénigration et sous-représentation", + "isCorrect": "true" + }, + { + "answerText": "Elocation, qualité de service, stéréotypage, dénigration et sous-représentation", + "isCorrect": "false" + }, + { + "answerText": "Allocation, qualité de service, stéréophonie, dénigration et sous-représentation", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 6, + "title": "Equité et machine learning: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "L'injustice dans un modèle peut être causée par", + "answerOptions": [ + { + "answerText": "dépassement de données historiques", + "isCorrect": "true" + }, + { + "answerText": "Sous-solliance sur les données historiques", + "isCorrect": "false" + }, + { + "answerText": "Trop d'alignement sur les données historiques", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Pour atténuer l'injustice, tu peux", + "answerOptions": [ + { + "answerText": "Identifier les préjudices et les groupes affectés", + "isCorrect": "false" + }, + { + "answerText": "Définir les métriques d'équité", + "isCorrect": "false" + }, + { + "answerText": "à la fois ce qui précède", + "isCorrect": "true" + } + ] + }, + { + "questionText": "FairLearn est un paquet qui peut", + "answerOptions": [ + { + "answerText": "Comparez plusieurs modèles en utilisant des métriques d'équité et de performance", + "isCorrect": "true" + }, + { + "answerText": "Choisissez le meilleur modèle pour vos besoins", + "isCorrect": "false" + }, + { + "answerText": "Aidez-vous à décider de ce qui est juste et ce qui n'est pas", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 7, + "title": "Outils et techniques: quiz préalable", + "quiz": [ + { + "questionText": "Lors de la construction d'un modèle, vous devriez:", + "answerOptions": [ + { + "answerText": "Préparez vos données, puis formez votre modèle", + "isCorrect": "true" + }, + { + "answerText": "Choisissez une méthode de formation, puis préparez vos données", + "isCorrect": "false" + }, + { + "answerText": "Tune Paramètres, puis formez votre modèle", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Vos données ___ vont avoir une incidence sur la qualité de votre modèle ML", + "answerOptions": [ + { + "answerText": "Quantité", + "isCorrect": "false" + }, + { + "answerText": "Forme", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Une variable de fonctionnalité est la suivante:", + "answerOptions": [ + { + "answerText": "une qualité de vos données", + "isCorrect": "false" + }, + { + "answerText": "Une propriété mesurable de vos données", + "isCorrect": "true" + }, + { + "answerText": "Une ligne de vos données", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 8, + "title": "Outils et techniques: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Vous devez visualiser vos données car", + "answerOptions": [ + { + "answerText": "Vous pouvez découvrir des valeurs aberrantes", + "isCorrect": "false" + }, + { + "answerText": "Vous pouvez découvrir une cause potentielle de biais", + "isCorrect": "true" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Sélectionnez vos données en:", + "answerOptions": [ + { + "answerText": "Entraînement et ensembles de Turing", + "isCorrect": "false" + }, + { + "answerText": "Entraînement et ensembles de test", + "isCorrect": "true" + }, + { + "answerText": "Ensembles de validation et d'évaluation", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Une commande commune de démarrer le processus de formation dans diverses bibliothèques ML est la suivante:", + "answerOptions": [ + { + "answerText": "Model.travel", + "isCorrect": "false" + }, + { + "answerText": "Model.train", + "isCorrect": "false" + }, + { + "answerText": "Model.fit", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 9, + "title": "Introduction à la régression: quiz préalable", + "quiz": [ + { + "questionText": "Laquelle de ces variables est une variable numérique?", + "answerOptions": [ + { + "answerText": "Hauteur", + "isCorrect": "true" + }, + { + "answerText": "Genre", + "isCorrect": "false" + }, + { + "answerText": "Couleur des cheveux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Laquelle de ces variables est une variable catégorique?", + "answerOptions": [ + { + "answerText": "rythme cardiaque", + "isCorrect": "false" + }, + { + "answerText": "Type de sang", + "isCorrect": "true" + }, + { + "answerText": "Poids", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Lequel de ces problèmes est un problème basé sur l'analyse de régression?", + "answerOptions": [ + { + "answerText": "Prédire les marques d'examen final d'un étudiant", + "isCorrect": "true" + }, + { + "answerText": "Prédire le type de sang d'une personne", + "isCorrect": "false" + }, + { + "answerText": "Prédire si un email est spam ou non", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 10, + "title": "Introduction à la régression: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Si la précision de la formation du modèle d'apprentissage de votre machine est de 95% et que la précision des tests est de 30%, quel type de condition est appelé?", + "answerOptions": [ + { + "answerText": "Surface", + "isCorrect": "true" + }, + { + "answerText": "sous-facture", + "isCorrect": "false" + }, + { + "answerText": "Double ajustement", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Le processus d'identification des fonctionnalités significatives d'un ensemble de fonctionnalités est appelé:", + "answerOptions": [ + { + "answerText": "Extraction de fonctionnalités", + "isCorrect": "false" + }, + { + "answerText": "Réduction de la dimensionnalité de fonctionnalité", + "isCorrect": "false" + }, + { + "answerText": "Sélection de fonctionnalités", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Le processus de division d'un jeu de données dans un certain rapport d'entraînement et de test de jeu de données à l'aide de la méthode / la fonction Train_Test_split () '' Train_Test_Split () 'est appelée:", + "answerOptions": [ + { + "answerText": "Validation croisée", + "isCorrect": "false" + }, + { + "answerText": "validation de maintien", + "isCorrect": "true" + }, + { + "answerText": "laissez une validation d'une sortie", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 11, + "title": "Préparer et visualiser des données pour la régression: quiz préalable", + "quiz": [ + { + "questionText": "Lequel de ces modules Python est utilisé pour tracer la visualisation des données?", + "answerOptions": [ + { + "answerText": "Numpy", + "isCorrect": "false" + }, + { + "answerText": "Scikit-apprendre", + "isCorrect": "false" + }, + { + "answerText": "Matplotlib", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Si vous souhaitez comprendre la propagation ou les autres caractéristiques des points de données de votre ensemble de données, puis effectuez:", + "answerOptions": [ + { + "answerText": "Visualisation des données", + "isCorrect": "true" + }, + { + "answerText": "Pré-traitement des données", + "isCorrect": "false" + }, + { + "answerText": "Split test de train", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Lequel d'entre eux fait partie de l'étape de visualisation des données dans un projet de machine learning?", + "answerOptions": [ + { + "answerText": "Intégrant un algorithme d'apprentissage de certains machines", + "isCorrect": "false" + }, + { + "answerText": "Créer une représentation picturale des données à l'aide de différentes méthodes de tracé", + "isCorrect": "true" + }, + { + "answerText": "Normaliser les valeurs d'un jeu de données", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 12, + "title": "Préparez et visualisez des données pour la régression: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Lequel de ces extraits de code est correct d'après cette leçon, si vous souhaitez vérifier la présence de valeurs manquantes dans votre ensemble de données ? Supposons que l'ensemble de données soit stocké dans une variable nommée \"ensemble de données\", qui est un objet Pandas DataFrame.", + "answerOptions": [ + { + "answerText": "DataSet.isnull (). Somme ()", + "isCorrect": "true" + }, + { + "answerText": "FindMissing (DataSet)", + "isCorrect": "false" + }, + { + "answerText": "Somme (NULL (DataSet))", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Laquelle de ces méthodes de traçage est utile lorsque vous souhaitez comprendre la propagation de différents groupes de fichiers de données de votre jeu de données?", + "answerOptions": [ + { + "answerText": "Terrain de dispersion", + "isCorrect": "false" + }, + { + "answerText": "Terrain de ligne", + "isCorrect": "false" + }, + { + "answerText": "barre de bar", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Que peut ne pas vous dire la visualisation des données?", + "answerOptions": [ + { + "answerText": "Relations entre DataPoints", + "isCorrect": "false" + }, + { + "answerText": "La source de l'endroit où le jeu de données est collecté", + "isCorrect": "true" + }, + { + "answerText": "Trouver la présence de valeurs aberrantes dans l'ensemble de données", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 13, + "title": "régression linéaire et polynomiale: quiz préalable", + "quiz": [ + { + "questionText": "Matplotlib est un", + "answerOptions": [ + { + "answerText": "Bibliothèque de dessin", + "isCorrect": "false" + }, + { + "answerText": "Bibliothèque de visualisation de données", + "isCorrect": "true" + }, + { + "answerText": "Library Lanchage", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La régression linéaire utilise ce qui suit pour tracer des relations entre variables", + "answerOptions": [ + { + "answerText": "Une ligne droite", + "isCorrect": "true" + }, + { + "answerText": "Un cercle", + "isCorrect": "false" + }, + { + "answerText": "une courbe", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Un bon modèle de régression linéaire a un coefficient de corrélation ___", + "answerOptions": [ + { + "answerText": "Low", + "isCorrect": "false" + }, + { + "answerText": "High", + "isCorrect": "true" + }, + { + "answerText": "flat", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 14, + "title": "Régression linéaire et polynomiale: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Si vos données sont non linéaires, essayez un type ___ de régression", + "answerOptions": [ + { + "answerText": "linéaire", + "isCorrect": "false" + }, + { + "answerText": "sphérique", + "isCorrect": "false" + }, + { + "answerText": "polynôme", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Ce sont tous types de méthodes de régression", + "answerOptions": [ + { + "answerText": "Falsestetep, crête, lasso et élastique", + "isCorrect": "false" + }, + { + "answerText": "Stealwise, Ridge, Lasso et Elasticnet", + "isCorrect": "true" + }, + { + "answerText": "Stealwise, Ridge, Lariat et Elasticnet", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La régression des moindres carrés signifie que toutes les données de données entourant la ligne de régression sont:", + "answerOptions": [ + { + "answerText": "carré puis soustrait", + "isCorrect": "false" + }, + { + "answerText": "multiplié", + "isCorrect": "false" + }, + { + "answerText": "carré puis ajouté", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 15, + "title": "Régression logistique: quiz préalable", + "quiz": [ + { + "questionText": "Utilisez la régression logistique à prédire", + "answerOptions": [ + { + "answerText": "Si une pomme est mûre ou non", + "isCorrect": "true" + }, + { + "answerText": "Combien de billets peuvent être vendus dans un mois", + "isCorrect": "false" + }, + { + "answerText": "De quelle couleur le ciel tournera demain à 18 heures", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Types de régression logistique incluent", + "answerOptions": [ + { + "answerText": "multinomial et cardinal", + "isCorrect": "false" + }, + { + "answerText": "multinomial et ordinal", + "isCorrect": "true" + }, + { + "answerText": "Principal et ordinal", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Vos données ont des corrélations faibles. Le meilleur type de régression à utiliser est:", + "answerOptions": [ + { + "answerText": "Logistique", + "isCorrect": "true" + }, + { + "answerText": "linéaire", + "isCorrect": "false" + }, + { + "answerText": "cardinal", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 16, + "title": "Régression logistique: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Sea-né est un type de", + "answerOptions": [ + { + "answerText": "Bibliothèque de visualisation de données", + "isCorrect": "true" + }, + { + "answerText": "Bibliothèque de mappage", + "isCorrect": "false" + }, + { + "answerText": "Bibliothèque mathématique", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Une matrice de confusion est également connue sous le nom de:", + "answerOptions": [ + { + "answerText": "matrice d'erreur", + "isCorrect": "true" + }, + { + "answerText": "Matrix de vérité", + "isCorrect": "false" + }, + { + "answerText": "matrice de précision", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Un bon modèle aura:", + "answerOptions": [ + { + "answerText": "Un grand nombre de faux positifs et de vrais négatifs dans sa matrice de confusion", + "isCorrect": "false" + }, + { + "answerText": "Un grand nombre de vrais positifs et vrais négatifs dans sa matrice de confusion", + "isCorrect": "true" + }, + { + "answerText": "Un grand nombre de vrais positifs et de faux négatifs dans sa matrice de confusion", + "isCorrect": "false" + } + ] + } + ] + }, { + "id": 17, + "title": "Construire une application Web: quiz préalable", + "quiz": [ + { + "questionText": "Qu'est-ce que OnNX signifie?", + "answerOptions": [ + { + "answerText": "Exchange de réseau de neurones", + "isCorrect": "false" + }, + { + "answerText": "Exchange de réseau de neurones ouverts", + "isCorrect": "true" + }, + { + "answerText": "Exchange de réseau neural de sortie", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Comment le ballon est-il défini par ses créateurs?", + "answerOptions": [ + { + "answerText": "mini-cadre", + "isCorrect": "false" + }, + { + "answerText": "Grand-cadre", + "isCorrect": "false" + }, + { + "answerText": "micro-cadre", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Que fait le module de cornichon de Python", + "answerOptions": [ + { + "answerText": "Serialise un objet Python", + "isCorrect": "false" + }, + { + "answerText": "désagréalise un objet Python", + "isCorrect": "false" + }, + { + "answerText": "Serialise et désémarifier un objet Python", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 18, + "title": "Construire une application Web: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Quels sont les outils que nous pouvons utiliser pour héberger un modèle pré-formé sur le Web à l'aide de Python?", + "answerOptions": [ + { + "answerText": "Flacon", + "isCorrect": "true" + }, + { + "answerText": "Tensorflow.js", + "isCorrect": "false" + }, + { + "answerText": "ONNX.JS", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Qu'est-ce que SaaS signifie?", + "answerOptions": [ + { + "answerText": "Système en tant que service", + "isCorrect": "false" + }, + { + "answerText": "Logiciel en tant que service", + "isCorrect": "true" + }, + { + "answerText": "Sécurité en tant que service", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Qu'est-ce que la bibliothèque de labelencoder de Scikit-apprendre?", + "answerOptions": [ + { + "answerText": "Encode les données par ordre alphabétique", + "isCorrect": "true" + }, + { + "answerText": "Encode les données numériquement", + "isCorrect": "false" + }, + { + "answerText": "Code des données en série", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 19, + "title": "Classification 1: quiz préalable", + "quiz": [ + { + "questionText": "La classification est une forme d'apprentissage supervisé qui a beaucoup en commun avec", + "answerOptions": [ + { + "answerText": "Série temporelle", + "isCorrect": "false" + }, + { + "answerText": "Techniques de régression", + "isCorrect": "true" + }, + { + "answerText": "NLP", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle question peut aider la classification à répondre?", + "answerOptions": [ + { + "answerText": "Est-ce que ce courrier électronique ou pas?", + "isCorrect": "true" + }, + { + "answerText": "Les cochons peuvent voler?", + "isCorrect": "false" + }, + { + "answerText": "Quel est le sens de la vie?", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle est la première étape pour utiliser des techniques de classification?", + "answerOptions": [ + { + "answerText": "Création de cours d'un jeu de données", + "isCorrect": "false" + }, + { + "answerText": "Nettoyer et équilibrer vos données", + "isCorrect": "true" + }, + { + "answerText": "Affectation d'un point de données à un groupe ou à un résultat", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 20, + "title": "Classification 1: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Qu'est-ce qu'une question multiclasse?", + "answerOptions": [ + { + "answerText": "La tâche de classer les points de données dans plusieurs classes", + "isCorrect": "true" + }, + { + "answerText": "La tâche de classifier les points de données dans l'une des plusieurs classes", + "isCorrect": "true" + }, + { + "answerText": "La tâche de nettoyer les points de données de plusieurs manières", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Il est important de nettoyer des données récurrentes ou inutiles pour aider vos classificateurs à résoudre votre problème.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle est la meilleure raison d'équilibrer vos données?", + "answerOptions": [ + { + "answerText": "Les données déséquilibrées ont l'air mauvais dans les visualisations", + "isCorrect": "false" + }, + { + "answerText": "L'équilibrage de vos données donne des résultats meilleurs, car un modèle ML n'enfraigne pas vers une classe", + "isCorrect": "true" + }, + { + "answerText": "L'équilibrage de vos données vous donne plus de points de données", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 21, + "title": "Classification 2: quiz préalable", + "quiz": [ + { + "questionText": "Les données équilibrées et propres ont produit les meilleurs résultats de la classification", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Comment choisissez-vous le bon classificateur?", + "answerOptions": [ + { + "answerText": "Comprend quel classificateurs fonctionnent le mieux pour quels scénarios", + "isCorrect": "false" + }, + { + "answerText": "Devineuse éduquée et chèque", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "La classification est un type de", + "answerOptions": [ + { + "answerText": "NLP", + "isCorrect": "false" + }, + { + "answerText": "Apprentissage supervisé", + "isCorrect": "true" + }, + { + "answerText": "Langage de programmation", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 22, + "title": "Classification 2: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Qu'est-ce qu'un \"solveur\" ?", + "answerOptions": [ + { + "answerText": "La personne qui vérifie votre travail", + "isCorrect": "false" + }, + { + "answerText": "L'algorithme à utiliser dans le problème d'optimisation", + "isCorrect": "true" + }, + { + "answerText": "Une technique de machine learning", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quel classificateur avons-nous utilisé dans cette leçon?", + "answerOptions": [ + { + "answerText": "régression logistique", + "isCorrect": "true" + }, + { + "answerText": "Arbres de décision", + "isCorrect": "false" + }, + { + "answerText": "MultiClass one-vs-tout", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Comment savez-vous si l'algorithme de classification fonctionne comme prévu?", + "answerOptions": [ + { + "answerText": "En vérifiant la précision de ses prévisions", + "isCorrect": "true" + }, + { + "answerText": "En le contrôlant contre d'autres algorithmes", + "isCorrect": "false" + }, + { + "answerText": "En regardant des données historiques pour la qualité de cet algorithme de résoudre des problèmes similaires", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 23, + "title": "Classification 3: quiz préalable", + "quiz": [ + { + "questionText": "Un bon classificateur initial à essayer est:", + "answerOptions": [ + { + "answerText": "SVC linéaire", + "isCorrect": "true" + }, + { + "answerText": "k-signifie", + "isCorrect": "false" + }, + { + "answerText": "SVC logique", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Contrôles de régularisation:", + "answerOptions": [ + { + "answerText": "L'influence des paramètres", + "isCorrect": "true" + }, + { + "answerText": "L'influence de la vitesse de formation", + "isCorrect": "false" + }, + { + "answerText": "L'influence des valeurs aberrantes", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Le classificateur K-voisins peut être utilisé pour:", + "answerOptions": [ + { + "answerText": "Apprentissage supervisé", + "isCorrect": "false" + }, + { + "answerText": "L'apprentissage non supervisé", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 24, + "title": "Classification 3: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Les classificateurs de support-vectoriel peuvent être utilisés pour", + "answerOptions": [ + { + "answerText": "Classification", + "isCorrect": "false" + }, + { + "answerText": "régression", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Forêt aléatoire est un type de classificateur ___", + "answerOptions": [ + { + "answerText": "Ensemble", + "isCorrect": "true" + }, + { + "answerText": "Dissembliste", + "isCorrect": "false" + }, + { + "answerText": "Assemblez", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Adaboost est connu pour:", + "answerOptions": [ + { + "answerText": "Se concentrer sur les poids des éléments incorrectement classifiés", + "isCorrect": "true" + }, + { + "answerText": "Se concentrer sur des valeurs aberrantes", + "isCorrect": "false" + }, + { + "answerText": "Se concentrer sur des données incorrectes", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 25, + "title": "Classification 4: quiz préalable", + "quiz": [ + { + "questionText": "Les systèmes de recommandation peuvent être utilisés pour", + "answerOptions": [ + { + "answerText": "Recommander un bon restaurant", + "isCorrect": "false" + }, + { + "answerText": "recommander des modes à essayer", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + }, + { + "questionText": "L'intégration d'un modèle dans une application Web l'aide à être hors ligne", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "OnNX Runtime peut être utilisé pour", + "answerOptions": [ + { + "answerText": "Exécution de modèles dans une application Web", + "isCorrect": "true" + }, + { + "answerText": "Modèles de formation", + "isCorrect": "false" + }, + { + "answerText": "Hyperparameter Tuning", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 26, + "title": "Classification 4: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "L'application Nettron vous aide:", + "answerOptions": [ + { + "answerText": "Visualiser les données", + "isCorrect": "false" + }, + { + "answerText": "Visualisez la structure de votre modèle", + "isCorrect": "true" + }, + { + "answerText": "Testez votre application Web", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Convertissez votre modèle SCIKIT-HALL pour une utilisation avec OnNX en utilisant:", + "answerOptions": [ + { + "answerText": "Sklearn-App", + "isCorrect": "false" + }, + { + "answerText": "Sklearn-web", + "isCorrect": "false" + }, + { + "answerText": "Sklearn-ONNX", + "isCorrect": "true" + } + ] + }, + { + "questionText": "L'utilisation de votre modèle dans une application Web s'appelle:", + "answerOptions": [ + { + "answerText": "Inférence", + "isCorrect": "true" + }, + { + "answerText": "Interférence", + "isCorrect": "false" + }, + { + "answerText": "Assurance", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 27, + "title": "Introduction au clustering: quiz préalable", + "quiz": [ + { + "questionText": "Un exemple de vie réel de regroupement serait", + "answerOptions": [ + { + "answerText": "Définir la table du dîner", + "isCorrect": "false" + }, + { + "answerText": "Tri du linge", + "isCorrect": "true" + }, + { + "answerText": "Shopping de l'épicerie", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Les techniques de clustering peuvent être utilisées dans ces industries", + "answerOptions": [ + { + "answerText": "Banking", + "isCorrect": "false" + }, + { + "answerText": "e-commerce", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La clustering est un type de:", + "answerOptions": [ + { + "answerText": "Apprentissage supervisé", + "isCorrect": "false" + }, + { + "answerText": "L'apprentissage non supervisé", + "isCorrect": "true" + }, + { + "answerText": "Apprentissage du renforcement", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 28, + "title": "Introduction au clustering: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "La géométrie euclidienne est arrangée", + "answerOptions": [ + { + "answerText": "Planes", + "isCorrect": "true" + }, + { + "answerText": "Courbes", + "isCorrect": "false" + }, + { + "answerText": "Sphères", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La densité de vos données de clustering est liée à sa", + "answerOptions": [ + { + "answerText": "bruit", + "isCorrect": "true" + }, + { + "answerText": "Profondeur", + "isCorrect": "false" + }, + { + "answerText": "Validité", + "isCorrect": "false" + } + ] + }, + { + "questionText": "L'algorithme de regroupement le plus connu est", + "answerOptions": [ + { + "answerText": "k-signifie", + "isCorrect": "true" + }, + { + "answerText": "K-Middle", + "isCorrect": "false" + }, + { + "answerText": "K-Mart", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 29, + "title": "K-Means Clustering: quiz préalable", + "quiz": [ + { + "questionText": "K-Means est dérivé de:", + "answerOptions": [ + { + "answerText": "Génie électrique", + "isCorrect": "false" + }, + { + "answerText": "Traitement du signal", + "isCorrect": "true" + }, + { + "answerText": "Linguistics informatiques", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Une bonne score de silhouette signifie:", + "answerOptions": [ + { + "answerText": "Les grappes sont bien séparées et bien définies", + "isCorrect": "true" + }, + { + "answerText": "Il y a peu de grappes", + "isCorrect": "false" + }, + { + "answerText": "Il y a beaucoup de clusters", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La variance est:", + "answerOptions": [ + { + "answerText": "La moyenne des différences carrées de la moyenne", + "isCorrect": "false" + }, + { + "answerText": "Un problème de regroupement s'il devient trop élevé", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 30, + "title": "K-olth regroupement: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Un diagramme de Voronoi montre:", + "answerOptions": [ + { + "answerText": "Variance d'une cluster", + "isCorrect": "false" + }, + { + "answerText": "La graine d'une grappe et sa région", + "isCorrect": "true" + }, + { + "answerText": "L'inertie d'une cluster", + "isCorrect": "false" + } + ] + }, + { + "questionText": "L'inertie est", + "answerOptions": [ + { + "answerText": "Une mesure de la manière dont les clusters cohérents internes sont", + "isCorrect": "true" + }, + { + "answerText": "Une mesure de la quantité de grappes déplacées", + "isCorrect": "false" + }, + { + "answerText": "Une mesure de la qualité des grappes", + "isCorrect": "false" + } + ] + }, + { + "questionText": "en utilisant k-moyen, vous devez d'abord déterminer la valeur de 'k'", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 31, + "title": "Intro to NLP: quiz préalable", + "quiz": [ + { + "questionText": "Que signifie NLP pour ces leçons?", + "answerOptions": [ + { + "answerText": "Traitement des langues neurales", + "isCorrect": "false" + }, + { + "answerText": "Traitement des langues naturelles", + "isCorrect": "true" + }, + { + "answerText": "Traitement linguistique naturel", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Eliza était un bot précoce qui a agi comme un ordinateur", + "answerOptions": [ + { + "answerText": "Thérapeute", + "isCorrect": "true" + }, + { + "answerText": "Docteur", + "isCorrect": "false" + }, + { + "answerText": "Infirmière", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Le test de Turing 'd'Alan Turing a essayé de déterminer si un ordinateur était", + "answerOptions": [ + { + "answerText": "Inmistingtilisable d'un humain", + "isCorrect": "false" + }, + { + "answerText": "Penser", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 32, + "title": "Intro to NLP: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Joseph Weizenbaum a inventé le bot", + "answerOptions": [ + { + "answerText": "Elisha", + "isCorrect": "false" + }, + { + "answerText": "Eliza", + "isCorrect": "true" + }, + { + "answerText": "Eloise", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Un bot conversationnel donne une sortie basée sur", + "answerOptions": [ + { + "answerText": "Choisir des choix prédéfinis au hasard", + "isCorrect": "false" + }, + { + "answerText": "Analyse de l'entrée et de l'utilisation de l'intelligence de la machine", + "isCorrect": "false" + }, + { + "answerText": "tous les deux", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Comment feriez-vous le bot plus efficace?", + "answerOptions": [ + { + "answerText": "En le demandant plus de questions.", + "isCorrect": "false" + }, + { + "answerText": "En l'alignant plus de données et de la formation en conséquence", + "isCorrect": "true" + }, + { + "answerText": "Le bot est stupide, il ne peut pas apprendre :(", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 33, + "title": "Tâches NLP: quiz préalable", + "quiz": [ + { + "questionText": "Tokenization", + "answerOptions": [ + { + "answerText": "Splituelle du texte au moyen de la ponctuation", + "isCorrect": "false" + }, + { + "answerText": "Splituelle du texte en jetons séparés (mots)", + "isCorrect": "true" + }, + { + "answerText": "Splituelle du texte en phrases", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Embeddings", + "answerOptions": [ + { + "answerText": "Convertit numériquement les données de texte afin que les mots puissent se classer", + "isCorrect": "true" + }, + { + "answerText": "Intégrance des mots en phrases", + "isCorrect": "false" + }, + { + "answerText": "Intégrance des phrases dans les paragraphes", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Marquage des parties de la parole", + "answerOptions": [ + { + "answerText": "Divise des phrases par leurs parties de la parole", + "isCorrect": "false" + }, + { + "answerText": "prend des mots togmentés et les étiquettes de leur part de la parole", + "isCorrect": "true" + }, + { + "answerText": "Phrases de diagrammes", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 34, + "title": "Tâches NLP: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Construisez un dictionnaire de la fréquence à laquelle les mots se reproduisent en utilisant:", + "answerOptions": [ + { + "answerText": "Dictionnaire de mots et d'expressions", + "isCorrect": "false" + }, + { + "answerText": "Fréquences de mots et de phrases", + "isCorrect": "true" + }, + { + "answerText": "Bibliothèque de mots et de phrases", + "isCorrect": "false" + } + ] + }, + { + "questionText": "N-grammes se réfèrent à", + "answerOptions": [ + { + "answerText": "Un texte peut être divisé en séquences de mots d'une longueur définie", + "isCorrect": "true" + }, + { + "answerText": "Un mot peut être divisé en séquences de caractères d'une longueur de jeu", + "isCorrect": "false" + }, + { + "answerText": "Un texte peut être divisé en paragraphes d'une longueur définie", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Analyse du sentiment", + "answerOptions": [ + { + "answerText": "analyse une phrase pour la positivité ou la négativité", + "isCorrect": "true" + }, + { + "answerText": "analyse une phrase pour sentimentalité", + "isCorrect": "false" + }, + { + "answerText": "analyse une phrase pour la tristesse", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 35, + "title": "NLP et traduction: quiz préalable", + "quiz": [ + { + "questionText": "Traduction naïf", + "answerOptions": [ + { + "answerText": "Traduit uniquement les mots", + "isCorrect": "true" + }, + { + "answerText": "Traduit la structure de la phrase", + "isCorrect": "false" + }, + { + "answerText": "Traduit le sentiment", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Un corpus * de textes fait référence à", + "answerOptions": [ + { + "answerText": "Un petit nombre de textes", + "isCorrect": "false" + }, + { + "answerText": "Un grand nombre de textes", + "isCorrect": "true" + }, + { + "answerText": "Un texte standard", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Si un modèle ML a suffisamment de traductions humaines pour construire un modèle sur, il peut", + "answerOptions": [ + { + "answerText": "Traductions abrégées", + "isCorrect": "false" + }, + { + "answerText": "Normaliser les traductions", + "isCorrect": "false" + }, + { + "answerText": "Améliorer la précision des traductions", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 36, + "title": "NLP et traduction: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "La bibliothèque de traduction de texte sous-jacente est:", + "answerOptions": [ + { + "answerText": "Google Translate", + "isCorrect": "true" + }, + { + "answerText": "Bing", + "isCorrect": "false" + }, + { + "answerText": "Un modèle ML personnalisé", + "isCorrect": "false" + } + ] + }, + { + "questionText": "utiliser `blob.translate` vous avez besoin:", + "answerOptions": [ + { + "answerText": "Une connexion Internet", + "isCorrect": "true" + }, + { + "answerText": "Un dictionnaire", + "isCorrect": "false" + }, + { + "answerText": "JavaScript", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Déterminer le sentiment, une approche ML serait de:", + "answerOptions": [ + { + "answerText": "Appliquez des techniques de régression pour générer manuellement des opinions et des scores et rechercher des modèles", + "isCorrect": "false" + }, + { + "answerText": "Appliquez des techniques de PNL pour générer manuellement des opinions et des scores et rechercher des modèles", + "isCorrect": "true" + }, + { + "answerText": "Appliquez des techniques de regroupement pour des opinions et des scores générés manuellement et rechercher des modèles", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 37, + "title": "NLP 4: quiz préalable", + "quiz": [ + { + "questionText": "Quelles informations pouvons-nous obtenir du texte écrit ou parlé par un humain?", + "answerOptions": [ + { + "answerText": "motifs et fréquences", + "isCorrect": "false" + }, + { + "answerText": "sentiment et signification", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Qu'est-ce que l'analyse du sentiment?", + "answerOptions": [ + { + "answerText": "Une étude sur la question de savoir si un héritage de famille a une valeur sentimentale", + "isCorrect": "false" + }, + { + "answerText": "Une méthode d'identification systématique, d'extraction, de quantification et d'étude des états affectifs et des informations subjectives", + "isCorrect": "true" + }, + { + "answerText": "La capacité de savoir si quelqu'un est triste ou heureux", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle question pourrait être répondue à l'aide d'un jeu de données de critiques hôteliers, de python et d'analyse de sentiment?", + "answerOptions": [ + { + "answerText": "Quels sont les mots et expressions les plus fréquemment utilisés dans les critiques?", + "isCorrect": "true" + }, + { + "answerText": "Quel hôtel a la meilleure piscine?", + "isCorrect": "false" + }, + { + "answerText": "Y a-t-il un service de voiturier dans cet hôtel?", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 38, + "title": "NLP 4: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Quelle est l'essence de la NLP?", + "answerOptions": [ + { + "answerText": "catégoriser la langue humaine en joyeux ou triste", + "isCorrect": "false" + }, + { + "answerText": "Interprétation de sens ou de sentiment sans avoir à avoir un homme humain le faire", + "isCorrect": "true" + }, + { + "answerText": "Trouver des valeurs aberrantes dans le sentiment et les examiner", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelles sont certaines choses que vous pourriez rechercher lors de la nettoyage des données?", + "answerOptions": [ + { + "answerText": "Personnages dans d'autres langues", + "isCorrect": "false" + }, + { + "answerText": "lignes vierges ou colonnes", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Il est important de comprendre vos données et ses fruits avant d'effectuer des opérations à ce sujet.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 39, + "title": "NLP 5: quiz préalable", + "quiz": [ + { + "questionText": "Pourquoi est-il important de nettoyer les données avant de l'analyser?", + "answerOptions": [ + { + "answerText": "Certaines colonnes pourraient avoir des données manquantes ou incorrectes", + "isCorrect": "false" + }, + { + "answerText": "Les données en désordre peuvent conduire à de fausses conclusions sur le jeu de données", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Quel est un exemple d'une stratégie de nettoyage des données?", + "answerOptions": [ + { + "answerText": "Supprimer des colonnes / rangées qui ne sont pas utiles pour répondre à une question spécifique", + "isCorrect": "true" + }, + { + "answerText": "Se débarrasser des valeurs vérifiées qui ne correspondent pas à votre hypothèse", + "isCorrect": "false" + }, + { + "answerText": "Déplacement des valeurs aberrantes vers une table séparée et exécutant les calculs de cette table pour voir s'ils correspondent à", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Il peut être utile de classer les données à l'aide d'une colonne Tag.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 40, + "title": "NLP 5: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Quel est l'objectif de l'ensemble de données?", + "answerOptions": [ + { + "answerText": "Pour voir combien de critiques négatives et positives il y a pour les hôtels à travers le monde", + "isCorrect": "false" + }, + { + "answerText": "Pour ajouter du sentiment et des colonnes qui vous aideront à choisir le meilleur hôtel", + "isCorrect": "true" + }, + { + "answerText": "Analyser pourquoi les gens laissent des critiques spécifiques", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quels sont les mots d'arrêt?", + "answerOptions": [ + { + "answerText": "Mots anglais communs qui ne changent pas le sentiment d'une phrase", + "isCorrect": "false" + }, + { + "answerText": "mots que vous pouvez supprimer pour accélérer l'analyse du sentiment", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Pour tester l'analyse du sentiment, assurez-vous qu'il correspond au score du critique pour le même examen.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 41, + "title": "Série introduction à temps: quiz préalable", + "quiz": [ + { + "questionText": "La prévision de la série chronologique est utile", + "answerOptions": [ + { + "answerText": "Déterminer les coûts futurs", + "isCorrect": "false" + }, + { + "answerText": "Prédicter les prix futurs", + "isCorrect": "false" + }, + { + "answerText": "à la fois ce qui précède", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Une série chronologique est une séquence prise à:", + "answerOptions": [ + { + "answerText": "points successifs également espacés dans l'espace", + "isCorrect": "false" + }, + { + "answerText": "points successifs également espacés dans le temps", + "isCorrect": "true" + }, + { + "answerText": "points successifs également espacés dans l'espace et le temps", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La série chronologique peut être utilisée dans:", + "answerOptions": [ + { + "answerText": "Prévision de tremblement de terre", + "isCorrect": "true" + }, + { + "answerText": "Vision informatique", + "isCorrect": "false" + }, + { + "answerText": "Analyse des couleurs", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 42, + "title": "Série introduction à TIME: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Tendances de la série chronologique sont", + "answerOptions": [ + { + "answerText": "mesure mesurable augmente et diminue au fil du temps", + "isCorrect": "true" + }, + { + "answerText": "La quantification diminue au fil du temps", + "isCorrect": "false" + }, + { + "answerText": "Des lacunes entre augmentations et diminution au fil du temps", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Les valeurs aberrantes sont", + "answerOptions": [ + { + "answerText": "Points proches de la variance de données standard", + "isCorrect": "false" + }, + { + "answerText": "Pointes loin de la variance de données standard", + "isCorrect": "true" + }, + { + "answerText": "Points dans la variance des données standard", + "isCorrect": "false" + } + ] + }, + { + "questionText": "La prévision de la série chronologique est la plus utile pour", + "answerOptions": [ + { + "answerText": "Econométrics", + "isCorrect": "true" + }, + { + "answerText": "Histoire", + "isCorrect": "false" + }, + { + "answerText": "Bibliothèques", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 43, + "title": "Série TIME ARIMA: quiz préalable", + "quiz": [ + { + "questionText": "Arima signifie", + "answerOptions": [ + { + "answerText": "Moyenne mobile intégrale autonome", + "isCorrect": "false" + }, + { + "answerText": "Action mobile intégrée autorégressive", + "isCorrect": "false" + }, + { + "answerText": "Moyenne mobile intégrée autorégresive", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Stationarité fait référence à", + "answerOptions": [ + { + "answerText": "Les données dont les attributs ne changent pas lors de la décalage", + "isCorrect": "false" + }, + { + "answerText": "Les données dont la distribution ne change pas lors de la décalage de temps", + "isCorrect": "true" + }, + { + "answerText": "Les données dont la distribution change lors de la décalage", + "isCorrect": "false" + } + ] + }, + { + "questionText": "différenciation", + "answerOptions": [ + { + "answerText": "Stabilise la tendance et la saisonnalité", + "isCorrect": "false" + }, + { + "answerText": "Exacerbe la tendance et la saisonnalité", + "isCorrect": "false" + }, + { + "answerText": "Élimine la tendance et la saisonnalité", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 44, + "title": "Série TIME ARIMA: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Arima est utilisé pour créer un modèle adapté à la forme spéciale des données de la série chronologique", + "answerOptions": [ + { + "answerText": "aussi plat que possible", + "isCorrect": "false" + }, + { + "answerText": "aussi étroitement que possible", + "isCorrect": "true" + }, + { + "answerText": "via ScatterPlots", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Utilisez Sarimax à", + "answerOptions": [ + { + "answerText": "Gérer les modèles d'ARIMA saisonniers", + "isCorrect": "true" + }, + { + "answerText": "Gérer des modèles spéciaux Arima", + "isCorrect": "false" + }, + { + "answerText": "Gérer les modèles statistiques ARIMA", + "isCorrect": "false" + } + ] + }, + { + "questionText": " `La validation` de la promenade implique ", + "answerOptions": [ + { + "answerText": "Réévaluer un modèle progressivement tel qu'il est validé", + "isCorrect": "false" + }, + { + "answerText": "Ré-entraînant un modèle progressivement tel qu'il est validé", + "isCorrect": "true" + }, + { + "answerText": "Ré-configurez un modèle progressivement tel qu'il est validé", + "isCorrect": "false" + } + ] + } + ] + }, { + "id": 45, + "title": "Renforcement 1: quiz préalable", + "quiz": [ + { + "questionText": "Qu'est-ce que l'apprentissage du renforcement?", + "answerOptions": [ + { + "answerText": "Enseigner à quelqu'un quelque chose encore et encore jusqu'à ce qu'ils comprennent", + "isCorrect": "false" + }, + { + "answerText": "Une technique d'apprentissage qui déchiffre le comportement optimal d'un agent dans certains environnements en exécutant de nombreuses expériences", + "isCorrect": "true" + }, + { + "answerText": "Comprendre comment exécuter plusieurs expériences à la fois", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Qu'est-ce qu'une politique?", + "answerOptions": [ + { + "answerText": "une fonction qui renvoie l'action à tout état donné", + "isCorrect": "true" + }, + { + "answerText": "Un document qui vous dit si vous pouvez renvoyer ou non un article", + "isCorrect": "false" + }, + { + "answerText": "Une fonction utilisée à des fins aléatoires", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Une fonction de récompense renvoie un score pour chaque état d'environnement.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "true" + }, + { + "answerText": "Faux", + "isCorrect": "false" + } + ] + } + ] + }, { + "id": 46, + "title": "Renforcement 1: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Qu'est-ce que q-apprentissage?", + "answerOptions": [ + { + "answerText": "Un mécanisme d'enregistrement de la \"bonté\" de chaque État", + "isCorrect": "false" + }, + { + "answerText": "Un algorithme où la politique est définie par une table Q", + "isCorrect": "false" + }, + { + "answerText": "Les deux ci-dessus", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Pour quelles valeurs une table Q correspond à la stratégie de marche aléatoire?", + "answerOptions": [ + { + "answerText": "toutes les valeurs égales", + "isCorrect": "true" + }, + { + "answerText": "-0,25", + "isCorrect": "false" + }, + { + "answerText": "toutes les valeurs différentes", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Il valait mieux utiliser l'exploration que l'exploitation pendant le processus d'apprentissage de notre leçon.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "false" + }, + { + "answerText": "Faux", + "isCorrect": "true" + } + ] + } + ] + }, + { + "id": 47, + "title": "Renforcement 2: quiz préalable", + "quiz": [ + { + "questionText": "Les échecs et les jeux sont des jeux avec des états continus.", + "answerOptions": [ + { + "answerText": "vrai", + "isCorrect": "false" + }, + { + "answerText": "Faux", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Quel est le problème de la cartpole?", + "answerOptions": [ + { + "answerText": "Un processus d'élimination des valeurs aberrantes", + "isCorrect": "false" + }, + { + "answerText": "Une méthode d'optimisation de votre panier", + "isCorrect": "false" + }, + { + "answerText": "Une version simplifiée d'équilibrage", + "isCorrect": "true" + } + ] + }, + { + "questionText": "Quel outil pouvons-nous utiliser pour jouer à différents scénarios d'états potentiels dans un jeu?", + "answerOptions": [ + { + "answerText": "Devinez et chèque", + "isCorrect": "false" + }, + { + "answerText": "Environnements de simulation", + "isCorrect": "true" + }, + { + "answerText": "Test de transition de l'état", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 48, + "title": "Renforcement 2: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Où définissons-nous toutes les actions possibles dans un environnement?", + "answerOptions": [ + { + "answerText": "Méthodes", + "isCorrect": "false" + }, + { + "answerText": "espace d'action", + "isCorrect": "true" + }, + { + "answerText": "Liste d'action", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle paire avez-nous utilisée comme valeur de la clé de dictionnaire?", + "answerOptions": [ + { + "answerText": "(état, action) comme clé de la table Q-Table comme valeur", + "isCorrect": "true" + }, + { + "answerText": "State comme clé, action en tant que valeur", + "isCorrect": "false" + }, + { + "answerText": "La valeur de la fonction QValues ​​est la clé, l'action en tant que valeur", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quels sont les hyperparamètres que nous avons utilisés pendant q-apprentissage?", + "answerOptions": [ + { + "answerText": "Valeur de la table Q, récompense actuelle, action aléatoire", + "isCorrect": "false" + }, + { + "answerText": "Taux d'apprentissage, facteur de réduction, facteur d'exploration / d'exploitation", + "isCorrect": "true" + }, + { + "answerText": "Récompenses cumulatives, taux d'apprentissage, facteur d'exploration", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 49, + "title": "Applications du monde réel: quiz préalable", + "quiz": [ + { + "questionText": "Quel est un exemple d'application ML dans l'industrie des finances?", + "answerOptions": [ + { + "answerText": "Personnaliser le voyage client à l'aide de NLP", + "isCorrect": "false" + }, + { + "answerText": "Gestion de la richesse à l'aide de la régression linéaire", + "isCorrect": "true" + }, + { + "answerText": "Gestion de l'énergie à l'aide de séries chronologiques", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle technique ML peut utiliser les hôpitaux pour gérer la réadmission?", + "answerOptions": [ + { + "answerText": "Clustering", + "isCorrect": "true" + }, + { + "answerText": "Série temporelle", + "isCorrect": "false" + }, + { + "answerText": "NLP", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quel est un exemple d'utilisation des séries chronologiques pour la gestion de l'énergie?", + "answerOptions": [ + { + "answerText": "Animaux de détection de mouvement", + "isCorrect": "false" + }, + { + "answerText": "Parkings intelligents", + "isCorrect": "true" + }, + { + "answerText": "Suivi des incendies de forêt", + "isCorrect": "false" + } + ] + } + ] + }, + { + "id": 50, + "title": "Applications du monde réel: quiz de validation des connaissances", + "quiz": [ + { + "questionText": "Quelle technique ML peut être utilisée pour détecter la fraude par carte de crédit?", + "answerOptions": [ + { + "answerText": "régression", + "isCorrect": "false" + }, + { + "answerText": "Clustering", + "isCorrect": "true" + }, + { + "answerText": "NLP", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quelle technique ML est illustrée dans la gestion forestière?", + "answerOptions": [ + { + "answerText": "Apprentissage du renforcement", + "isCorrect": "true" + }, + { + "answerText": "Série temporelle", + "isCorrect": "false" + }, + { + "answerText": "NLP", + "isCorrect": "false" + } + ] + }, + { + "questionText": "Quel est un exemple d'application ML dans l'industrie des soins de santé?", + "answerOptions": [ + { + "answerText": "Prédire le comportement des étudiants en utilisant la régression", + "isCorrect": "false" + }, + { + "answerText": "Gestion des essais cliniques à l'aide de classificateurs", + "isCorrect": "true" + }, + { + "answerText": "Sensation de mouvement des animaux utilisant des classificateurs", + "isCorrect": "false" + } + ] + } + ] + } + ] +}] \ No newline at end of file diff --git a/quiz-app/src/assets/translations/index.js b/quiz-app/src/assets/translations/index.js index e4abf6eb..85931b8b 100644 --- a/quiz-app/src/assets/translations/index.js +++ b/quiz-app/src/assets/translations/index.js @@ -1,12 +1,14 @@ // index.js import en from './en.json'; import tr from './tr.json'; +import fr from './fr.json'; //export const defaultLocale = 'en'; const messages = { en: en[0], tr: tr[0], + fr: fr[0] }; export default messages; From 4dab6027cc9af7640a5403f6d8f77d1ffcae106c Mon Sep 17 00:00:00 2001 From: feiyun0112 Date: Fri, 16 Jul 2021 21:18:52 +0800 Subject: [PATCH 52/91] Update README.zh-cn.md --- 2-Regression/4-Logistic/translations/README.zh-cn.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2-Regression/4-Logistic/translations/README.zh-cn.md b/2-Regression/4-Logistic/translations/README.zh-cn.md index 52453de5..b4397856 100644 --- a/2-Regression/4-Logistic/translations/README.zh-cn.md +++ b/2-Regression/4-Logistic/translations/README.zh-cn.md @@ -120,7 +120,7 @@ Seaborn提供了一些巧妙的方法来可视化你的数据。例如,你可 sns.swarmplot(x="Color", y="Item Size", data=new_pumpkins) ``` - ![分类散点图可视化数据](images/swarm.png) + ![分类散点图可视化数据](../images/swarm.png) ### 小提琴图 @@ -133,7 +133,7 @@ Seaborn提供了一些巧妙的方法来可视化你的数据。例如,你可 kind="violin", data=new_pumpkins) ``` - ![小提琴图](images/violin.png) + ![小提琴图](../images/violin.png) ✅ 尝试使用其他变量创建此图和其他Seaborn图。 From 580cfc314c2348e52849a90be12d6b9e74decd5e Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Fri, 16 Jul 2021 10:14:21 -0400 Subject: [PATCH 53/91] small link format error --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index e762c7f6..0d07a5e8 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -102,7 +102,7 @@ Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw] ## Révision et auto-apprentissage -Pour en savoir plus sur la façon dont vous pouvez utiliser les algorithmes de ML dans le cloud, suivez ce [Parcours d'apprentissage](https://docs.microsoft.com/learn/paths/create-no-code-predictive-models-azure-machine- learning/?WT.mc_id=academic-15963-cxa). +Pour en savoir plus sur la façon dont vous pouvez utiliser les algorithmes de ML dans le cloud, suivez ce [Parcours d'apprentissage](https://docs.microsoft.com/learn/paths/create-no-code-predictive-models-azure-machine-learning/?WT.mc_id=academic-15963-cxa). ## Devoir From c67123ad7322722cfab87a0666ef8c5417f3c9aa Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Fri, 16 Jul 2021 10:23:19 -0400 Subject: [PATCH 54/91] linking assignment --- 1-Introduction/1-intro-to-ML/translations/README.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.zh-cn.md b/1-Introduction/1-intro-to-ML/translations/README.zh-cn.md index 8693ff20..45ec79be 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.zh-cn.md +++ b/1-Introduction/1-intro-to-ML/translations/README.zh-cn.md @@ -104,4 +104,4 @@ ## 任务 -[启动并运行](../assignment.md) +[启动并运行](assignment.zh-cn.md) From d07d80730ddc9c8eda3dc294be54fb51130f5e24 Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Fri, 16 Jul 2021 10:25:47 -0400 Subject: [PATCH 55/91] linking Chinese language assignments --- .../translations/README.zh-cn.md | 2 +- .../3-fairness/translations/README.zh-cn.md | 22 +++++++++---------- .../translations/README.zh-cn.md | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/1-Introduction/2-history-of-ML/translations/README.zh-cn.md b/1-Introduction/2-history-of-ML/translations/README.zh-cn.md index 51e66ecd..8ca7e690 100644 --- a/1-Introduction/2-history-of-ML/translations/README.zh-cn.md +++ b/1-Introduction/2-history-of-ML/translations/README.zh-cn.md @@ -113,4 +113,4 @@ Alan Turing,一个真正杰出的人,[在2019年被公众投票选出](https ## 任务 -[创建时间线](../assignment.md) +[创建时间线](assignment.zh-cn.md) diff --git a/1-Introduction/3-fairness/translations/README.zh-cn.md b/1-Introduction/3-fairness/translations/README.zh-cn.md index 3b75ddab..22204544 100644 --- a/1-Introduction/3-fairness/translations/README.zh-cn.md +++ b/1-Introduction/3-fairness/translations/README.zh-cn.md @@ -89,11 +89,11 @@ ✅ **讨论**:重温一些例子,看看它们是否显示出不同的危害。 -| | 分配 | 服务质量 | 刻板印象 | 诋毁 | 代表性过高或过低 | -| ----------------------- | :--------: | :----------------: | :----------: | :---------: | :----------------------------: | -| 自动招聘系统 | x | x | x | | x | -| 机器翻译 | | | | | | -| 照片加标签 | | | | | | +| | 分配 | 服务质量 | 刻板印象 | 诋毁 | 代表性过高或过低 | +| ------------ | :---: | :------: | :------: | :---: | :--------------: | +| 自动招聘系统 | x | x | x | | x | +| 机器翻译 | | | | | | +| 照片加标签 | | | | | | ## 检测不公平 @@ -138,11 +138,11 @@ ✅ 在以后关于聚类的课程中,你将看到如何在代码中构建这个“混淆矩阵” -| | 假阳性率 | 假阴性率 | 数量 | -| ---------- | ------------------- | ------------------- | ----- | -| 女性 | 0.37 | 0.27 | 54032 | -| 男性 | 0.31 | 0.35 | 28620 | -| 未列出性别 | 0.33 | 0.31 | 1266 | +| | 假阳性率 | 假阴性率 | 数量 | +| ---------- | -------- | -------- | ----- | +| 女性 | 0.37 | 0.27 | 54032 | +| 男性 | 0.31 | 0.35 | 28620 | +| 未列出性别 | 0.33 | 0.31 | 1266 | 这个表格告诉我们几件事。首先,我们注意到数据中的未列出性别的人相对较少。数据是有偏差的,所以你需要小心解释这些数字。 @@ -211,4 +211,4 @@ ## 任务 -[探索Fairlearn](../assignment.md) +[探索Fairlearn](assignment.zh-cn.md) diff --git a/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md b/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md index d01d5bbf..373602f3 100644 --- a/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md +++ b/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md @@ -54,7 +54,7 @@ - **训练**。这部分数据集适合你的模型进行训练。这个集合构成了原始数据集的大部分。 - **测试**。测试数据集是一组独立的数据,通常从原始数据中收集,用于确认构建模型的性能。 -- **验证**。验证集是一个较小的独立示例组,用于调整模型的超参数或架构,以改进模型。根据你的数据大小和你提出的问题,你可能不需要构建第三组(正如我们在[时间序列预测](../../7-TimeSeries/1-Introduction/README.md)中所述)。 +- **验证**。验证集是一个较小的独立示例组,用于调整模型的超参数或架构,以改进模型。根据你的数据大小和你提出的问题,你可能不需要构建第三组(正如我们在[时间序列预测](../../../7-TimeSeries/1-Introduction/README.md)中所述)。 ## 建立模型 @@ -105,4 +105,4 @@ ## 任务 -[采访一名数据科学家](../assignment.md) +[采访一名数据科学家](assignment.zh-cn.md) From 1ac779f41cfff29cca56e6093b651ada4bef4025 Mon Sep 17 00:00:00 2001 From: Colin Zang Date: Fri, 16 Jul 2021 22:44:19 +0800 Subject: [PATCH 56/91] Update README.zh-cn.md --- translations/README.zh-cn.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/README.zh-cn.md b/translations/README.zh-cn.md index f46a50d6..dfe0760c 100644 --- a/translations/README.zh-cn.md +++ b/translations/README.zh-cn.md @@ -29,11 +29,11 @@ - 从课前测验开始 - 阅读课程内容,完成所有的活动,在每次 knowledge check 时暂停并思考 -- 我们建议你基于理解来创建项目(而不是仅仅跑一遍示例代码)示例代码的位置在每一个项目的 `/solution` 文件夹中。 +- 我们建议你基于理解来创建项目(而不是仅仅跑一遍示例代码)。示例代码的位置在每一个项目的 `/solution` 文件夹中。 - 进行课后测验 - 完成课程挑战 - 完成作业 -- 一节课完成后, 访问[讨论版](https://github.com/microsoft/ML-For-Beginners/discussions),通过天蝎相应的 PAT Rubric (课程目标)来深化自己的学习成果。你也可以回应其它的 PAT,这样我们可以一起学习。 +- 一节课完成后, 访问[讨论版](https://github.com/microsoft/ML-For-Beginners/discussions),通过填写相应的 PAT Rubric (课程目标) 来深化自己的学习成果。你也可以回应其它的 PAT,这样我们可以一起学习。 > 如果希望进一步学习,我们推荐跟随 [Microsoft Learn](https://docs.microsoft.com/en-us/users/jenlooper-2911/collections/k7o7tg1gp306q4?WT.mc_id=academic-15963-cxa) 的模块和学习路径。 @@ -52,7 +52,7 @@ 此课程基于两个教学原则:学生应该上手进行**项目实践**,并完成**频繁的测验**。 此外,为了使整个课程更具有整体性,课程们有一个共同的**主题**。 -通过确保课程内容与项目强相关,我们让学习过程对学生更具吸引力,概念的学习也被深化了。难度较低的课前测验可以吸引学生学习课程,课后的第二次测验进一步重复了课堂中的概念。该课程被设计地灵活有趣,可以一次性全部学习,或者分开来一部分一部分学习。这些项目由浅入深,从第一周的的小项目开始,在第十二周的周期结束时变得较为复杂。本课程还包括一个关于机器学习实际应用的后记,可用作额外学分或讨论的基础。 +通过确保课程内容与项目强相关,我们让学习过程对学生更具吸引力,概念的学习也被深化了。难度较低的课前测验可以吸引学生学习课程,而课后的第二次测验也进一步重复了课堂中的概念。该课程被设计地灵活有趣,可以一次性全部学习,或者分开来一部分一部分学习。这些项目由浅入深,从第一周的小项目开始,在第十二周结束时变得较为复杂。本课程还包括一个关于机器学习实际应用的后记,可用作额外学分或进一步讨论的基础。 > 在这里,你可以找到我们的[行为守则](../CODE_OF_CONDUCT.md),[对项目作出贡献](../CONTRIBUTING.md)以及[翻译](../TRANSLATIONS.md)指南。我们欢迎各位提出有建设性的反馈! From 0e93c335f31adf87e090f5362103e165f751ed32 Mon Sep 17 00:00:00 2001 From: Colin Zang Date: Fri, 16 Jul 2021 23:21:17 +0800 Subject: [PATCH 57/91] Create README.zh-cn.md --- 8-Reinforcement/translations/README.zh-cn.md | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 8-Reinforcement/translations/README.zh-cn.md diff --git a/8-Reinforcement/translations/README.zh-cn.md b/8-Reinforcement/translations/README.zh-cn.md new file mode 100644 index 00000000..25a53cfc --- /dev/null +++ b/8-Reinforcement/translations/README.zh-cn.md @@ -0,0 +1,53 @@ +# 强化学习简介 + +强化学习 (RL, Reinforcement Learning),是基本的机器学习范式之一(仅次于监督学习 (Supervised Learning) 和无监督学习(Unsupervised Learning))。强化学习和「策略」息息相关:它应当产生正确的策略,或从错误的策略中学习。 + +假设有一个模拟环境,比如说股市。当我们用某一个规则来限制这个市场时,会发生什么?这个规则(或者说策略)有积极或消极的影响吗?如果它的影响是正面的,我们需要从这种_负面强化_中学习,改变我们的策略。如果它的影响是正面的,我们需要在这种_积极强化_的基础上再进一步发展。 + +![彼得和狼](../images/peter.png) + +> 彼得和他的朋友们得从饥饿的狼这儿逃掉!图片来自 [Jen Looper](https://twitter.com/jenlooper) + +## 本节主题:彼得与狼(俄罗斯) + +[彼得与狼](https://en.wikipedia.org/wiki/Peter_and_the_Wolf) 是俄罗斯作曲家[谢尔盖·普罗科菲耶夫](https://en.wikipedia.org/wiki/Sergei_Prokofiev)创作的音乐童话。它讲述了彼得勇敢地走出家门,到森林中央追逐狼的故事。在本节中,我们将训练帮助 Peter 追狼的机器学习算法: + +- **探索**周边区域并构建最佳地图 +- **学习**如何使用滑板并在滑板上保持平衡,以便更快地移动。 + +[![彼得和狼](https://img.youtube.com/vi/Fmi5zHg4QSM/0.jpg)](https://www.youtube.com/watch?v=Fmi5zHg4QSM) + +> 🎥 点击上面的图片,听普罗科菲耶夫的《彼得与狼》 + +## 强化学习 + +在前面的部分中,您已经看到了两类机器学习问题的例子: + +- **监督**,在有已经标记的,暗含解决方案的数据集的情况下。 [分类](../../4-Classification/README.md) 和 [回归](../../2-Regression/README.md) 是监督学习任务。 +- **无监督**,在我们没有标记训练数据集的情况下。无监督学习的主要例子是 [聚类](../../5-Clustering/README.md)。 + +在本节中,我们将学习一类新的机器学习问题,它不需要已经标记的训练数据 —— 比如这两类问题: + +- **[半监督学习](https://wikipedia.org/wiki/Semi-supervised_learning)**,在我们有很多未标记的、可以用来预训练模型的数据的情况下。 +- **[强化学习](https://wikipedia.org/wiki/Reinforcement_learning)**,在这种方法中,机器通过在某种模拟环境中进行实验来学习最佳策略。 + +### 示例 - 电脑游戏 + +假设我们要教会计算机玩某一款游戏 —— 例如国际象棋,或者 [超级马里奥](https://wikipedia.org/wiki/Super_Mario)。为了让计算机学会玩游戏,我们需要它预测在每个游戏「状态」下,它应该做什么「操作」。虽然这看起来像是一个分类问题,但事实并非如此,因为我们并没有像这样的,包含「状态」和状态对应的「操作」的数据集。我们只有一些有限的数据,比如来自国际象棋比赛的记录,或者是玩家玩超级马里奥的记录。这些数据可能无法涵盖足够多的「状态」。 + +不同于这种需要大量现有的数据的方法,**强化学习**是基于*让计算机多次玩*并观察玩的结果的想法。因此,要使用强化学习方法,我们需要两个要素: + +- **环境**和**模拟器**,它们允许我们多次玩游戏。该模拟器应该定义所有游戏规则,以及可能的状态和动作。 + +- **奖励函数**,它会告诉我们每个每一步(或者每局游戏)的表现如何。 + +其他类型的机器学习和强化学习 (RL) 之间的主要区别在于,在 RL 中,我们通常在完成游戏之前,都不知道我们是赢还是输。因此,我们不能说单独的某个动作是不是「好」的 - 我们只会在游戏结束时获得奖励。我们的目标是设计算法,使我们能够在这种不确定的条件下训练模型。我们将了解一种称为 **Q-learning** 的 RL 算法。 + +## 课程 + +1.【强化学习和 Q-Learning 介绍】(1-QLearning/README.md) +2.【使用 Gym 模拟环境】(2-Gym/README.md) + +## 本文作者 + +“强化学习简介” 由 [Dmitry Soshnikov](http://soshnikov.com) 用 ♥️ 编写 \ No newline at end of file From 7240be1e93f701d0c4d1d94d87113febf183fae1 Mon Sep 17 00:00:00 2001 From: manusquall Date: Sat, 17 Jul 2021 01:59:53 +0000 Subject: [PATCH 58/91] stop at 43 --- package.json | 4 +- quiz-app/src/assets/translations/fr.json | 236 +++++++++++------------ 2 files changed, 120 insertions(+), 120 deletions(-) diff --git a/package.json b/package.json index b64c6bf1..3b5c347c 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "Machine Learning for Beginners - A Curriculum", "main": "index.js", "scripts": { - "convert": "node_modules/.bin/docsify-to-pdf" - }, + "convert": "node_modules/.bin/docsify-to-pdf" + }, "repository": { "type": "git", "url": "git+https://github.com/microsoft/ML-For-Beginners.git" diff --git a/quiz-app/src/assets/translations/fr.json b/quiz-app/src/assets/translations/fr.json index ec8111c0..3ec4ec9e 100644 --- a/quiz-app/src/assets/translations/fr.json +++ b/quiz-app/src/assets/translations/fr.json @@ -1,18 +1,18 @@ [ { - "title": "Machine Learning pour les débutants: quiz", + "title": "Machine Learning pour les Débutants: Quiz", "complete": "Félicitations, vous avez terminé le quiz!", "error": "Désolé, essayez à nouveau", "quizzes": [ { "id": 1, - "title": "Introduction au machine learning: quiz préalable", + "title": "Introduction au machine learning: Quiz préalable", "quiz": [ { "questionText": "Les applications de machine learning sont toutes autour de nous", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -59,7 +59,7 @@ }, { "id": 2, - "title": "Introduction au machine learning: quiz de validation des connaissances", + "title": "Introduction au machine learning: Quiz de validation des connaissances", "quiz": [ { "questionText": "Les algorithmes de machine learning sont destinés à simuler", @@ -116,7 +116,7 @@ }, { "id": 3, - "title": "Historique du machine learning: quiz préalable", + "title": "Historique du machine learning: Quiz préalable", "quiz": [ { "questionText": "Quand approximativement le terme 'intelligence artificielle' a-t-il été inventé ?", @@ -173,7 +173,7 @@ }, { "id": 4, - "title": "Historique du machine learning: quiz de validation des connaissances", + "title": "Historique du machine learning: Quiz de validation des connaissances", "quiz": [ { "questionText": "Qu'est-ce qu'un exemple de système d'IA \" Scruffy \" AI?", @@ -230,7 +230,7 @@ }, { "id": 5, - "title": "L'équité et machine learning: quiz préalable", + "title": "L'équité et le machine learning: Quiz préalable", "quiz": [ { "questionText": "L'injustice dans le machine learning peut arriver", @@ -287,7 +287,7 @@ }, { "id": 6, - "title": "Equité et machine learning: quiz de validation des connaissances", + "title": "L'équité et le machine learning: Quiz de validation des connaissances", "quiz": [ { "questionText": "L'injustice dans un modèle peut être causée par", @@ -324,10 +324,10 @@ ] }, { - "questionText": "FairLearn est un paquet qui peut", + "questionText": "Fairlearn est un paquet qui peut", "answerOptions": [ { - "answerText": "Comparez plusieurs modèles en utilisant des métriques d'équité et de performance", + "answerText": "Comparer plusieurs modèles en utilisant des métriques d'équité et de performance", "isCorrect": "true" }, { @@ -335,7 +335,7 @@ "isCorrect": "false" }, { - "answerText": "Aidez-vous à décider de ce qui est juste et ce qui n'est pas", + "answerText": "Vous aider à décider de ce qui est juste et ce qui ne l'est pas", "isCorrect": "false" } ] @@ -344,7 +344,7 @@ }, { "id": 7, - "title": "Outils et techniques: quiz préalable", + "title": "Outils et techniques: Quiz préalable", "quiz": [ { "questionText": "Lors de la construction d'un modèle, vous devriez:", @@ -401,7 +401,7 @@ }, { "id": 8, - "title": "Outils et techniques: quiz de validation des connaissances", + "title": "Outils et techniques: Quiz de validation des connaissances", "quiz": [ { "questionText": "Vous devez visualiser vos données car", @@ -458,7 +458,7 @@ }, { "id": 9, - "title": "Introduction à la régression: quiz préalable", + "title": "Introduction à la régression: Quiz préalable", "quiz": [ { "questionText": "Laquelle de ces variables est une variable numérique?", @@ -515,7 +515,7 @@ }, { "id": 10, - "title": "Introduction à la régression: quiz de validation des connaissances", + "title": "Introduction à la régression: Quiz de validation des connaissances", "quiz": [ { "questionText": "Si la précision de la formation du modèle d'apprentissage de votre machine est de 95% et que la précision des tests est de 30%, quel type de condition est appelé?", @@ -572,7 +572,7 @@ }, { "id": 11, - "title": "Préparer et visualiser des données pour la régression: quiz préalable", + "title": "Préparer et visualiser des données pour la régression: Quiz préalable", "quiz": [ { "questionText": "Lequel de ces modules Python est utilisé pour tracer la visualisation des données?", @@ -629,7 +629,7 @@ }, { "id": 12, - "title": "Préparez et visualisez des données pour la régression: quiz de validation des connaissances", + "title": "Préparer et visualiser des données pour la régression: Quiz de validation des connaissances", "quiz": [ { "questionText": "Lequel de ces extraits de code est correct d'après cette leçon, si vous souhaitez vérifier la présence de valeurs manquantes dans votre ensemble de données ? Supposons que l'ensemble de données soit stocké dans une variable nommée \"ensemble de données\", qui est un objet Pandas DataFrame.", @@ -686,7 +686,7 @@ }, { "id": 13, - "title": "régression linéaire et polynomiale: quiz préalable", + "title": "Régression linéaire et polynomiale: Quiz préalable", "quiz": [ { "questionText": "Matplotlib est un", @@ -743,7 +743,7 @@ }, { "id": 14, - "title": "Régression linéaire et polynomiale: quiz de validation des connaissances", + "title": "Régression linéaire et polynomiale: Quiz de validation des connaissances", "quiz": [ { "questionText": "Si vos données sont non linéaires, essayez un type ___ de régression", @@ -800,7 +800,7 @@ }, { "id": 15, - "title": "Régression logistique: quiz préalable", + "title": "Régression logistique: Quiz préalable", "quiz": [ { "questionText": "Utilisez la régression logistique à prédire", @@ -857,7 +857,7 @@ }, { "id": 16, - "title": "Régression logistique: quiz de validation des connaissances", + "title": "Régression logistique: Quiz de validation des connaissances", "quiz": [ { "questionText": "Sea-né est un type de", @@ -913,7 +913,7 @@ ] }, { "id": 17, - "title": "Construire une application Web: quiz préalable", + "title": "Construire une application Web: Quiz préalable", "quiz": [ { "questionText": "Qu'est-ce que OnNX signifie?", @@ -970,7 +970,7 @@ }, { "id": 18, - "title": "Construire une application Web: quiz de validation des connaissances", + "title": "Construire une application Web: Quiz de validation des connaissances", "quiz": [ { "questionText": "Quels sont les outils que nous pouvons utiliser pour héberger un modèle pré-formé sur le Web à l'aide de Python?", @@ -1027,7 +1027,7 @@ }, { "id": 19, - "title": "Classification 1: quiz préalable", + "title": "Classification 1: Quiz préalable", "quiz": [ { "questionText": "La classification est une forme d'apprentissage supervisé qui a beaucoup en commun avec", @@ -1084,7 +1084,7 @@ }, { "id": 20, - "title": "Classification 1: quiz de validation des connaissances", + "title": "Classification 1: Quiz de validation des connaissances", "quiz": [ { "questionText": "Qu'est-ce qu'une question multiclasse?", @@ -1107,7 +1107,7 @@ "questionText": "Il est important de nettoyer des données récurrentes ou inutiles pour aider vos classificateurs à résoudre votre problème.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -1137,13 +1137,13 @@ }, { "id": 21, - "title": "Classification 2: quiz préalable", + "title": "Classification 2: Quiz préalable", "quiz": [ { "questionText": "Les données équilibrées et propres ont produit les meilleurs résultats de la classification", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -1190,7 +1190,7 @@ }, { "id": 22, - "title": "Classification 2: quiz de validation des connaissances", + "title": "Classification 2: Quiz de validation des connaissances", "quiz": [ { "questionText": "Qu'est-ce qu'un \"solveur\" ?", @@ -1247,7 +1247,7 @@ }, { "id": 23, - "title": "Classification 3: quiz préalable", + "title": "Classification 3: Quiz préalable", "quiz": [ { "questionText": "Un bon classificateur initial à essayer est:", @@ -1304,7 +1304,7 @@ }, { "id": 24, - "title": "Classification 3: quiz de validation des connaissances", + "title": "Classification 3: Quiz de validation des connaissances", "quiz": [ { "questionText": "Les classificateurs de support-vectoriel peuvent être utilisés pour", @@ -1361,7 +1361,7 @@ }, { "id": 25, - "title": "Classification 4: quiz préalable", + "title": "Classification 4: Quiz préalable", "quiz": [ { "questionText": "Les systèmes de recommandation peuvent être utilisés pour", @@ -1384,7 +1384,7 @@ "questionText": "L'intégration d'un modèle dans une application Web l'aide à être hors ligne", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -1414,7 +1414,7 @@ }, { "id": 26, - "title": "Classification 4: quiz de validation des connaissances", + "title": "Classification 4: Quiz de validation des connaissances", "quiz": [ { "questionText": "L'application Nettron vous aide:", @@ -1471,7 +1471,7 @@ }, { "id": 27, - "title": "Introduction au clustering: quiz préalable", + "title": "Introduction au Clustering: Quiz préalable", "quiz": [ { "questionText": "Un exemple de vie réel de regroupement serait", @@ -1508,18 +1508,18 @@ ] }, { - "questionText": "La clustering est un type de:", + "questionText": "La Clustering est un type :", "answerOptions": [ { - "answerText": "Apprentissage supervisé", + "answerText": "D'apprentissage supervisé", "isCorrect": "false" }, { - "answerText": "L'apprentissage non supervisé", + "answerText": "D'apprentissage non supervisé", "isCorrect": "true" }, { - "answerText": "Apprentissage du renforcement", + "answerText": "D'apprentissage de renforcement", "isCorrect": "false" } ] @@ -1528,30 +1528,30 @@ }, { "id": 28, - "title": "Introduction au clustering: quiz de validation des connaissances", + "title": "Introduction au Clustering: Quiz de validation des connaissances", "quiz": [ { - "questionText": "La géométrie euclidienne est arrangée", + "questionText": "La géométrie euclidienne est disposée le long", "answerOptions": [ { - "answerText": "Planes", + "answerText": "De plans", "isCorrect": "true" }, { - "answerText": "Courbes", + "answerText": "De courbes", "isCorrect": "false" }, { - "answerText": "Sphères", + "answerText": "De sphères", "isCorrect": "false" } ] }, { - "questionText": "La densité de vos données de clustering est liée à sa", + "questionText": "La densité de vos données de clustering est liée à son / sa", "answerOptions": [ { - "answerText": "bruit", + "answerText": "Bruit", "isCorrect": "true" }, { @@ -1568,15 +1568,15 @@ "questionText": "L'algorithme de regroupement le plus connu est", "answerOptions": [ { - "answerText": "k-signifie", + "answerText": "k-means", "isCorrect": "true" }, { - "answerText": "K-Middle", + "answerText": "K-middle", "isCorrect": "false" }, { - "answerText": "K-Mart", + "answerText": "K-mart", "isCorrect": "false" } ] @@ -1585,7 +1585,7 @@ }, { "id": 29, - "title": "K-Means Clustering: quiz préalable", + "title": "K-Means Clustering: Quiz préalable", "quiz": [ { "questionText": "K-Means est dérivé de:", @@ -1605,7 +1605,7 @@ ] }, { - "questionText": "Une bonne score de silhouette signifie:", + "questionText": "Un bon score de silhouette signifie:", "answerOptions": [ { "answerText": "Les grappes sont bien séparées et bien définies", @@ -1642,13 +1642,13 @@ }, { "id": 30, - "title": "K-olth regroupement: quiz de validation des connaissances", + "title": "K-Means Clustering: Quiz de validation des connaissances", "quiz": [ { "questionText": "Un diagramme de Voronoi montre:", "answerOptions": [ { - "answerText": "Variance d'une cluster", + "answerText": "Une variance d'une cluster", "isCorrect": "false" }, { @@ -1682,7 +1682,7 @@ "questionText": "en utilisant k-moyen, vous devez d'abord déterminer la valeur de 'k'", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -1695,7 +1695,7 @@ }, { "id": 31, - "title": "Intro to NLP: quiz préalable", + "title": "Intro aux NLP: Quiz préalable", "quiz": [ { "questionText": "Que signifie NLP pour ces leçons?", @@ -1732,14 +1732,14 @@ ] }, { - "questionText": "Le test de Turing 'd'Alan Turing a essayé de déterminer si un ordinateur était", + "questionText": "Le test Turing d'Alan Turing a essayé de déterminer si un ordinateur était", "answerOptions": [ { - "answerText": "Inmistingtilisable d'un humain", + "answerText": "indiscernable d'un humain", "isCorrect": "false" }, { - "answerText": "Penser", + "answerText": "Pensif", "isCorrect": "false" }, { @@ -1752,7 +1752,7 @@ }, { "id": 32, - "title": "Intro to NLP: quiz de validation des connaissances", + "title": "Intro aux NLP: Quiz de validation des connaissances", "quiz": [ { "questionText": "Joseph Weizenbaum a inventé le bot", @@ -1775,7 +1775,7 @@ "questionText": "Un bot conversationnel donne une sortie basée sur", "answerOptions": [ { - "answerText": "Choisir des choix prédéfinis au hasard", + "answerText": "Un choix de choix prédéfinis au hasard", "isCorrect": "false" }, { @@ -1789,14 +1789,14 @@ ] }, { - "questionText": "Comment feriez-vous le bot plus efficace?", + "questionText": "Comment feriez-vous pour que le bot soit plus efficace?", "answerOptions": [ { "answerText": "En le demandant plus de questions.", "isCorrect": "false" }, { - "answerText": "En l'alignant plus de données et de la formation en conséquence", + "answerText": "En lui fournissant plus de données et en le formant en conséquence", "isCorrect": "true" }, { @@ -1809,21 +1809,21 @@ }, { "id": 33, - "title": "Tâches NLP: quiz préalable", + "title": "Tâches NLP: Quiz préalable", "quiz": [ { "questionText": "Tokenization", "answerOptions": [ { - "answerText": "Splituelle du texte au moyen de la ponctuation", + "answerText": "Divise le texte au moyen de la ponctuation", "isCorrect": "false" }, { - "answerText": "Splituelle du texte en jetons séparés (mots)", + "answerText": "Divise le texte en jetons séparés (mots)", "isCorrect": "true" }, { - "answerText": "Splituelle du texte en phrases", + "answerText": "Divise le texte en phrases", "isCorrect": "false" } ] @@ -1836,11 +1836,11 @@ "isCorrect": "true" }, { - "answerText": "Intégrance des mots en phrases", + "answerText": "Intégre des mots en phrases", "isCorrect": "false" }, { - "answerText": "Intégrance des phrases dans les paragraphes", + "answerText": "Intégre des phrases dans les paragraphes", "isCorrect": "false" } ] @@ -1866,7 +1866,7 @@ }, { "id": 34, - "title": "Tâches NLP: quiz de validation des connaissances", + "title": "Tâches NLP: Quiz de validation des connaissances", "quiz": [ { "questionText": "Construisez un dictionnaire de la fréquence à laquelle les mots se reproduisent en utilisant:", @@ -1923,10 +1923,10 @@ }, { "id": 35, - "title": "NLP et traduction: quiz préalable", + "title": "NLP et traduction: Quiz préalable", "quiz": [ { - "questionText": "Traduction naïf", + "questionText": "La traduction naïve", "answerOptions": [ { "answerText": "Traduit uniquement les mots", @@ -1943,7 +1943,7 @@ ] }, { - "questionText": "Un corpus * de textes fait référence à", + "questionText": "Un *corpus* de textes fait référence à", "answerOptions": [ { "answerText": "Un petit nombre de textes", @@ -1960,10 +1960,10 @@ ] }, { - "questionText": "Si un modèle ML a suffisamment de traductions humaines pour construire un modèle sur, il peut", + "questionText": "Si un modèle ML a suffisamment de traductions humaines pour construire un modèle, il peut", "answerOptions": [ { - "answerText": "Traductions abrégées", + "answerText": "Abréger des traductions", "isCorrect": "false" }, { @@ -1980,7 +1980,7 @@ }, { "id": 36, - "title": "NLP et traduction: quiz de validation des connaissances", + "title": "NLP et traduction: Quiz de validation des connaissances", "quiz": [ { "questionText": "La bibliothèque de traduction de texte sous-jacente est:", @@ -2000,7 +2000,7 @@ ] }, { - "questionText": "utiliser `blob.translate` vous avez besoin:", + "questionText": "Pour utiliser `blob.translate` vous avez besoin:", "answerOptions": [ { "answerText": "Une connexion Internet", @@ -2017,7 +2017,7 @@ ] }, { - "questionText": "Déterminer le sentiment, une approche ML serait de:", + "questionText": "Pour déterminer un sentiment, une approche ML serait de:", "answerOptions": [ { "answerText": "Appliquez des techniques de régression pour générer manuellement des opinions et des scores et rechercher des modèles", @@ -2037,7 +2037,7 @@ }, { "id": 37, - "title": "NLP 4: quiz préalable", + "title": "NLP 4: Quiz préalable", "quiz": [ { "questionText": "Quelles informations pouvons-nous obtenir du texte écrit ou parlé par un humain?", @@ -2094,17 +2094,17 @@ }, { "id": 38, - "title": "NLP 4: quiz de validation des connaissances", + "title": "NLP 4: Quiz de validation des connaissances", "quiz": [ { "questionText": "Quelle est l'essence de la NLP?", "answerOptions": [ { - "answerText": "catégoriser la langue humaine en joyeux ou triste", + "answerText": "catégoriser la langue humaine en joyeuse ou triste", "isCorrect": "false" }, { - "answerText": "Interprétation de sens ou de sentiment sans avoir à avoir un homme humain le faire", + "answerText": "Interprétation de sens ou de sentiment sans avoir un humain pour le faire", "isCorrect": "true" }, { @@ -2114,7 +2114,7 @@ ] }, { - "questionText": "Quelles sont certaines choses que vous pourriez rechercher lors de la nettoyage des données?", + "questionText": "Quelles sont certaines choses que vous pourriez rechercher lors du nettoyage des données?", "answerOptions": [ { "answerText": "Personnages dans d'autres langues", @@ -2131,10 +2131,10 @@ ] }, { - "questionText": "Il est important de comprendre vos données et ses fruits avant d'effectuer des opérations à ce sujet.", + "questionText": "Il est important de comprendre votre donnée et ses faiblesses avant d'effectuer des opérations à ce sujet.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -2147,7 +2147,7 @@ }, { "id": 39, - "title": "NLP 5: quiz préalable", + "title": "NLP 5: Quiz préalable", "quiz": [ { "questionText": "Pourquoi est-il important de nettoyer les données avant de l'analyser?", @@ -2178,7 +2178,7 @@ "isCorrect": "false" }, { - "answerText": "Déplacement des valeurs aberrantes vers une table séparée et exécutant les calculs de cette table pour voir s'ils correspondent à", + "answerText": "Déplacement des valeurs aberrantes vers une table séparée et exécutant les calculs de cette table pour voir s'ils correspondent", "isCorrect": "false" } ] @@ -2187,7 +2187,7 @@ "questionText": "Il peut être utile de classer les données à l'aide d'une colonne Tag.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -2200,17 +2200,17 @@ }, { "id": 40, - "title": "NLP 5: quiz de validation des connaissances", + "title": "NLP 5: Quiz de validation des connaissances", "quiz": [ { "questionText": "Quel est l'objectif de l'ensemble de données?", "answerOptions": [ { - "answerText": "Pour voir combien de critiques négatives et positives il y a pour les hôtels à travers le monde", + "answerText": "Voir combien de critiques négatives et positives il y a pour les hôtels à travers le monde", "isCorrect": "false" }, { - "answerText": "Pour ajouter du sentiment et des colonnes qui vous aideront à choisir le meilleur hôtel", + "answerText": "Ajouter du sentiment et des colonnes qui vous aideront à choisir le meilleur hôtel", "isCorrect": "true" }, { @@ -2240,7 +2240,7 @@ "questionText": "Pour tester l'analyse du sentiment, assurez-vous qu'il correspond au score du critique pour le même examen.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -2253,27 +2253,27 @@ }, { "id": 41, - "title": "Série introduction à temps: quiz préalable", + "title": "Introduction aux Time Series (séries temporelles): Quiz préalable", "quiz": [ { - "questionText": "La prévision de la série chronologique est utile", + "questionText": "La prévision de Time Series est utile pour", "answerOptions": [ { "answerText": "Déterminer les coûts futurs", "isCorrect": "false" }, { - "answerText": "Prédicter les prix futurs", + "answerText": "Prédire les prix futurs", "isCorrect": "false" }, { - "answerText": "à la fois ce qui précède", + "answerText": "Les deux à la fois", "isCorrect": "true" } ] }, { - "questionText": "Une série chronologique est une séquence prise à:", + "questionText": "Une série temporelles est une séquence prise à:", "answerOptions": [ { "answerText": "points successifs également espacés dans l'espace", @@ -2290,7 +2290,7 @@ ] }, { - "questionText": "La série chronologique peut être utilisée dans:", + "questionText": "La série temporelles peut être utilisée dans les cas de:", "answerOptions": [ { "answerText": "Prévision de tremblement de terre", @@ -2310,17 +2310,17 @@ }, { "id": 42, - "title": "Série introduction à TIME: quiz de validation des connaissances", + "title": "Introduction aux Time Series (séries temporelles): Quiz de validation des connaissances", "quiz": [ { - "questionText": "Tendances de la série chronologique sont", + "questionText": "Les tendances de série temporelles sont", "answerOptions": [ { - "answerText": "mesure mesurable augmente et diminue au fil du temps", + "answerText": "des augmentations et des diminutions mesurables au fil du temps", "isCorrect": "true" }, { - "answerText": "La quantification diminue au fil du temps", + "answerText": "La quantification des diminutions au fil du temps", "isCorrect": "false" }, { @@ -2330,14 +2330,14 @@ ] }, { - "questionText": "Les valeurs aberrantes sont", + "questionText": "Les valeurs aberrantes sont des", "answerOptions": [ { "answerText": "Points proches de la variance de données standard", "isCorrect": "false" }, { - "answerText": "Pointes loin de la variance de données standard", + "answerText": "Points loin de la variance de données standard", "isCorrect": "true" }, { @@ -2347,18 +2347,18 @@ ] }, { - "questionText": "La prévision de la série chronologique est la plus utile pour", + "questionText": "La prévision de la série temporelle est la plus utile pour", "answerOptions": [ { - "answerText": "Econométrics", + "answerText": "L'conométrics", "isCorrect": "true" }, { - "answerText": "Histoire", + "answerText": "L'histoire", "isCorrect": "false" }, { - "answerText": "Bibliothèques", + "answerText": "Les bibliothèques", "isCorrect": "false" } ] @@ -2367,7 +2367,7 @@ }, { "id": 43, - "title": "Série TIME ARIMA: quiz préalable", + "title": "Série TIME ARIMA: Quiz préalable", "quiz": [ { "questionText": "Arima signifie", @@ -2424,7 +2424,7 @@ }, { "id": 44, - "title": "Série TIME ARIMA: quiz de validation des connaissances", + "title": "Série TIME ARIMA: Quiz de validation des connaissances", "quiz": [ { "questionText": "Arima est utilisé pour créer un modèle adapté à la forme spéciale des données de la série chronologique", @@ -2480,7 +2480,7 @@ ] }, { "id": 45, - "title": "Renforcement 1: quiz préalable", + "title": "Renforcement 1: Quiz préalable", "quiz": [ { "questionText": "Qu'est-ce que l'apprentissage du renforcement?", @@ -2520,7 +2520,7 @@ "questionText": "Une fonction de récompense renvoie un score pour chaque état d'environnement.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "true" }, { @@ -2532,7 +2532,7 @@ ] }, { "id": 46, - "title": "Renforcement 1: quiz de validation des connaissances", + "title": "Renforcement 1: Quiz de validation des connaissances", "quiz": [ { "questionText": "Qu'est-ce que q-apprentissage?", @@ -2572,7 +2572,7 @@ "questionText": "Il valait mieux utiliser l'exploration que l'exploitation pendant le processus d'apprentissage de notre leçon.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "false" }, { @@ -2585,13 +2585,13 @@ }, { "id": 47, - "title": "Renforcement 2: quiz préalable", + "title": "Renforcement 2: Quiz préalable", "quiz": [ { "questionText": "Les échecs et les jeux sont des jeux avec des états continus.", "answerOptions": [ { - "answerText": "vrai", + "answerText": "Vrai", "isCorrect": "false" }, { @@ -2638,7 +2638,7 @@ }, { "id": 48, - "title": "Renforcement 2: quiz de validation des connaissances", + "title": "Renforcement 2: Quiz de validation des connaissances", "quiz": [ { "questionText": "Où définissons-nous toutes les actions possibles dans un environnement?", @@ -2695,7 +2695,7 @@ }, { "id": 49, - "title": "Applications du monde réel: quiz préalable", + "title": "Applications du monde réel: Quiz préalable", "quiz": [ { "questionText": "Quel est un exemple d'application ML dans l'industrie des finances?", @@ -2752,7 +2752,7 @@ }, { "id": 50, - "title": "Applications du monde réel: quiz de validation des connaissances", + "title": "Applications du monde réel: Quiz de validation des connaissances", "quiz": [ { "questionText": "Quelle technique ML peut être utilisée pour détecter la fraude par carte de crédit?", From 6277966cb81afa13415dff1b9582ddd399ad1307 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Sat, 17 Jul 2021 17:38:22 +0300 Subject: [PATCH 59/91] Add Turkish translation of the base README.md file --- translations/README.tr.md | 119 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 translations/README.tr.md diff --git a/translations/README.tr.md b/translations/README.tr.md new file mode 100644 index 00000000..fa7c6169 --- /dev/null +++ b/translations/README.tr.md @@ -0,0 +1,119 @@ +[![GitHub license](https://img.shields.io/github/license/microsoft/ML-For-Beginners.svg)](https://github.com/microsoft/ML-For-Beginners/blob/master/LICENSE) +[![GitHub contributors](https://img.shields.io/github/contributors/microsoft/ML-For-Beginners.svg)](https://GitHub.com/microsoft/ML-For-Beginners/graphs/contributors/) +[![GitHub issues](https://img.shields.io/github/issues/microsoft/ML-For-Beginners.svg)](https://GitHub.com/microsoft/ML-For-Beginners/issues/) +[![GitHub pull-requests](https://img.shields.io/github/issues-pr/microsoft/ML-For-Beginners.svg)](https://GitHub.com/microsoft/ML-For-Beginners/pulls/) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) + +[![GitHub watchers](https://img.shields.io/github/watchers/microsoft/ML-For-Beginners.svg?style=social&label=Watch)](https://GitHub.com/microsoft/ML-For-Beginners/watchers/) +[![GitHub forks](https://img.shields.io/github/forks/microsoft/ML-For-Beginners.svg?style=social&label=Fork)](https://GitHub.com/microsoft/ML-For-Beginners/network/) +[![GitHub stars](https://img.shields.io/github/stars/microsoft/ML-For-Beginners.svg?style=social&label=Star)](https://GitHub.com/microsoft/ML-For-Beginners/stargazers/) + +# Yeni Başlayanlar için Makine Öğrenimi - Bir Eğitim Programı + +> :earth_africa: Dünya kültürleri sayesinde Makine Öğrenimi'ni keşfederken dünyayı gezin :earth_africa: + +Microsoft'taki Azure Cloud Destekleyicileri tamamen **Makine Öğrenimi** hakkında olan 12 hafta ve 24 derslik eğitim programını sunmaktan memnuniyet duyar. Bu eğitim programında, kütüphane olarak temelde Scikit-learn kullanarak ve yakında çıkacak olan 'Yeni Başlayanlar için Yapay Zeka' dersinde anlatılan derin öğrenmeden uzak durarak, zaman zaman adlandırıldığı şekliyle, **klasik makine öğrenimi**ni öğreneceksiniz. Bu dersleri yakında çıkacak olan 'Yeni Başlayanlar için Veri Bilimi' eğitim programımızla da birleştirin! + +Biz bu klasik teknikleri dünyanın birçok alanından verilere uygularken bizimle dünyayı gezin. Her bir ders, ders başı ve ders sonu kısa sınavlarını, dersi tamamlamak için yazılı yönergeleri, bir çözümü, bir ödevi ve daha fazlasını içerir. Yeni becerilerin 'yerleşmesi' için kanıtlanmış bir yol olan proje temelli pedagojimiz, yaparken öğrenmenizi sağlar. + +**:writing_hand: Yazarlarımıza yürekten teşekkürler** Jen Looper, Stephen Howell, Francesca Lazzeri, Tomomi Imura, Cassie Breviu, Dmitry Soshnikov, Chris Noring, Ornella Altunyan, and Amy Boyd + +**:art: Çizerlerimize de teşekkürler** Tomomi Imura, Dasani Madipalli, and Jen Looper + + **:pray: Microsoft Student Ambassador yazarlarımıza, eleştirmenlerimize ve içeriğe katkıda bulunanlara özel teşekkürler :pray:**, özellikle Rishit Dagli, Muhammad Sakib Khan Inan, Rohan Raj, Alexandru Petrescu, Abhishek Jaiswal, Nawrin Tabassum, Ioan Samuila, and Snigdha Agarwal + +--- +# Başlarken + +**Öğrenciler**, bu eğitim programını kullanmak için, tüm yazılım havuzunu kendi GitHub hesabınıza çatallayın ve alıştırmaları kendiniz veya bir grup ile tamamlayın: + +- Bir ders öncesi kısa sınavı ile başlayın +- Her bilgi kontrolünde durup derinlemesine düşünerek dersi okuyun ve etkinlikleri tamamlayın. +- Çözüm kodunu çalıştırmaktansa dersleri kavrayarak projeleri yapmaya çalışın; yine de o çözüm kodu her proje yönelimli derste `/solution` klasörlerinde mevcut. +- Ders sonrası kısa sınavını çözün +- Meydan okumayı tamamlayın +- Ödevi tamamlayın +- Bir ders grubunu tamamladıktan sonra, [Tartışma Panosu](https://github.com/microsoft/ML-For-Beginners/discussions)'nu ziyaret edin ve uygun PAT yönergesini doldurarak "sesli öğrenin" (Yani, tamamen öğrenmeden önce öğrenme süreciniz üzerine derin düşünerek içgözlem ve geridönütlerle kendinizde farkındalık oluşturun.). 'PAT', bir Progress Assessment Tool'dur (Süreç Değerlendirme Aracı), öğrenmenizi daha ileriye taşımak için doldurduğunuz bir yönergedir. Diğer PAT'lere de karşılık verebilirsiniz, böylece beraber öğrenebiliriz. + +> İleri çalışma için, bu [Microsoft Learn](https://docs.microsoft.com/en-us/users/jenlooper-2911/collections/k7o7tg1gp306q4?WT.mc_id=academic-15963-cxa) modüllerini ve öğrenme rotalarını takip etmenizi tavsiye ediyoruz. + +**Öğretmenler**, bu eğitim programının nasıl kullanılacağı hakkında [bazı öneriler ekledik](for-teachers.md). + +--- + +## Takımla Tanışın + +[![Tanıtım videosu](ml-for-beginners.png)](https://youtu.be/Tj1XWrDSYJU "Promo video") + +> :movie_camera: Proje ve projeyi yaratanlar hakkındaki video için yukarıdaki fotoğrafa tıklayın! + +--- +## Pedagoji + +Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı **proje temelli** olduğundan ve **sık kısa sınavlar** içerdiğinden emin olmak. Ayrıca, bu eğitim programında tutarlılık sağlaması için genel bir **tema** var. + +İçeriğin projelerle uyumlu olduğuna emin olarak, süreç öğrenciler için daha ilgi çekici hale getirilmiştir ve kavramların akılda kalıcılığı artacaktır. Ayrıca, dersten önce ikincil değerli bir kısa sınav öğrencinin niyetini konuyu öğrenmek yaparken dersten sonra yapılan ikinci bir kısa sınav da akılda kalıcılığı sağlar. Bu eğitim programı esnek ve eğlenceli olacak şekilde hazırlanmıştır ve tümüyle veya kısmen işlenebilir. Projeler kolay başlar ve 12 haftalık zamanın sonuna doğru karmaşıklıkları gittikçe artar. Bu eğitim programı, Makine Öğreniminin gerçek hayattaki uygulamaları üzerine, ek puan veya tartışma için bir temel olarak kullanılabilecek bir ek yazı da içermektedir. + +> [Davranış Kuralları](CODE_OF_CONDUCT.md)'mızı, [Katkıda Bulunma](CONTRIBUTING.md) ve [Çeviri](TRANSLATIONS.md) kılavuz ilkelerimizi inceleyin. Yapıcı geridönütlerinizi memnuniyetle karşılıyoruz! +## Her ders şunları içermektedir: + +- isteğe bağlı eskiz notu +- isteğe bağlı ek video +- ders öncesi ısınma kısa sınavı +- yazılı ders +- proje temelli dersler için, projenin nasıl yapılacağına dair adım adım kılavuz +- bilgi kontrolleri +- bir meydan okuma +- ek okuma +- ödev +- ders sonrası kısa sınavı + +> **Kısa sınavlar hakkında bir not**: Her biri üç sorudan oluşan ve toplamda 50 tane olan tüm kısa sınavlar [bu uygulamada](https://jolly-sea-0a877260f.azurestaticapps.net) bulunmaktadır. Derslerin içinden de bağlantı yoluyla ulaşılabilirler ancak kısa sınav uygulaması yerelde çalıştırılabilir; `quiz-app` klasöründeki yönergeleri takip edin. + + +| Ders Numarası | Konu | Ders Gruplandırması | Öğrenme Hedefleri | Ders | Yazar | +| :-----------: | :--------------------------------------------------------: | :-------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------: | :------------: | +| 01 | Makine Öğrenimi Giriş | [Giriş](1-Introduction/README.md) | Makine öğreniminin temel kavramlarını öğrenmek | [ders](1-Introduction/1-intro-to-ML/README.md) | Muhammad | +| 02 | Makine Öğrenimi Tarihi | [Giriş](1-Introduction/README.md) | Bu alanın altında yatan tarihi öğrenmek | [ders](1-Introduction/2-history-of-ML/README.md) | Jen and Amy | +| 03 | Eşitlik ve Makine Öğrenimi | [Giriş](1-Introduction/README.md) | Öğrencilerin ML modelleri yaparken ve uygularken düşünmeleri gereken eşitlik hakkındaki önemli felsefi sorunlar nelerdir? | [ders](1-Introduction/3-fairness/README.md) | Tomomi | +| 04 | Makine Öğrenimi için Yöntemler | [Giriş](1-Introduction/README.md) | ML araştırmacıları ML modelleri üretmek için hangi yöntemleri kullanırlar? | [ders](1-Introduction/4-techniques-of-ML/README.md) | Chris and Jen | +| 05 | Regresyona Giriş | [Regresyon](2-Regression/README.md) | Regresyon modelleri için Python ve Scikit-learn'e başlamak | [ders](2-Regression/1-Tools/README.md) | Jen | +| 06 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | ML hazırlığı için verileri görselleştirmek ve temizlemek | [ders](2-Regression/2-Data/README.md) | Jen | +| 07 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | Doğrusal ve polinom regresyon modelleri yapmak | [ders](2-Regression/3-Linear/README.md) | Jen | +| 08 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | Lojistik bir regresyon modeli yapmak | [ders](2-Regression/4-Logistic/README.md) | Jen | +| 09 | Bir Web Uygulaması :electric_plug: | [Web Uygulaması](3-Web-App/README.md) | Eğittiğiniz modeli kullanmak için bir web uygulaması yapmak | [ders](3-Web-App/1-Web-App/README.md) | Jen | +| 10 | Sınıflandırmaya Giriş | [Sınıflandırma](4-Classification/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; sınıflandırmaya giriş | [ders](4-Classification/1-Introduction/README.md) | Jen and Cassie | +| 11 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Sınıflandırıcılara giriş | [ders](4-Classification/2-Classifiers-1/README.md) | Jen and Cassie | +| 12 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Daha fazla sınıflandırıcı | [ders](4-Classification/3-Classifiers-2/README.md) | Jen and Cassie | +| 13 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Modelinizi kullanarak tavsiyede bulunan bir web uygulaması yapmak | [ders](4-Classification/4-Applied/README.md) | Jen | +| 14 | Kümelemeye Giriş | [Kümeleme](5-Clustering/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; kümelemeye giriş | [ders](5-Clustering/1-Visualize/README.md) | Jen | +| 15 | Nijerya'nın Müzik Zevklerini Keşfetme :headphones: | [Kümeleme](5-Clustering/README.md) | K merkezli kümeleme yöntemini keşfetmek | [ders](5-Clustering/2-K-Means/README.md) | Jen | +| 16 | Doğal Dil İşlemeye Giriş :coffee: | [Doğal Dil İşleme](6-NLP/README.md) | Basit bir bot yaratarak NLP temellerini öğrenmek | [ders](6-NLP/1-Introduction-to-NLP/README.md) | Stephen | +| 17 | Yaygın NLP Görevleri :coffee: | [Doğal Dil İşleme](6-NLP/README.md) | Dil yapılarıyla uğraşırken gereken yaygın görevleri anlayarak NLP bilginizi derinleştirmek | [ders](6-NLP/2-Tasks/README.md) | Stephen | +| 18 | Çeviri ve Duygu Analizi :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Jane Austen ile çeviri ve duygu analizi | [ders](6-NLP/3-Translation-Sentiment/README.md) | Stephen | +| 19 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi, 1 | [ders](6-NLP/4-Hotel-Reviews-1/README.md) | Stephen | +| 20 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi 2 | [ders](6-NLP/5-Hotel-Reviews-2/README.md) | Stephen | +| 21 | Zaman Serisi Tahminine Giriş | [Zaman Serisi](7-TimeSeries/README.md) | Zaman serisi tahminine giriş | [ders](7-TimeSeries/1-Introduction/README.md) | Francesca | +| 22 | :zap: Dünya Güç Kullanımı :zap: - ARIMA ile Zaman Serisi Tahmini | [Zaman Serisi](7-TimeSeries/README.md) | ARIMA ile zaman serisi tahmini | [ders](7-TimeSeries/2-ARIMA/README.md) | Francesca | +| 23 | Pekiştirmeli Öğrenmeye Giriş | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Q-Learning ile pekiştirmeli öğrenmeye giriş | [ders](8-Reinforcement/1-QLearning/README.md) | Dmitry | +| 24 | Peter'ın Kurttan Uzak Durmasına Yardım Edin! :wolf: | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Pekiştirmeli öğrenme spor salonu | [ders](8-Reinforcement/2-Gym/README.md) | Dmitry | +| Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](9-Real-World/1-Applications/README.md) | Team | +## Çevrimdışı erişim + +Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu depoyu çatallayın, yerel makinenizde [Docsify'ı kurum](https://docsify.js.org/#/quickstart) ve sonra bu deponun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. + +## PDF'ler + +Eğitim programının bağlantılarla PDF'sine [buradan](pdf/readme.pdf) ulaşabilirsiniz. + +## Yardım İsteniyor! + +Bir çeviri katkısında bulunmak ister misiniz? Lütfen [çeviri kılavuz ilkelerimizi](TRANSLATIONS.md) okuyun ve [buraya](https://github.com/microsoft/ML-For-Beginners/issues/71) girdiyi ekleyin. + +## Diğer Eğitim Programları + +Takımımız başka eğitim programları üretiyor! İnceleyin: + +- [Yeni Başlayanlar için Web Geliştirme](https://aka.ms/webdev-beginners) +- [Yeni Başlayanlar için Nesnelerin İnterneti](https://aka.ms/iot-beginners) + From aa4ec30a6b1a5b6e253e1195589eb9f6b75dd984 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Sat, 17 Jul 2021 17:58:13 +0300 Subject: [PATCH 60/91] Update some words in the Turkish translation of base README.md --- translations/README.tr.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/translations/README.tr.md b/translations/README.tr.md index fa7c6169..2311bf67 100644 --- a/translations/README.tr.md +++ b/translations/README.tr.md @@ -10,7 +10,7 @@ # Yeni Başlayanlar için Makine Öğrenimi - Bir Eğitim Programı -> :earth_africa: Dünya kültürleri sayesinde Makine Öğrenimi'ni keşfederken dünyayı gezin :earth_africa: +> :earth_africa: Dünya kültürleri sayesinde Makine Öğrenimini keşfederken dünyayı gezin :earth_africa: Microsoft'taki Azure Cloud Destekleyicileri tamamen **Makine Öğrenimi** hakkında olan 12 hafta ve 24 derslik eğitim programını sunmaktan memnuniyet duyar. Bu eğitim programında, kütüphane olarak temelde Scikit-learn kullanarak ve yakında çıkacak olan 'Yeni Başlayanlar için Yapay Zeka' dersinde anlatılan derin öğrenmeden uzak durarak, zaman zaman adlandırıldığı şekliyle, **klasik makine öğrenimi**ni öğreneceksiniz. Bu dersleri yakında çıkacak olan 'Yeni Başlayanlar için Veri Bilimi' eğitim programımızla da birleştirin! @@ -20,7 +20,7 @@ Biz bu klasik teknikleri dünyanın birçok alanından verilere uygularken bizim **:art: Çizerlerimize de teşekkürler** Tomomi Imura, Dasani Madipalli, and Jen Looper - **:pray: Microsoft Student Ambassador yazarlarımıza, eleştirmenlerimize ve içeriğe katkıda bulunanlara özel teşekkürler :pray:**, özellikle Rishit Dagli, Muhammad Sakib Khan Inan, Rohan Raj, Alexandru Petrescu, Abhishek Jaiswal, Nawrin Tabassum, Ioan Samuila, and Snigdha Agarwal + **:pray: Microsoft Student Ambassador yazarlarımıza, eleştirmenlerimize ve içeriğe katkıda bulunanlara özel teşekkürler :pray:** özellikle Rishit Dagli, Muhammad Sakib Khan Inan, Rohan Raj, Alexandru Petrescu, Abhishek Jaiswal, Nawrin Tabassum, Ioan Samuila, and Snigdha Agarwal --- # Başlarken @@ -55,7 +55,7 @@ Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı ** İçeriğin projelerle uyumlu olduğuna emin olarak, süreç öğrenciler için daha ilgi çekici hale getirilmiştir ve kavramların akılda kalıcılığı artacaktır. Ayrıca, dersten önce ikincil değerli bir kısa sınav öğrencinin niyetini konuyu öğrenmek yaparken dersten sonra yapılan ikinci bir kısa sınav da akılda kalıcılığı sağlar. Bu eğitim programı esnek ve eğlenceli olacak şekilde hazırlanmıştır ve tümüyle veya kısmen işlenebilir. Projeler kolay başlar ve 12 haftalık zamanın sonuna doğru karmaşıklıkları gittikçe artar. Bu eğitim programı, Makine Öğreniminin gerçek hayattaki uygulamaları üzerine, ek puan veya tartışma için bir temel olarak kullanılabilecek bir ek yazı da içermektedir. > [Davranış Kuralları](CODE_OF_CONDUCT.md)'mızı, [Katkıda Bulunma](CONTRIBUTING.md) ve [Çeviri](TRANSLATIONS.md) kılavuz ilkelerimizi inceleyin. Yapıcı geridönütlerinizi memnuniyetle karşılıyoruz! -## Her ders şunları içermektedir: +## Her bir ders şunları içermektedir: - isteğe bağlı eskiz notu - isteğe bağlı ek video @@ -97,10 +97,10 @@ Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı ** | 22 | :zap: Dünya Güç Kullanımı :zap: - ARIMA ile Zaman Serisi Tahmini | [Zaman Serisi](7-TimeSeries/README.md) | ARIMA ile zaman serisi tahmini | [ders](7-TimeSeries/2-ARIMA/README.md) | Francesca | | 23 | Pekiştirmeli Öğrenmeye Giriş | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Q-Learning ile pekiştirmeli öğrenmeye giriş | [ders](8-Reinforcement/1-QLearning/README.md) | Dmitry | | 24 | Peter'ın Kurttan Uzak Durmasına Yardım Edin! :wolf: | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Pekiştirmeli öğrenme spor salonu | [ders](8-Reinforcement/2-Gym/README.md) | Dmitry | -| Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](9-Real-World/1-Applications/README.md) | Team | +| Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](9-Real-World/1-Applications/README.md) | Takım | ## Çevrimdışı erişim -Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu depoyu çatallayın, yerel makinenizde [Docsify'ı kurum](https://docsify.js.org/#/quickstart) ve sonra bu deponun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. +Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu yazılım havuzunu çatallayın, yerel makinenizde [Docsify'ı kurum](https://docsify.js.org/#/quickstart) ve sonra bu yazılım havuzunun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. ## PDF'ler From 194190f73bee3cee9c3728a46a297462578a34eb Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Sat, 17 Jul 2021 19:18:11 +0200 Subject: [PATCH 61/91] Translation of AI History README + Assignment --- .../2-history-of-ML/translations/README.fr.md | 117 ++++++++++++++++++ .../translations/assignment.fr.md | 11 ++ 2 files changed, 128 insertions(+) create mode 100644 1-Introduction/2-history-of-ML/translations/README.fr.md create mode 100644 1-Introduction/2-history-of-ML/translations/assignment.fr.md diff --git a/1-Introduction/2-history-of-ML/translations/README.fr.md b/1-Introduction/2-history-of-ML/translations/README.fr.md new file mode 100644 index 00000000..9c74b0b8 --- /dev/null +++ b/1-Introduction/2-history-of-ML/translations/README.fr.md @@ -0,0 +1,117 @@ +# Histoire du Machine Learning (apprentissage automatique) + +![Résumé de l'histoire du machine learning dans un sketchnote](../../../sketchnotes/ml-history.png) +> Sketchnote de [Tomomi Imura](https://www.twitter.com/girlie_mac) + +## [Quizz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/3/) + +Dans cette leçon, nous allons parcourir les principales étapes de l'histoire du machine learning et de l'intelligence artificielle. + +L'histoire de l'intelligence artificielle, l'IA, en tant que domaine est étroitement liée à l'histoire du machine learning, car les algorithmes et les avancées informatiques qui sous-tendent le ML alimentent le développement de l'IA. Bien que ces domaines en tant que domaines de recherches distincts ont commencé à se cristalliser dans les années 1950, il est important de rappeler que les [découvertes algorithmiques, statistiques, mathématiques, informatiques et techniques](https://wikipedia.org/wiki/Timeline_of_machine_learning) ont précédé et chevauchait cette époque. En fait, le monde réfléchit à ces questions depuis [des centaines d'années](https://fr.wikipedia.org/wiki/Histoire_de_l%27intelligence_artificielle) : cet article traite des fondements intellectuels historiques de l'idée d'une « machine qui pense ». + +## Découvertes notables + +- 1763, 1812 [théorème de Bayes](https://wikipedia.org/wiki/Bayes%27_theorem) et ses prédécesseurs. Ce théorème et ses applications sous-tendent l'inférence, décrivant la probabilité qu'un événement se produise sur la base de connaissances antérieures. +- 1805 [Théorie des moindres carrés](https://wikipedia.org/wiki/Least_squares) par le mathématicien français Adrien-Marie Legendre. Cette théorie, que vous découvrirez dans notre unité Régression, aide à l'ajustement des données. +- 1913 [Chaînes de Markov](https://wikipedia.org/wiki/Markov_chain) du nom du mathématicien russe Andrey Markov sont utilisées pour décrire une séquence d'événements possibles basée sur un état antérieur. +- 1957 [Perceptron](https://wikipedia.org/wiki/Perceptron) est un type de classificateur linéaire inventé par le psychologue américain Frank Rosenblatt qui sous-tend les progrès de l'apprentissage en profondeur. +- 1967 [Nearest Neighbor](https://wikipedia.org/wiki/Nearest_neighbor) est un algorithme conçu à l'origine pour cartographier les itinéraires. Dans un contexte ML, il est utilisé pour détecter des modèles. +- 1970 [Backpropagation](https://wikipedia.org/wiki/Backpropagation) est utilisé pour former des [réseaux de neurones feedforward (propagation avant)](https://fr.wikipedia.org/wiki/R%C3%A9seau_de_neurones_%C3%A0_propagation_avant). +- 1982 [Réseaux de neurones récurrents](https://wikipedia.org/wiki/Recurrent_neural_network) sont des réseaux de neurones artificiels dérivés de réseaux de neurones à réaction qui créent des graphes temporels. + +✅ Faites une petite recherche. Quelles autres dates sont marquantes dans l'histoire du ML et de l'IA ? + +## 1950 : Des machines qui pensent + +Alan Turing, une personne vraiment remarquable qui a été élue [par le public en 2019](https://wikipedia.org/wiki/Icons:_The_Greatest_Person_of_the_20th_Century) comme le plus grand scientifique du 20e siècle, est reconnu pour avoir aidé à jeter les bases du concept d'une "machine qui peut penser". Il a lutté avec ses opposants et son propre besoin de preuves empiriques de sa théorie en créant le [Test de Turing] (https://www.bbc.com/news/technology-18475646), que vous explorerez dans nos leçons de TALN. + +## 1956 : Projet de recherche d'été à Dartmouth + +« Le projet de recherche d'été de Dartmouth sur l'intelligence artificielle a été un événement fondateur pour l'intelligence artificielle en tant que domaine », et c'est ici que le terme « intelligence artificielle » a été inventé ([source](https://250.dartmouth.edu/highlights/artificial-intelligence-ai-coined-dartmouth)). + +> Chaque aspect de l'apprentissage ou toute autre caractéristique de l'intelligence peut en principe être décrit si précisément qu'une machine peut être conçue pour les simuler. + +Le chercheur en tête, le professeur de mathématiques John McCarthy, espérait « procéder sur la base de la conjecture selon laquelle chaque aspect de l'apprentissage ou toute autre caractéristique de l'intelligence peut en principe être décrit avec une telle précision qu'une machine peut être conçue pour les simuler ». Les participants comprenaient une autre sommité dans le domaine, Marvin Minsky. + +L'atelier est crédité d'avoir initié et encouragé plusieurs discussions, notamment « l'essor des méthodes symboliques, des systèmes spécialisés sur des domaines limités (premiers systèmes experts) et des systèmes déductifs par rapport aux systèmes inductifs ». ([source](https://fr.wikipedia.org/wiki/Conf%C3%A9rence_de_Dartmouth)). + +## 1956 - 1974 : "Les années d'or" + +Des années 50 au milieu des années 70, l'optimisme était au rendez-vous en espérant que l'IA puisse résoudre de nombreux problèmes. En 1967, Marvin Minsky a déclaré avec assurance que « Dans une génération... le problème de la création d'"intelligence artificielle" sera substantiellement résolu. » (Minsky, Marvin (1967), Computation: Finite and Infinite Machines, Englewood Cliffs, N.J.: Prentice-Hall) + +La recherche sur le traitement du langage naturel a prospéré, la recherche a été affinée et rendue plus puissante, et le concept de « micro-mondes » a été créé, où des tâches simples ont été effectuées en utilisant des instructions en langue naturelle. + +La recherche a été bien financée par les agences gouvernementales, des progrès ont été réalisés dans le calcul et les algorithmes, et des prototypes de machines intelligentes ont été construits. Certaines de ces machines incluent : + +* [Shakey le robot](https://fr.wikipedia.org/wiki/Shakey_le_robot), qui pouvait manœuvrer et décider comment effectuer des tâches « intelligemment ». + + ![Shakey, un robot intelligent](../images/shakey.jpg) + > Shaky en 1972 + +* Eliza, une des premières « chatbot », pouvait converser avec les gens et agir comme une « thérapeute » primitive. Vous en apprendrez plus sur Eliza dans les leçons de TALN. + + ![Eliza, un bot](../images/eliza.png) + > Une version d'Eliza, un chatbot + +* Le « monde des blocs » était un exemple de micro-monde où les blocs pouvaient être empilés et triés, et où des expériences d'apprentissages sur des machines, dans le but qu'elles prennent des décisions, pouvaient être testées. Les avancées réalisées avec des bibliothèques telles que [SHRDLU](https://fr.wikipedia.org/wiki/SHRDLU) ont contribué à faire avancer le traitement du langage. + + [![Monde de blocs avec SHRDLU](https://img.youtube.com/vi/QAJz4YKUwqw/0.jpg)](https://www.youtube.com/watch?v=QAJz4YKUwqw "Monde de blocs avec SHRDLU" ) + + > 🎥 Cliquez sur l'image ci-dessus pour une vidéo : Blocks world with SHRDLU + +## 1974 - 1980 : « l'hiver de l'IA » + +Au milieu des années 1970, il était devenu évident que la complexité de la fabrication de « machines intelligentes » avait été sous-estimée et que sa promesse, compte tenu de la puissance de calcul disponible, avait été exagérée. Les financements se sont taris et la confiance dans le domaine s'est ralentie. Parmi les problèmes qui ont eu un impact sur la confiance, citons : + +- **Restrictions**. La puissance de calcul était trop limitée. +- **Explosion combinatoire**. Le nombre de paramètres à former augmentait de façon exponentielle à mesure que l'on en demandait davantage aux ordinateurs, sans évolution parallèle de la puissance et de la capacité de calcul. +- **Pénurie de données**. Il y avait un manque de données qui a entravé le processus de test, de développement et de raffinement des algorithmes. +- **Posions-nous les bonnes questions ?**. Les questions mêmes, qui étaient posées, ont commencé à être remises en question. Les chercheurs ont commencé à émettre des critiques sur leurs approches : + - Les tests de Turing ont été remis en question au moyen, entre autres, de la « théorie de la chambre chinoise » qui postulait que « la programmation d'un ordinateur numérique peut faire croire qu'il comprend le langage mais ne peut pas produire une compréhension réelle ». ([source](https://plato.stanford.edu/entries/chinese-room/)) + - L'éthique de l'introduction d'intelligences artificielles telles que la "thérapeute" ELIZA dans la société a été remise en cause. + +Dans le même temps, diverses écoles de pensée sur l'IA ont commencé à se former. Une dichotomie a été établie entre les pratiques IA ["scruffy" et "neat"](https://wikipedia.org/wiki/Neats_and_scruffies). Les laboratoires _Scruffy_ peaufinaient leurs programmes pendant des heures jusqu'à ce qu'ils obtiennent les résultats souhaités. Les laboratoires _Neat_ "se concentraient sur la logique et la résolution formelle de problèmes". ELIZA et SHRDLU étaient des systèmes _scruffy_ bien connus. Dans les années 1980, alors qu'émergeait la demande de rendre les systèmes ML reproductibles, l'approche _neat_ a progressivement pris le devant de la scène car ses résultats sont plus explicables. + +## 1980 : Systèmes experts + +Au fur et à mesure que le domaine s'est développé, ses avantages pour les entreprises sont devenus plus clairs, particulièrement via les « systèmes experts » dans les années 1980. "Les systèmes experts ont été parmi les premières formes vraiment réussies de logiciels d'intelligence artificielle (IA)." ([source](https://fr.wikipedia.org/wiki/Syst%C3%A8me_expert)). + +Ce type de système est en fait _hybride_, composé en partie d'un moteur de règles définissant les exigences métier et d'un moteur d'inférence qui exploite le système de règles pour déduire de nouveaux faits. + +Cette époque a également vu une attention croissante accordée aux réseaux de neurones. + +## 1987 - 1993 : IA « Chill » + +La prolifération du matériel spécialisé des systèmes experts a eu pour effet malheureux de devenir trop spécialisée. L'essor des ordinateurs personnels a également concurrencé ces grands systèmes spécialisés et centralisés. La démocratisation de l'informatique a commencé et a finalement ouvert la voie à l'explosion des mégadonnées. + +## 1993 - 2011 + +Cette époque a vu naître une nouvelle ère pour le ML et l'IA afin de résoudre certains des problèmes qui n'avaient pu l'être plus tôt par le manque de données et de puissance de calcul. La quantité de données a commencé à augmenter rapidement et à devenir plus largement disponibles, pour le meilleur et pour le pire, en particulier avec l'avènement du smartphone vers 2007. La puissance de calcul a augmenté de façon exponentielle et les algorithmes ont évolué parallèlement. Le domaine a commencé à gagner en maturité alors que l'ingéniosité a commencé à se cristalliser en une véritable discipline. + +## À présent + +Aujourd'hui, le machine learning et l'IA touchent presque tous les aspects de notre vie. Cette ère nécessite une compréhension approfondie des risques et des effets potentiels de ces algorithmes sur les vies humaines. Comme l'a déclaré Brad Smith de Microsoft, « les technologies de l'information soulèvent des problèmes qui vont au cœur des protections fondamentales des droits de l'homme comme la vie privée et la liberté d'expression. Ces problèmes accroissent la responsabilité des entreprises technologiques qui créent ces produits. À notre avis, ils appellent également à une réglementation gouvernementale réfléchie et au développement de normes autour des utilisations acceptables" ([source](https://www.technologyreview.com/2019/12/18/102365/the-future-of-ais-impact-on-society/)). + +Reste à savoir ce que l'avenir nous réserve, mais il est important de comprendre ces systèmes informatiques ainsi que les logiciels et algorithmes qu'ils exécutent. Nous espérons que ce programme vous aidera à mieux les comprendre afin que vous puissiez décider par vous-même. + +[![L'histoire du Deep Learning](https://img.youtube.com/vi/mTtDfKgLm54/0.jpg)](https://www.youtube.com/watch?v=mTtDfKgLm54 "L'histoire du Deep Learning") +> 🎥 Cliquez sur l'image ci-dessus pour une vidéo : Yann LeCun discute de l'histoire du deep learning dans cette conférence + +--- +## 🚀Défi + +Plongez dans l'un de ces moments historiques et apprenez-en plus sur les personnes derrière ceux-ci. Il y a des personnalités fascinantes, et aucune découverte scientifique n'a jamais été créée avec un vide culturel. Que découvrez-vous ? + +## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/4/) + +## Révision et auto-apprentissage + +Voici quelques articles à regarder et à écouter : + +[Ce podcast où Amy Boyd discute de l'évolution de l'IA](http://runasradio.com/Shows/Show/739) + +[![L'histoire de l'iA par Amy Boyd](https://img.youtube.com/vi/EJt3_bFYKss/0.jpg)](https://www.youtube.com/watch?v=EJt3_bFYKss "L'histoire de l'iA par Amy Boyd") + +## Assignment + +[Créer une frise chonologique](assignment.fr.md) diff --git a/1-Introduction/2-history-of-ML/translations/assignment.fr.md b/1-Introduction/2-history-of-ML/translations/assignment.fr.md new file mode 100644 index 00000000..f1f06cb7 --- /dev/null +++ b/1-Introduction/2-history-of-ML/translations/assignment.fr.md @@ -0,0 +1,11 @@ +# Créer une frise chronologique + +## Instructions + +Utiliser [ce repo](https://github.com/Digital-Humanities-Toolkit/timeline-builder), créer une frise chronologique de certains aspects de l'histoire des algorithmes, des mathématiques, des statistiques, de l'IA ou du machine learning, ou une combinaison de ceux-ci. Vous pouvez vous concentrer sur une personne, une idée ou une longue période de réflexion. Assurez-vous d'ajouter des éléments multimédias. + +## Rubrique + +| Critères | Exemplaire | Adéquate | A améliorer | +| -------- | ---------------------------------------------------------------- | ------------------------------------ | ------------------------------------------------------------------ | +| | Une chronologie déployée est présentée sous forme de page GitHub | Le code est incomplet et non déployé | La chronologie est incomplète, pas bien recherchée et pas déployée | From 051fced33be1891a143f3dc6656b3ca8bef90853 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Sat, 17 Jul 2021 20:21:38 +0300 Subject: [PATCH 62/91] Fix file paths for images, lessons, and .md files --- translations/README.tr.md | 60 +++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/translations/README.tr.md b/translations/README.tr.md index 2311bf67..cc517004 100644 --- a/translations/README.tr.md +++ b/translations/README.tr.md @@ -37,13 +37,13 @@ Biz bu klasik teknikleri dünyanın birçok alanından verilere uygularken bizim > İleri çalışma için, bu [Microsoft Learn](https://docs.microsoft.com/en-us/users/jenlooper-2911/collections/k7o7tg1gp306q4?WT.mc_id=academic-15963-cxa) modüllerini ve öğrenme rotalarını takip etmenizi tavsiye ediyoruz. -**Öğretmenler**, bu eğitim programının nasıl kullanılacağı hakkında [bazı öneriler ekledik](for-teachers.md). +**Öğretmenler**, bu eğitim programının nasıl kullanılacağı hakkında [bazı öneriler ekledik](../for-teachers.md). --- ## Takımla Tanışın -[![Tanıtım videosu](ml-for-beginners.png)](https://youtu.be/Tj1XWrDSYJU "Promo video") +[![Tanıtım videosu](../ml-for-beginners.png)](https://youtu.be/Tj1XWrDSYJU "Promo video") > :movie_camera: Proje ve projeyi yaratanlar hakkındaki video için yukarıdaki fotoğrafa tıklayın! @@ -54,7 +54,7 @@ Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı ** İçeriğin projelerle uyumlu olduğuna emin olarak, süreç öğrenciler için daha ilgi çekici hale getirilmiştir ve kavramların akılda kalıcılığı artacaktır. Ayrıca, dersten önce ikincil değerli bir kısa sınav öğrencinin niyetini konuyu öğrenmek yaparken dersten sonra yapılan ikinci bir kısa sınav da akılda kalıcılığı sağlar. Bu eğitim programı esnek ve eğlenceli olacak şekilde hazırlanmıştır ve tümüyle veya kısmen işlenebilir. Projeler kolay başlar ve 12 haftalık zamanın sonuna doğru karmaşıklıkları gittikçe artar. Bu eğitim programı, Makine Öğreniminin gerçek hayattaki uygulamaları üzerine, ek puan veya tartışma için bir temel olarak kullanılabilecek bir ek yazı da içermektedir. -> [Davranış Kuralları](CODE_OF_CONDUCT.md)'mızı, [Katkıda Bulunma](CONTRIBUTING.md) ve [Çeviri](TRANSLATIONS.md) kılavuz ilkelerimizi inceleyin. Yapıcı geridönütlerinizi memnuniyetle karşılıyoruz! +> [Davranış Kuralları](../CODE_OF_CONDUCT.md)'mızı, [Katkıda Bulunma](../CONTRIBUTING.md) ve [Çeviri](../TRANSLATIONS.md) kılavuz ilkelerimizi inceleyin. Yapıcı geridönütlerinizi memnuniyetle karşılıyoruz! ## Her bir ders şunları içermektedir: - isteğe bağlı eskiz notu @@ -73,42 +73,42 @@ Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı ** | Ders Numarası | Konu | Ders Gruplandırması | Öğrenme Hedefleri | Ders | Yazar | | :-----------: | :--------------------------------------------------------: | :-------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------: | :------------: | -| 01 | Makine Öğrenimi Giriş | [Giriş](1-Introduction/README.md) | Makine öğreniminin temel kavramlarını öğrenmek | [ders](1-Introduction/1-intro-to-ML/README.md) | Muhammad | -| 02 | Makine Öğrenimi Tarihi | [Giriş](1-Introduction/README.md) | Bu alanın altında yatan tarihi öğrenmek | [ders](1-Introduction/2-history-of-ML/README.md) | Jen and Amy | -| 03 | Eşitlik ve Makine Öğrenimi | [Giriş](1-Introduction/README.md) | Öğrencilerin ML modelleri yaparken ve uygularken düşünmeleri gereken eşitlik hakkındaki önemli felsefi sorunlar nelerdir? | [ders](1-Introduction/3-fairness/README.md) | Tomomi | -| 04 | Makine Öğrenimi için Yöntemler | [Giriş](1-Introduction/README.md) | ML araştırmacıları ML modelleri üretmek için hangi yöntemleri kullanırlar? | [ders](1-Introduction/4-techniques-of-ML/README.md) | Chris and Jen | -| 05 | Regresyona Giriş | [Regresyon](2-Regression/README.md) | Regresyon modelleri için Python ve Scikit-learn'e başlamak | [ders](2-Regression/1-Tools/README.md) | Jen | -| 06 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | ML hazırlığı için verileri görselleştirmek ve temizlemek | [ders](2-Regression/2-Data/README.md) | Jen | -| 07 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | Doğrusal ve polinom regresyon modelleri yapmak | [ders](2-Regression/3-Linear/README.md) | Jen | -| 08 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](2-Regression/README.md) | Lojistik bir regresyon modeli yapmak | [ders](2-Regression/4-Logistic/README.md) | Jen | -| 09 | Bir Web Uygulaması :electric_plug: | [Web Uygulaması](3-Web-App/README.md) | Eğittiğiniz modeli kullanmak için bir web uygulaması yapmak | [ders](3-Web-App/1-Web-App/README.md) | Jen | -| 10 | Sınıflandırmaya Giriş | [Sınıflandırma](4-Classification/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; sınıflandırmaya giriş | [ders](4-Classification/1-Introduction/README.md) | Jen and Cassie | -| 11 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Sınıflandırıcılara giriş | [ders](4-Classification/2-Classifiers-1/README.md) | Jen and Cassie | -| 12 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Daha fazla sınıflandırıcı | [ders](4-Classification/3-Classifiers-2/README.md) | Jen and Cassie | -| 13 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](4-Classification/README.md) | Modelinizi kullanarak tavsiyede bulunan bir web uygulaması yapmak | [ders](4-Classification/4-Applied/README.md) | Jen | -| 14 | Kümelemeye Giriş | [Kümeleme](5-Clustering/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; kümelemeye giriş | [ders](5-Clustering/1-Visualize/README.md) | Jen | -| 15 | Nijerya'nın Müzik Zevklerini Keşfetme :headphones: | [Kümeleme](5-Clustering/README.md) | K merkezli kümeleme yöntemini keşfetmek | [ders](5-Clustering/2-K-Means/README.md) | Jen | -| 16 | Doğal Dil İşlemeye Giriş :coffee: | [Doğal Dil İşleme](6-NLP/README.md) | Basit bir bot yaratarak NLP temellerini öğrenmek | [ders](6-NLP/1-Introduction-to-NLP/README.md) | Stephen | -| 17 | Yaygın NLP Görevleri :coffee: | [Doğal Dil İşleme](6-NLP/README.md) | Dil yapılarıyla uğraşırken gereken yaygın görevleri anlayarak NLP bilginizi derinleştirmek | [ders](6-NLP/2-Tasks/README.md) | Stephen | -| 18 | Çeviri ve Duygu Analizi :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Jane Austen ile çeviri ve duygu analizi | [ders](6-NLP/3-Translation-Sentiment/README.md) | Stephen | -| 19 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi, 1 | [ders](6-NLP/4-Hotel-Reviews-1/README.md) | Stephen | -| 20 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi 2 | [ders](6-NLP/5-Hotel-Reviews-2/README.md) | Stephen | -| 21 | Zaman Serisi Tahminine Giriş | [Zaman Serisi](7-TimeSeries/README.md) | Zaman serisi tahminine giriş | [ders](7-TimeSeries/1-Introduction/README.md) | Francesca | -| 22 | :zap: Dünya Güç Kullanımı :zap: - ARIMA ile Zaman Serisi Tahmini | [Zaman Serisi](7-TimeSeries/README.md) | ARIMA ile zaman serisi tahmini | [ders](7-TimeSeries/2-ARIMA/README.md) | Francesca | -| 23 | Pekiştirmeli Öğrenmeye Giriş | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Q-Learning ile pekiştirmeli öğrenmeye giriş | [ders](8-Reinforcement/1-QLearning/README.md) | Dmitry | -| 24 | Peter'ın Kurttan Uzak Durmasına Yardım Edin! :wolf: | [Pekiştirmeli Öğrenme](8-Reinforcement/README.md) | Pekiştirmeli öğrenme spor salonu | [ders](8-Reinforcement/2-Gym/README.md) | Dmitry | -| Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](9-Real-World/1-Applications/README.md) | Takım | +| 01 | Makine Öğrenimi Giriş | [Giriş](../1-Introduction/README.md) | Makine öğreniminin temel kavramlarını öğrenmek | [ders](../1-Introduction/1-intro-to-ML/README.md) | Muhammad | +| 02 | Makine Öğrenimi Tarihi | [Giriş](../1-Introduction/README.md) | Bu alanın altında yatan tarihi öğrenmek | [ders](../1-Introduction/2-history-of-ML/README.md) | Jen and Amy | +| 03 | Eşitlik ve Makine Öğrenimi | [Giriş](../1-Introduction/README.md) | Öğrencilerin ML modelleri yaparken ve uygularken düşünmeleri gereken eşitlik hakkındaki önemli felsefi sorunlar nelerdir? | [ders](../1-Introduction/3-fairness/README.md) | Tomomi | +| 04 | Makine Öğrenimi için Yöntemler | [Giriş](../1-Introduction/README.md) | ML araştırmacıları ML modelleri üretmek için hangi yöntemleri kullanırlar? | [ders](../1-Introduction/4-techniques-of-ML/README.md) | Chris and Jen | +| 05 | Regresyona Giriş | [Regresyon](../2-Regression/README.md) | Regresyon modelleri için Python ve Scikit-learn'e başlamak | [ders](../2-Regression/1-Tools/README.md) | Jen | +| 06 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](../2-Regression/README.md) | ML hazırlığı için verileri görselleştirmek ve temizlemek | [ders](../2-Regression/2-Data/README.md) | Jen | +| 07 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](../2-Regression/README.md) | Doğrusal ve polinom regresyon modelleri yapmak | [ders](../2-Regression/3-Linear/README.md) | Jen | +| 08 | Kuzey Amerika balkabağı fiyatları :jack_o_lantern: | [Regresyon](../2-Regression/README.md) | Lojistik bir regresyon modeli yapmak | [ders](../2-Regression/4-Logistic/README.md) | Jen | +| 09 | Bir Web Uygulaması :electric_plug: | [Web Uygulaması](../3-Web-App/README.md) | Eğittiğiniz modeli kullanmak için bir web uygulaması yapmak | [ders](../3-Web-App/1-Web-App/README.md) | Jen | +| 10 | Sınıflandırmaya Giriş | [Sınıflandırma](../4-Classification/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; sınıflandırmaya giriş | [ders](../4-Classification/1-Introduction/README.md) | Jen and Cassie | +| 11 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](../4-Classification/README.md) | Sınıflandırıcılara giriş | [ders](../4-Classification/2-Classifiers-1/README.md) | Jen and Cassie | +| 12 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](../4-Classification/README.md) | Daha fazla sınıflandırıcı | [ders](../4-Classification/3-Classifiers-2/README.md) | Jen and Cassie | +| 13 | Leziz Asya ve Hint mutfağı :ramen: | [Sınıflandırma](../4-Classification/README.md) | Modelinizi kullanarak tavsiyede bulunan bir web uygulaması yapmak | [ders](../4-Classification/4-Applied/README.md) | Jen | +| 14 | Kümelemeye Giriş | [Kümeleme](../5-Clustering/README.md) | Verilerinizi temizlemek, hazırlamak, ve görselleştirmek; kümelemeye giriş | [ders](../5-Clustering/1-Visualize/README.md) | Jen | +| 15 | Nijerya'nın Müzik Zevklerini Keşfetme :headphones: | [Kümeleme](../5-Clustering/README.md) | K merkezli kümeleme yöntemini keşfetmek | [ders](../5-Clustering/2-K-Means/README.md) | Jen | +| 16 | Doğal Dil İşlemeye Giriş :coffee: | [Doğal Dil İşleme](../6-NLP/README.md) | Basit bir bot yaratarak NLP temellerini öğrenmek | [ders](../6-NLP/1-Introduction-to-NLP/README.md) | Stephen | +| 17 | Yaygın NLP Görevleri :coffee: | [Doğal Dil İşleme](../6-NLP/README.md) | Dil yapılarıyla uğraşırken gereken yaygın görevleri anlayarak NLP bilginizi derinleştirmek | [ders](../6-NLP/2-Tasks/README.md) | Stephen | +| 18 | Çeviri ve Duygu Analizi :hearts: | [Doğal Dil İşleme](../6-NLP/README.md) | Jane Austen ile çeviri ve duygu analizi | [ders](../6-NLP/3-Translation-Sentiment/README.md) | Stephen | +| 19 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](../6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi, 1 | [ders](../6-NLP/4-Hotel-Reviews-1/README.md) | Stephen | +| 20 | Avrupa'nın Romantik Otelleri :hearts: | [Doğal Dil İşleme](../6-NLP/README.md) | Otel değerlendirmeleriyle duygu analizi 2 | [ders](../6-NLP/5-Hotel-Reviews-2/README.md) | Stephen | +| 21 | Zaman Serisi Tahminine Giriş | [Zaman Serisi](../7-TimeSeries/README.md) | Zaman serisi tahminine giriş | [ders](../7-TimeSeries/1-Introduction/README.md) | Francesca | +| 22 | :zap: Dünya Güç Kullanımı :zap: - ARIMA ile Zaman Serisi Tahmini | [Zaman Serisi](../7-TimeSeries/README.md) | ARIMA ile zaman serisi tahmini | [ders](../7-TimeSeries/2-ARIMA/README.md) | Francesca | +| 23 | Pekiştirmeli Öğrenmeye Giriş | [Pekiştirmeli Öğrenme](../8-Reinforcement/README.md) | Q-Learning ile pekiştirmeli öğrenmeye giriş | [ders](../8-Reinforcement/1-QLearning/README.md) | Dmitry | +| 24 | Peter'ın Kurttan Uzak Durmasına Yardım Edin! :wolf: | [Pekiştirmeli Öğrenme](../8-Reinforcement/README.md) | Pekiştirmeli öğrenme spor salonu | [ders](../8-Reinforcement/2-Gym/README.md) | Dmitry | +| Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](../9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](../9-Real-World/1-Applications/README.md) | Takım | ## Çevrimdışı erişim Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu yazılım havuzunu çatallayın, yerel makinenizde [Docsify'ı kurum](https://docsify.js.org/#/quickstart) ve sonra bu yazılım havuzunun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. ## PDF'ler -Eğitim programının bağlantılarla PDF'sine [buradan](pdf/readme.pdf) ulaşabilirsiniz. +Eğitim programının bağlantılarla PDF'sine [buradan](../pdf/readme.pdf) ulaşabilirsiniz. ## Yardım İsteniyor! -Bir çeviri katkısında bulunmak ister misiniz? Lütfen [çeviri kılavuz ilkelerimizi](TRANSLATIONS.md) okuyun ve [buraya](https://github.com/microsoft/ML-For-Beginners/issues/71) girdiyi ekleyin. +Bir çeviri katkısında bulunmak ister misiniz? Lütfen [çeviri kılavuz ilkelerimizi](../TRANSLATIONS.md) okuyun ve [buraya](https://github.com/microsoft/ML-For-Beginners/issues/71) girdiyi ekleyin. ## Diğer Eğitim Programları From 42c364d5d31d7a57bf64867048afa7a650950032 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Sat, 17 Jul 2021 19:24:02 +0200 Subject: [PATCH 63/91] Remplacement de TALN par NLP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remplacer défi par challenge --- .../2-history-of-ML/translations/README.fr.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/1-Introduction/2-history-of-ML/translations/README.fr.md b/1-Introduction/2-history-of-ML/translations/README.fr.md index 9c74b0b8..78ba70cc 100644 --- a/1-Introduction/2-history-of-ML/translations/README.fr.md +++ b/1-Introduction/2-history-of-ML/translations/README.fr.md @@ -23,7 +23,7 @@ L'histoire de l'intelligence artificielle, l'IA, en tant que domaine est étroit ## 1950 : Des machines qui pensent -Alan Turing, une personne vraiment remarquable qui a été élue [par le public en 2019](https://wikipedia.org/wiki/Icons:_The_Greatest_Person_of_the_20th_Century) comme le plus grand scientifique du 20e siècle, est reconnu pour avoir aidé à jeter les bases du concept d'une "machine qui peut penser". Il a lutté avec ses opposants et son propre besoin de preuves empiriques de sa théorie en créant le [Test de Turing] (https://www.bbc.com/news/technology-18475646), que vous explorerez dans nos leçons de TALN. +Alan Turing, une personne vraiment remarquable qui a été élue [par le public en 2019](https://wikipedia.org/wiki/Icons:_The_Greatest_Person_of_the_20th_Century) comme le plus grand scientifique du 20e siècle, est reconnu pour avoir aidé à jeter les bases du concept d'une "machine qui peut penser". Il a lutté avec ses opposants et son propre besoin de preuves empiriques de sa théorie en créant le [Test de Turing] (https://www.bbc.com/news/technology-18475646), que vous explorerez dans nos leçons de NLP (TALN en français). ## 1956 : Projet de recherche d'été à Dartmouth @@ -39,7 +39,7 @@ L'atelier est crédité d'avoir initié et encouragé plusieurs discussions, not Des années 50 au milieu des années 70, l'optimisme était au rendez-vous en espérant que l'IA puisse résoudre de nombreux problèmes. En 1967, Marvin Minsky a déclaré avec assurance que « Dans une génération... le problème de la création d'"intelligence artificielle" sera substantiellement résolu. » (Minsky, Marvin (1967), Computation: Finite and Infinite Machines, Englewood Cliffs, N.J.: Prentice-Hall) -La recherche sur le traitement du langage naturel a prospéré, la recherche a été affinée et rendue plus puissante, et le concept de « micro-mondes » a été créé, où des tâches simples ont été effectuées en utilisant des instructions en langue naturelle. +La recherche sur le Natural Language Processing (traitement du langage naturel en français) a prospéré, la recherche a été affinée et rendue plus puissante, et le concept de « micro-mondes » a été créé, où des tâches simples ont été effectuées en utilisant des instructions en langue naturelle. La recherche a été bien financée par les agences gouvernementales, des progrès ont été réalisés dans le calcul et les algorithmes, et des prototypes de machines intelligentes ont été construits. Certaines de ces machines incluent : @@ -48,12 +48,12 @@ La recherche a été bien financée par les agences gouvernementales, des progr ![Shakey, un robot intelligent](../images/shakey.jpg) > Shaky en 1972 -* Eliza, une des premières « chatbot », pouvait converser avec les gens et agir comme une « thérapeute » primitive. Vous en apprendrez plus sur Eliza dans les leçons de TALN. +* Eliza, une des premières « chatbot », pouvait converser avec les gens et agir comme une « thérapeute » primitive. Vous en apprendrez plus sur Eliza dans les leçons de NLP. ![Eliza, un bot](../images/eliza.png) > Une version d'Eliza, un chatbot -* Le « monde des blocs » était un exemple de micro-monde où les blocs pouvaient être empilés et triés, et où des expériences d'apprentissages sur des machines, dans le but qu'elles prennent des décisions, pouvaient être testées. Les avancées réalisées avec des bibliothèques telles que [SHRDLU](https://fr.wikipedia.org/wiki/SHRDLU) ont contribué à faire avancer le traitement du langage. +* Le « monde des blocs » était un exemple de micro-monde où les blocs pouvaient être empilés et triés, et où des expériences d'apprentissages sur des machines, dans le but qu'elles prennent des décisions, pouvaient être testées. Les avancées réalisées avec des bibliothèques telles que [SHRDLU](https://fr.wikipedia.org/wiki/SHRDLU) ont contribué à faire avancer le natural language processing. [![Monde de blocs avec SHRDLU](https://img.youtube.com/vi/QAJz4YKUwqw/0.jpg)](https://www.youtube.com/watch?v=QAJz4YKUwqw "Monde de blocs avec SHRDLU" ) @@ -98,7 +98,7 @@ Reste à savoir ce que l'avenir nous réserve, mais il est important de comprend > 🎥 Cliquez sur l'image ci-dessus pour une vidéo : Yann LeCun discute de l'histoire du deep learning dans cette conférence --- -## 🚀Défi +## 🚀Challenge Plongez dans l'un de ces moments historiques et apprenez-en plus sur les personnes derrière ceux-ci. Il y a des personnalités fascinantes, et aucune découverte scientifique n'a jamais été créée avec un vide culturel. Que découvrez-vous ? From 0ae3500513f1f83c74612dc5a7820180bbe9d2a9 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Sat, 17 Jul 2021 23:50:37 +0200 Subject: [PATCH 64/91] Correction orthographique --- 1-Introduction/2-history-of-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/2-history-of-ML/translations/README.fr.md b/1-Introduction/2-history-of-ML/translations/README.fr.md index 78ba70cc..5debe07e 100644 --- a/1-Introduction/2-history-of-ML/translations/README.fr.md +++ b/1-Introduction/2-history-of-ML/translations/README.fr.md @@ -110,8 +110,8 @@ Voici quelques articles à regarder et à écouter : [Ce podcast où Amy Boyd discute de l'évolution de l'IA](http://runasradio.com/Shows/Show/739) -[![L'histoire de l'iA par Amy Boyd](https://img.youtube.com/vi/EJt3_bFYKss/0.jpg)](https://www.youtube.com/watch?v=EJt3_bFYKss "L'histoire de l'iA par Amy Boyd") +[![L'histoire de l'IA par Amy Boyd](https://img.youtube.com/vi/EJt3_bFYKss/0.jpg)](https://www.youtube.com/watch?v=EJt3_bFYKss "L'histoire de l'IA par Amy Boyd") -## Assignment +## Devoir [Créer une frise chonologique](assignment.fr.md) From 8d1ad5cc65ef3c0eb3e863d4a21e87d93987c3d4 Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Sat, 17 Jul 2021 23:57:51 +0200 Subject: [PATCH 65/91] Update assignment.fr.md --- 1-Introduction/2-history-of-ML/translations/assignment.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/2-history-of-ML/translations/assignment.fr.md b/1-Introduction/2-history-of-ML/translations/assignment.fr.md index f1f06cb7..c562516e 100644 --- a/1-Introduction/2-history-of-ML/translations/assignment.fr.md +++ b/1-Introduction/2-history-of-ML/translations/assignment.fr.md @@ -2,7 +2,7 @@ ## Instructions -Utiliser [ce repo](https://github.com/Digital-Humanities-Toolkit/timeline-builder), créer une frise chronologique de certains aspects de l'histoire des algorithmes, des mathématiques, des statistiques, de l'IA ou du machine learning, ou une combinaison de ceux-ci. Vous pouvez vous concentrer sur une personne, une idée ou une longue période de réflexion. Assurez-vous d'ajouter des éléments multimédias. +Utiliser [ce repo](https://github.com/Digital-Humanities-Toolkit/timeline-builder), créer une frise chronologique de certains aspects de l'histoire des algorithmes, des mathématiques, des statistiques, de l'IA ou du machine learning, ou une combinaison de ceux-ci. Vous pouvez vous concentrer sur une personne, une idée ou une longue période d'innovations. Assurez-vous d'ajouter des éléments multimédias. ## Rubrique From 645e67b6f4e19bfd18615f48c85aac48b2dc0b79 Mon Sep 17 00:00:00 2001 From: Fan Date: Sun, 18 Jul 2021 15:07:11 +0900 Subject: [PATCH 66/91] fix style mistake in 1-Introduction --- 1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md b/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md index 373602f3..318876bd 100644 --- a/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md +++ b/1-Introduction/4-techniques-of-ML/translations/README.zh-cn.md @@ -72,7 +72,7 @@ 训练过程完成后(训练大型模型可能需要多次迭代或“时期”),你将能够通过使用测试数据来衡量模型的性能来评估模型的质量。此数据是模型先前未分析的原始数据的子集。 你可以打印出有关模型质量的指标表。 -🎓 **模型拟合 ** +🎓 **模型拟合** 在机器学习的背景下,模型拟合是指模型在尝试分析不熟悉的数据时其底层功能的准确性。 From 79dca20d33b24bf1f52c5d6ea3e354603b9db195 Mon Sep 17 00:00:00 2001 From: Fan Date: Sun, 18 Jul 2021 15:13:01 +0900 Subject: [PATCH 67/91] fix style mistake in 2-Regression --- 2-Regression/1-Tools/translations/README.zh-cn.md | 4 ++-- 2-Regression/translations/README.zh-cn.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/2-Regression/1-Tools/translations/README.zh-cn.md b/2-Regression/1-Tools/translations/README.zh-cn.md index 4dff2795..41b167e3 100644 --- a/2-Regression/1-Tools/translations/README.zh-cn.md +++ b/2-Regression/1-Tools/translations/README.zh-cn.md @@ -46,7 +46,7 @@ Notebooks是一个交互式环境,允许开发人员编写代码并添加注 Jupyter服务器将以python3+启动。你会发现notebook可以“运行”的区域、代码块。你可以通过选择看起来像播放按钮的图标来运行代码块。 -2. 选择`md`图标并添加一点markdown,输入文字**#Welcome to your notebook**。 +2. 选择`md`图标并添加一点markdown,输入文字 **# Welcome to your notebook**。 接下来,添加一些Python代码。 @@ -80,7 +80,7 @@ Scikit-learn使构建模型和评估它们的使用变得简单。它主要侧 > 本教程的灵感来自Scikit-learn网站上的[线性回归示例](https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-auto-examples-linear-model-plot-ols-py)。 -在与本课程相关的_notebook.ipynb_文件中,通过点击“垃圾桶”图标清除所有单元格。 +在与本课程相关的 _notebook.ipynb_ 文件中,通过点击“垃圾桶”图标清除所有单元格。 在本节中,你将使用一个关于糖尿病的小数据集,该数据集内置于Scikit-learn中以用于学习目的。想象一下,你想为糖尿病患者测试一种治疗方法。机器学习模型可能会帮助你根据变量组合确定哪些患者对治疗反应更好。即使是非常基本的回归模型,在可视化时,也可能会显示有助于组织理论临床试验的变量信息。 diff --git a/2-Regression/translations/README.zh-cn.md b/2-Regression/translations/README.zh-cn.md index 24c7a26c..f7c511e6 100644 --- a/2-Regression/translations/README.zh-cn.md +++ b/2-Regression/translations/README.zh-cn.md @@ -6,7 +6,7 @@ ![jack-o-lantern](../images/jack-o-lanterns.jpg) > Foto oleh Beth Teutschmann di Unsplash -##你会学到什么 +## 你会学到什么 这节的课程包括机器学习领域中的多种回归模型。回归模型可以明确多种变量间的_关系_。这种模型可以用来预测类似长度、温度和年龄之类的值, 通过分析数据点来揭示变量之间的关系。 From 488fabcd6d0f2b4c4df121dc9a15e47219f1491c Mon Sep 17 00:00:00 2001 From: Colin Zang Date: Sun, 18 Jul 2021 20:43:10 +0800 Subject: [PATCH 68/91] Update README.zh-cn.md --- .../translations/README.zh-cn.md | 93 ++++++++++--------- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md index 3d122be6..e9df88a3 100644 --- a/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md +++ b/6-NLP/1-Introduction-to-NLP/translations/README.zh-cn.md @@ -1,97 +1,103 @@ # 自然语言处理介绍 -这节课讲解了*自然语言处理*简要历史和重要概念,*自然语言处理*是计算语言学的一个子领域。 +这节课讲解了 *自然语言处理* 的简要历史和重要概念,*自然语言处理*是计算语言学的一个子领域。 ## [课前测验](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/31/) ## 介绍 -众所周知,自然语言处理(Natural Language Processing, NLP)是机器学习在生产软件中应用最广泛的领域之一。 +众所周知,自然语言处理 (Natural Language Processing, NLP) 是机器学习在生产软件中应用最广泛的领域之一。 -✅你能想到哪些你日常生活中使用的软件嵌入了某些自然语言处理技术呢?你经常使用的文字处理程序或移动应用程序是否嵌入了自然语言处理技术呢? +✅ 你能想到哪些你日常生活中使用的软件可能嵌入了自然语言处理技术呢?或者,你经常使用的文字处理程序或移动应用程序中是否嵌入了自然语言处理技术呢? 你将会学习到: -- **语言的思想**. 语言的发展历程及主要研究领域. -- **定义和概念**. 你还将学习到有关计算机如何处理文本的定义和概念,包括解析、语法以及名词和动词的识别。本节课程包含一些编码任务并介绍了几个重要的概念,你将在下一节课中学习编码实现这些概念。 +- **什么是「语言」**。语言的发展历程,以及相关研究的主要领域。 +- **定义和概念**。你还将了解关于计算机文本处理的概念。包括解析 (parsing)、语法 (grammar) 以及识别名词与动词。这节课中有一些编程任务;还有一些重要概念将在以后的课程中被引入,届时你也会练习通过编程实现其它概念。 + ## 计算语言学 -计算语言学是一个经过几十年研究和发展的领域,它研究计算机如何使用语言、理解语言、翻译语言及使用语言交流。自然语言处理(NLP)是计算语言学中一个专注于计算机如何处理“自然”或人类语言的相关领域, -### 例子 - 电话号码识别 +计算语言学 (Computational Linguistics) 是一个经过几十年研究和发展的领域,它研究如何让计算机能使用、理解、翻译语言并使用语言交流。自然语言处理 (NLP) 是计算语言学中一个专注于计算机如何处理「自然的」(或者说,人类的)语言的相关领域。 + +### 举例:电话号码识别 -如果你曾经在手机上使用语音输入替代键盘输入或者向语音助手小娜提问,那么你的语音将被转录为文本形式后进行处理或者叫*解析*。被检测到的关键字最后将被处理成手机或语音助手可以理解并采取行动的格式。 +如果你曾经在手机上使用语音输入替代键盘输入,或者使用过虚拟语音助手,那么你的语音将被转录(或者叫*解析*)为文本形式后进行处理。被检测到的关键字最后将被处理成手机或语音助手可以理解并可以依此做出行为的格式。 ![comprehension](../images/comprehension.png) -> 真实的语言理解十分困难!图源:[Jen Looper](https://twitter.com/jenlooper) +> 真正意义上的语言理解很难!图源:[Jen Looper](https://twitter.com/jenlooper) + ### 这项技术是如何实现的? -有人编写了一个计算机程序来实现这项技术。几十年前,一些科幻作家预测人类很大可能会和他们的电脑对话,而电脑总是能准确地理解人类的意思。可惜的是,事实证明这是一个比许多人想象中更难实现的问题,虽然今天这个问题已经被初步解决,但在理解句子的含义时,要实现“完美”的自然语言处理仍然存在重大挑战。句子中的幽默理解或讽刺等情绪的检测是一个特别困难的问题。 +我们之所以可能完成这样的任务,是因为有人编写了一个计算机程序来实现它。几十年前,一些科幻作家预测,在未来,人类很大可能会能够他们的电脑对话,而电脑总是能准确地理解人类的意思。可惜的是,事实证明这个问题的解决比我们想象的更困难。虽然今天这个问题已经被初步解决,但在理解句子的含义时,要实现 “完美” 的自然语言处理仍然存在重大挑战 —— 理解幽默或是检测感情(比如讽刺)对于计算机来说尤其困难。 + +现在,你可能会想起课堂上老师讲解的语法。在某些国家/地区,语法和语言学知识是学生的专题课内容。但在另一些国家/地区,不管是从小学习的第一语言(学习阅读和写作),还是之后学习的第二语言中,语法及语言学知识都是作为语言的一部分教学的。所以,如果你不能很好地区分名词与动词或者区分副词与形容词,请不要担心! -此时,你可能会想起学校课堂上老师讲解的部分句子语法。在某些国家/地区,语法和语言学知识是学生的专题课内容。但在另一些国家/地区,不管是在小学时的第一语言(学习阅读和写作),或者在高年级及高中时学习的第二语言中,语法及语言学知识是作为学习语言的一部分教学的。如果你不能很好地区分名词与动词或者区分副词与形容词,请不要担心! +你还为难以区分*一般现在时*与*现在进行时*而烦恼吗?没关系的,即使是对以这门语言为母语的人在内的大多数人来说,区分它们都很有挑战性。但是,计算机非常善于应用标准的规则,你将学会编写可以像人一样"解析"句子的代码。稍后你将面对的更大挑战是理解句子的*语义*和*情绪*。 -如果你还为区分*一般现在时*与*现在进行时*而烦恼,你并不是一个人。即使是对以这门语言为母语的人在内的很多人来说这都是一项有挑战性的任务。好消息是,计算机非常善于应用标准的规则,你将学会编写可以像人一样"解析"句子的代码。稍后你将面对的更大挑战是理解句子的*语义*和*情绪*。 ## 前提 -本节教程的主要先决条件是能够阅读和理解本节教程的语言。本节中没有数学问题或方程需要解决。虽然原作者用英文写了这教程,但它也被翻译成其他语言,所以你可能在阅读翻译内容。有使用多种不同语言的示例(以比较不同语言的不同语法规则)。这些是*未*翻译的,但解释性文本是翻译内容,所以表义应当是清晰的。 +本节教程的主要先决条件是能够阅读和理解本节教程的语言。本节中没有数学问题或方程需要解决。虽然原作者用英文写了这教程,但它也被翻译成其他语言,所以你可能在阅读翻译内容。这节课的示例中涉及到很多语言种类(以比较不同语言的不同语法规则)。这些是*未*翻译的,但对它们的解释是翻译过的,所以你应该能理解它在讲什么。 -编程任务中,你将会使用Python语言,示例使用的是Python 3.8版本。 +编程任务中,你将会使用 Python 语言,示例使用的是 Python 3.8 版本。 -在本节中你将需要并使用: +在本节中你将需要并使用如下技能: -- **Python 3 理解**. Python 3中的编程语言理解,本课使用输入、循环、文件读取、数组。 -- **Visual Studio Code + 扩展**. 我们将使用 Visual Studio Code 及其 Python 扩展。你还可以使用你选择的 Python IDE。 -- **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob)是一个简化的 Python 文本处理库。按照 TextBlob 网站上的说明在您的系统上安装它(也安装语料库,如下所示): +- **Python 3**。你需要能够理解并使用 Python 3. 本课将会使用输入、循环、文件读取、数组功能。 +- **Visual Studio Code + 扩展**. 我们将使用 Visual Studio Code 及其 Python 扩展。你也可以使用你喜欢的 Python IDE。 +- **TextBlob**. [TextBlob](https://github.com/sloria/TextBlob)是一个精简的 Python 文本处理库。请按照 TextBlob 网站上的说明,在您的系统上安装它(也需要安装语料库,安装代码如下所示): - ```bash pip install -U textblob python -m textblob.download_corpora ``` -> 💡 提示:可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 +> 💡 提示:你可以在 VS Code 环境中直接运行 Python。 点击[docs](https://code.visualstudio.com/docs/languages/python?WT.mc_id=academic-15963-cxa)查看更多信息。 ## 与机器对话 -试图让计算机理解人类语言的历史可以追溯到几十年前,最早考虑自然语言处理的科学家之一是 *Alan Turing*。 +试图让计算机理解人类语言的尝试最早可以追溯到几十年前。*Alan Turing* 是最早研究自然语言处理问题的科学家之一。 + ### 图灵测试 -当图灵在1950年代研究*人工智能*时,他考虑是否可以对人和计算机进行对话测试(通过打字对应),其中对话中的人不确定他们是在与另一个人交谈还是与计算机交谈. +当图灵在 1950 年代研究*人工智能*时,他想出了这个思维实验:让人类和计算机通过打字的方式来交谈,其中人类并不知道对方是人类还是计算机。 + +如果经过一定时间的交谈,人类无法确定对方是否是计算机,那么是否可以认为计算机正在“思考”? -如果经过一定时间的交谈,人类无法确定答案是否来自计算机,那么是否可以说计算机正在“思考”? ### 灵感 - “模仿游戏” -这个想法来自一个名为 *模仿游戏* 的派对游戏,其中一名审讯者独自一人在一个房间里,负责确定两个人(在另一个房间里)是男性还是女性。审讯者可以传递笔记,并且需要想出能够揭示神秘人性别的问题。当然,另一个房间的玩家试图通过回答问题的方式来欺骗审讯者,例如误导或迷惑审讯者,同时表现出诚实回答的样子。 +这个想法来自一个名为 *模仿游戏* 的派对游戏,其中一名审讯者独自一人在一个房间里,负责确定在另一个房间里的两人的性别(男性或女性)。审讯者可以传递笔记,并且需要想出能够揭示神秘人性别的问题。当然,另一个房间的玩家也可以通过回答问题的方式来欺骗审讯者,例如用看似真诚的方式误导或迷惑审讯者。 -### Eliza的研发 +### Eliza 的研发 -在 1960 年代,一位名叫 *Joseph Weizenbaum* 的麻省理工学院科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA),Eliza是一位计算机“治疗师”,它可以向人类提出问题并表现出理解他们的答案。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”,它可能会重新排列并替换句子中的单词以形成响应“How long have **you been** sad"。 +在 1960 年代的麻省理工学院,一位名叫 *Joseph Weizenbaum* 的科学家开发了[*Eliza*](https:/wikipedia.org/wiki/ELIZA)。Eliza 是一位计算机“治疗师”,它可以向人类提出问题并让人类觉得它能理解人类的回答。然而,虽然 Eliza 可以解析句子并识别某些语法结构和关键字以给出合理的答案,但不能说它*理解*了句子。如果 Eliza 看到的句子格式为“**I am** sad”(**我很** 难过),它可能会重新排列并替换句子中的单词,回答 “How long have **you been** sad"(**你已经** 难过 多久了)。 -这给人的印象是伊丽莎理解了这句话,并在问一个后续问题,而实际上,它是在改变时态并添加一些词。如果 Eliza 无法识别它有响应的关键字,它会给出一个随机响应,该响应可以适用于许多不同的语句。 Eliza 很容易被欺骗,例如,如果用户写了**You are** a bicycle",它可能会回复"How long have **I been** a bicycle?",而不是更合理的回答。 +看起来像是 Eliza 理解了这句话,还在询问关于这句话的问题,而实际上,它只是在改变时态和添加词语。如果 Eliza 没有在回答中发现它知道如何响应的词汇,它会给出一个随机响应,该响应可以适用于许多不同的语句。 Eliza 很容易被欺骗,例如,如果用户写了 "**You are** a bicycle"(**你是** 个 自行车),它可能会回复 "How long have **I been** a bicycle?"(**我已经是** 一个 自行车 多久了?),而不是更合理的回答。 -[![Chatting with Eliza](https://img.youtube.com/vi/RMK9AphfLco/0.jpg)](https://youtu.be/RMK9AphfLco "Chatting with Eliza") +[![跟 Eliza 聊天](https://img.youtube.com/vi/RMK9AphfLco/0.jpg)](https://youtu.be/RMK9AphfLco "跟 Eliza 聊天") -> 🎥 点击上方的图片查看真实的ELIZA程序视频 +> 🎥 点击上方的图片查看关于 Eliza 原型的视频 -> 注意:如果你拥有ACM账户,你可以阅读1996年发表的[Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract)的原始介绍。或者,在[wikipedia](https://wikipedia.org/wiki/ELIZA)阅读有关 Eliza 的信息 +> 旁注:如果你拥有 ACM 账户,你可以阅读 1996 年发表的 [Eliza](https://cacm.acm.org/magazines/1966/1/13317-elizaa-computer-program-for-the-study-of-natural-language-communication-between-man-and-machine/abstract)的原始介绍。或者,在[维基百科](https://wikipedia.org/wiki/ELIZA)上阅读有关 Eliza 的信息。 -## 联系 - 编码实现一个基础的对话机器人 +## 练习 - 编程实现一个基础的对话机器人 -像 Eliza 一样的对话机器人是一个似乎可以智能地理解和响应用户输入的程序。与 Eliza 不同的是,我们的机器人不会用规则让它看起来像是在进行智能对话。取而代之的是,我们的对话机器人将只有一种能力,通过几乎在所有琐碎对话中都适用的随机响应保持对话的进行。 +像 Eliza 一样的对话机器人是一个看起来可以智能地理解和响应用户输入的程序。与 Eliza 不同的是,我们的机器人不会用规则让它看起来像是在进行智能对话。我们的对话机器人将只有一种能力:它只会通过基本上可以糊弄所有普通对话的句子来随机回答,使得谈话能够继续进行。 ### 计划 搭建聊天机器人的步骤 -1. 打印指导用户如何与机器人交互的说明 +1. 打印用户与机器人交互的使用说明 2. 开启循环 1. 获取用户输入 2. 如果用户要求退出,就退出 - 3. 处理用户输入并选择一个回答(在这个例子中,回答从一个可能的通用回答列表中随机选择) + 3. 处理用户输入并选择一个回答(在这个例子中,从回答列表中随机选择一个回答) 4. 打印回答 3. 重复步骤2 ### 构建聊天机器人 -接下来让我们构建聊天机器人。我们将从定义一些短语开始。 +接下来让我们建一个聊天机器人。我们将从定义一些短语开始。 -1. 使用以下随机响应在 Python 中自己创建此机器人: +1. 使用以下随机的回复(`random_responses`)在 Python 中自己创建此机器人: ```python random_responses = ["That is quite interesting, please tell me more.", @@ -102,7 +108,7 @@ "Did you catch the game last night?"] ``` - 以下是一些指导你的示例输出(用户输入位于以 `>` 开头的行上): + 程序运行看起来应该是这样:(用户输入位于以 `>` 开头的行上) ```output Hello, I am Marvin, the simple robot. @@ -125,18 +131,18 @@ It was nice talking to you, goodbye! ``` - 该任务的一种可能解决方案在[这里](../solution/bot.py) + 示例程序在[这里](../solution/bot.py)。这只是一种可能的解决方案。 - ✅ 停止并思考 + ✅ 停下来,思考一下 - 1. 你认为随机响应会“欺骗”某人认为机器人实际上理解他们吗? - 2. 机器人需要哪些功能才能更有效? - 3. 如果机器人真的可以“理解”一个句子的意思,它是否也需要“记住”对话中前面句子的意思? + 1. 你认为这些随机响应能够“欺骗”人类,使人类认为机器人实际上理解了他们的意思吗? + 2. 机器人需要哪些功能才能更有效的回应? + 3. 如果机器人真的可以“理解”一个句子的意思,它是否也需要“记住”前面句子的意思? --- ## 🚀挑战 -选择上面的“停止并思考”元素之一,然后尝试在代码中实现它们或使用伪代码在纸上编写解决方案。 +在上面的「停下来,思考一下」板块中选择一个问题,尝试编程实现它们,或使用伪代码在纸上编写解决方案。 在下一课中,您将了解解析自然语言和机器学习的许多其他方法。 @@ -144,7 +150,8 @@ ## 复习与自学 -看看下面的参考资料作为进一步的阅读机会。 +看看下面的参考资料作为进一步的参考阅读。 + ### 参考 1. Schubert, Lenhart, "Computational Linguistics", *The Stanford Encyclopedia of Philosophy* (Spring 2020 Edition), Edward N. Zalta (ed.), URL = . From 479ebae0be16751f333a429c994a48ef52e18fa2 Mon Sep 17 00:00:00 2001 From: Colin Zang Date: Sun, 18 Jul 2021 20:58:42 +0800 Subject: [PATCH 69/91] Create README.zh-cn.md --- 6-NLP/translations/README.zh-cn.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 6-NLP/translations/README.zh-cn.md diff --git a/6-NLP/translations/README.zh-cn.md b/6-NLP/translations/README.zh-cn.md new file mode 100644 index 00000000..db08bd08 --- /dev/null +++ b/6-NLP/translations/README.zh-cn.md @@ -0,0 +1,24 @@ +# 自然语言处理入门 + +自然语言处理 (NLP) 是人工智能的一个子领域,主要研究如何让机器理解和处理人类语言,并用它来执行拼写检查或机器翻译等任务。 + +## 本节主题:欧洲语言文学和欧洲浪漫酒店 ❤️ + +在这部分课程中,您将了解机器学习最广泛的用途之一:自然语言处理 (NLP)。源自计算语言学,这一类人工智能会通过语音或文本与人类交流,建立连接人与机器的桥梁。 + +课程中,我们将通过构建小型对话机器人来学习 NLP 的基础知识,以了解机器学习是如何使这个机器人越来越“智能”。您将穿越回 1813 年,与简·奥斯汀的经典小说 **傲慢与偏见** 中的 Elizabeth Bennett 和 Mr. Darcy 聊天(该小说于 1813 年出版)。然后,您将通过欧洲的酒店评论来进一步学习情感分析。 + +![傲慢与偏见之书,和茶](../images/p&p.jpg) +> 由 Elaine Howlin 拍摄, 来自 Unsplash + +## 课程 + +1. [自然语言处理简介](../1-Introduction-to-NLP/README.md) +2. [NLP 常见任务与技巧](../2-Tasks/README.md) +3. [机器学习翻译和情感分析](../3-Translation-Sentiment/README.md) +4. [准备数据](../4-Hotel-Reviews-1/README.md) +5. [用于情感分析的工具:NLTK](../5-Hotel-Reviews-2/README.md) + +## 作者 + +这些自然语言处理课程由 [Stephen Howell](https://twitter.com/Howell_MSFT) 用 ☕ 编写 \ No newline at end of file From 54a3eb726b273b8b955986439dd946172d193fb7 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Sun, 18 Jul 2021 16:35:47 +0300 Subject: [PATCH 70/91] Add 3 files translated to Turkish under Classification lesson --- .../1-Introduction/translations/README.tr.md | 297 ++++++++++++++++++ .../translations/assignment.tr.md | 11 + 4-Classification/translations/README.tr.md | 25 ++ 3 files changed, 333 insertions(+) create mode 100644 4-Classification/1-Introduction/translations/README.tr.md create mode 100644 4-Classification/1-Introduction/translations/assignment.tr.md create mode 100644 4-Classification/translations/README.tr.md diff --git a/4-Classification/1-Introduction/translations/README.tr.md b/4-Classification/1-Introduction/translations/README.tr.md new file mode 100644 index 00000000..9413d5f3 --- /dev/null +++ b/4-Classification/1-Introduction/translations/README.tr.md @@ -0,0 +1,297 @@ +# Sınıflandırmaya giriş + +Bu dört derste klasik makine öğreniminin temel bir odağı olan _sınıflandırma_ konusunu keşfedeceksiniz. Asya ve Hindistan'ın nefis mutfağının tamamı üzerine hazırlanmış bir veri setiyle çeşitli sınıflandırma algoritmalarını kullanmanın üzerinden geçeceğiz. Umarız açsınızdır! + +![sadece bir tutam!](../images/pinch.png) + +> Bu derslerede Pan-Asya mutfağını kutlayın! Fotoğraf [Jen Looper](https://twitter.com/jenlooper) tarafından çekilmiştir. + +Sınıflandırma, regresyon yöntemleriyle birçok ortak özelliği olan bir [gözetimli öğrenme](https://wikipedia.org/wiki/Supervised_learning) biçimidir. Eğer makine öğrenimi tamamen veri setleri kullanarak değerleri veya nesnelere verilecek isimleri öngörmekse, sınıflandırma genellikle iki gruba ayrılır: _ikili sınıflandırma_ ve _çok sınıflı sınıflandırma_. + +[![Sınıflandırmaya giriş](https://img.youtube.com/vi/eg8DJYwdMyg/0.jpg)](https://youtu.be/eg8DJYwdMyg "Introduction to classification") + +> :movie_camera: Video için yukarıdaki fotoğrafa tıklayın: MIT's John Guttag introduces classification (MIT'den John Guttag sınıflandırmayı tanıtıyor) + +Hatırlayın: + +- **Doğrusal regresyon** değişkenler arasındaki ilişkileri öngörmenize ve o doğruya ilişkili olarak yeni bir veri noktasının nereye düşeceğine dair doğru öngörülerde bulunmanıza yardımcı oluyordu. Yani, _bir balkabağının fiyatının aralık ayına göre eylül ayında ne kadar olabileceğini_ öngörebilirsiniz örneğin. +- **Lojistik regresyon** "ikili kategoriler"i keşfetmenizi sağlamıştı: bu fiyat noktasında, _bu balkabağı turuncu mudur, turuncu-değil midir?_ + +Sınıflandırma, bir veri noktasının etiketini veya sınıfını belirlemek için farklı yollar belirlemek üzere çeşitli algoritmalar kullanır. Bir grup malzemeyi gözlemleyerek kökeninin hangi mutfak olduğunu belirleyip belirleyemeyeceğimizi görmek için bu mutfak verisiyle çalışalım. + +## [Ders öncesi kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/19/) + +### Giriş + +Sınıflandırma, makine öğrenimi araştırmacısının ve veri bilimcisinin temel işlerinden biridir. İkili bir değerin temel sınıflandırmasından ("Bu e-posta gereksiz (spam) midir yoksa değil midir?") bilgisayarla görüden yararlanarak karmaşık görüntü sınıflandırma ve bölütlemeye kadar, veriyi sınıf sınıf sıralayabilmek ve soru sorabilmek daima faydalıdır. + +Süreci daha bilimsel bir yolla ifade etmek gerekirse, sınıflandırma yönteminiz, girdi bilinmeyenlerinin arasındaki ilişkiyi çıktı bilinmeyenlerine eşlemenizi sağlayan öngörücü bir model oluşturur. + +![ikili ve çok sınıflı sınıflandırma karşılaştırması](../images/binary-multiclass.png) + +> Sınıflandırma algoritmalarının başa çıkması gereken ikili ve çok sınıflı problemler. Bilgilendirme grafiği [Jen Looper](https://twitter.com/jenlooper) tarafından hazırlanmıştır. + +Verimizi temizleme, görselleştirme ve makine öğrenimi görevleri için hazırlama süreçlerine başlamadan önce, veriyi sınıflandırmak için makine öğreniminin leveraj edilebileceği çeşitli yolları biraz öğrenelim. + +[İstatistikten](https://wikipedia.org/wiki/Statistical_classification) türetilmiş olarak, klasik makine öğrenimi kullanarak sınıflandırma, _X hastalığının gelişmesi ihtimalini_ belirlemek için `smoker`, `weight`, ve `age` gibi öznitelikler kullanır. Daha önce yaptığınız regresyon alıştırmalarına benzeyen bir gözetimli öğrenme yöntemi olarak, veriniz etiketlenir ve makine öğrenimi algoritmaları o etiketleri, sınıflandırmak ve veri setinin sınıflarını (veya 'özniteliklerini') öngörmek ve onları bir gruba veya bir sonuca atamak için kullanır. + +:white_check_mark: Mutfaklarla ilgili bir veri setini biraz düşünün. Çok sınıflı bir model neyi cevaplayabilir? İkili bir model neyi cevaplayabilir? Farz edelim ki verilen bir mutfağın çemen kullanmasının muhtemel olup olmadığını belirlemek istiyorsunuz. Farzedelim ki yıldız anason, enginar, karnabahar ve bayır turpu ile dolu bir alışveriş poşetinden tipik bir Hint yemeği yapıp yapamayacağınızı görmek istiyorsunuz. + +[![Çılgın gizem sepetleri](https://img.youtube.com/vi/GuTeDbaNoEU/0.jpg)](https://youtu.be/GuTeDbaNoEU "Crazy mystery baskets") + +> :movie_camera: Video için yukarıdaki fotoğrafa tıklayın. Aşçıların rastgele malzeme seçeneklerinden yemek yaptığı 'Chopped' programının tüm olayı 'gizem sepetleri'dir. Kuşkusuz, bir makine öğrenimi modeli onlara yardımcı olurdu! + +## Merhaba 'sınıflandırıcı' + +Bu mutfak veri setiyle ilgili sormak istediğimiz soru aslında bir **çok sınıflı soru**dur çünkü elimizde farklı potansiyel ulusal mutfaklar var. Verilen bir grup malzeme için, veri bu sınıflardan hangisine uyacak? + +Scikit-learn, veriyi sınıflandırmak için kullanmak üzere, çözmek istediğiniz problem çeşidine bağlı olarak, çeşitli farklı algoritmalar sunar. Önümüzdeki iki derste, bu algoritmalardan birkaçını öğreneceksiniz. + +## Alıştırma - verinizi temizleyip dengeleyin + +Bu projeye başlamadan önce elinizdeki ilk görev, daha iyi sonuçlar almak için, verinizi temizlemek ve **dengelemek**. Bu klasördeki boş _notebook.ipynb_ dosyasıyla başlayın. + +Kurmanız gereken ilk şey [imblearn](https://imbalanced-learn.org/stable/). Bu, veriyi daha iyi dengelemenizi sağlayacak bir Scikit-learn paketidir. (Bu görev hakkında birazdan daha fazla bilgi göreceksiniz.) + +1. `imblearn` kurun, `pip install` çalıştırın, şu şekilde: + + ```python + pip install imblearn + ``` + +1. Verinizi almak ve görselleştirmek için ihtiyaç duyacağınız paketleri alın (import edin), ayrıca `imblearn` paketinden `SMOTE` alın. + + ```python + import pandas as pd + import matplotlib.pyplot as plt + import matplotlib as mpl + import numpy as np + from imblearn.over_sampling import SMOTE + ``` + + Şimdi okumak için hazırsınız, sonra veriyi alın. + +1. Sonraki görev veriyi almak olacak: + + ```python + df = pd.read_csv('../../data/cuisines.csv') + ``` + + `read_csv()` kullanmak _cusines.csv_ csv dosyasının içeriğini okuyacak ve `df` değişkenine yerleştirecek. + +1. Verinin şeklini kontrol edin: + + ```python + df.head() + ``` + + İlk beş satır şöyle görünüyor: + + ```output + | | Unnamed: 0 | cuisine | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | + | --- | ---------- | ------- | ------ | -------- | ----- | ---------- | ----- | ------------ | ------- | -------- | --- | ------- | ----------- | ---------- | ----------------------- | ---- | ---- | --- | ----- | ------ | -------- | + | 0 | 65 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 1 | 66 | indian | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 2 | 67 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 3 | 68 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | + | 4 | 69 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + ``` + +1. `info()` fonksiyonunu çağırarak bu veri hakkında bilgi edinin: + + ```python + df.info() + ``` + + Çıktınız şuna benzer: + + ```output + + RangeIndex: 2448 entries, 0 to 2447 + Columns: 385 entries, Unnamed: 0 to zucchini + dtypes: int64(384), object(1) + memory usage: 7.2+ MB + ``` + +## Alıştırma - mutfaklar hakkında bilgi edinmek + +Şimdi, işimiz daha da ilginçleşmeye başlıyor. Mutfak mutfak verinin dağılımını keşfedelim + +1. `barh()` fonksiyonunu çağırarak veriyi sütunlarla çizdirin: + + ```python + df.cuisine.value_counts().plot.barh() + ``` + + ![mutfak veri dağılımı](../images/cuisine-dist.png) + + Sonlu sayıda mutfak var, ancak verinin dağılımı düzensiz. Bunu düzeltebilirsiniz! Bunu yapmadan önce, biraz daha keşfedelim. + +1. Her mutfak için ne kadar verinin mevcut olduğunu bulun ve yazdırın: + + ```python + thai_df = df[(df.cuisine == "thai")] + japanese_df = df[(df.cuisine == "japanese")] + chinese_df = df[(df.cuisine == "chinese")] + indian_df = df[(df.cuisine == "indian")] + korean_df = df[(df.cuisine == "korean")] + + print(f'thai df: {thai_df.shape}') + print(f'japanese df: {japanese_df.shape}') + print(f'chinese df: {chinese_df.shape}') + print(f'indian df: {indian_df.shape}') + print(f'korean df: {korean_df.shape}') + ``` + + çıktı şöyle görünür: + + ```output + thai df: (289, 385) + japanese df: (320, 385) + chinese df: (442, 385) + indian df: (598, 385) + korean df: (799, 385) + ``` + +## Malzemeleri keşfetme + +Şimdi veriyi daha derinlemesine inceleyebilirsiniz ve her mutfak için tipik malzemelerin neler olduğunu öğrenebilirsiniz. Mutfaklar arasında karışıklık yaratan tekrar eden veriyi temizlemelisiniz, dolayısıyla şimdi bu problemle ilgili bilgi edinelim. + +1. Python'da, malzeme veri iskeleti yaratmak için `create_ingredient()` diye bir fonksiyon oluşturun. Bu fonksiyon, yardımcı olmayan bir sütunu temizleyerek ve sayılarına göre malzemeleri sıralayarak başlar: + + ```python + def create_ingredient_df(df): + ingredient_df = df.T.drop(['cuisine','Unnamed: 0']).sum(axis=1).to_frame('value') + ingredient_df = ingredient_df[(ingredient_df.T != 0).any()] + ingredient_df = ingredient_df.sort_values(by='value', ascending=False + inplace=False) + return ingredient_df + ``` + + Şimdi bu fonksiyonu, her mutfağın en yaygın ilk on malzemesi hakkında hakkında fikir edinmek için kullanabilirsiniz. + +1. `create_ingredient()` fonksiyonunu çağırın ve `barh()` fonksiyonunu çağırarak çizdirin: + + ```python + thai_ingredient_df = create_ingredient_df(thai_df) + thai_ingredient_df.head(10).plot.barh() + ``` + + ![Tayland](../images/thai.png) + +1. Japon verisi için de aynısını yapın: + + ```python + japanese_ingredient_df = create_ingredient_df(japanese_df) + japanese_ingredient_df.head(10).plot.barh() + ``` + + ![Japon](../images/japanese.png) + +1. Şimdi Çin malzemeleri için yapın: + + ```python + chinese_ingredient_df = create_ingredient_df(chinese_df) + chinese_ingredient_df.head(10).plot.barh() + ``` + + ![Çin](../images/chinese.png) + +1. Hint malzemelerini çizdirin: + + ```python + indian_ingredient_df = create_ingredient_df(indian_df) + indian_ingredient_df.head(10).plot.barh() + ``` + + ![Hint](../images/indian.png) + +1. Son olarak, Kore malzemelerini çizdirin: + + ```python + korean_ingredient_df = create_ingredient_df(korean_df) + korean_ingredient_df.head(10).plot.barh() + ``` + + ![Kore](../images/korean.png) + +1. Şimdi, `drop()` fonksiyonunu çağırarak, farklı mutfaklar arasında karışıklığa sebep olan en çok ortaklık taşıyan malzemeleri temizleyelim: + + Herkes pirinci, sarımsağı ve zencefili seviyor! + + ```python + feature_df= df.drop(['cuisine','Unnamed: 0','rice','garlic','ginger'], axis=1) + labels_df = df.cuisine #.unique() + feature_df.head() + ``` + +## Veri setini dengeleyin + +Veriyi temizlediniz, şimdi [SMOTE](https://imbalanced-learn.org/dev/references/generated/imblearn.over_sampling.SMOTE.html) - "Synthetic Minority Over-sampling Technique" ("Sentetik Azınlık Aşırı-Örnekleme/Örneklem-Artırma Tekniği") kullanarak dengeleyelim. + +1. `fit_resample()` fonksiyonunu çağırın, bu strateji ara değerlemeyle yeni örnekler üretir. + + ```python + oversample = SMOTE() + transformed_feature_df, transformed_label_df = oversample.fit_resample(feature_df, labels_df) + ``` + + Verinizi dengeleyerek, sınıflandırırken daha iyi sonuçlar alabileceksiniz. Bir ikili sınıflandırma düşünün. Eğer verimizin çoğu tek bir sınıfsa, bir makine öğrenimi modeli, sırf onun için daha fazla veri olduğundan o sınıfı daha sık tahmin edecektir. Veriyi dengelemek herhangi eğri veriyi alır ve bu dengesizliğin ortadan kaldırılmasına yardımcı olur. + +1. Şimdi, her bir malzeme için etiket sayısını kontrol edebilirsiniz: + + ```python + print(f'new label count: {transformed_label_df.value_counts()}') + print(f'old label count: {df.cuisine.value_counts()}') + ``` + + Çıktınız şöyle görünür: + + ```output + new label count: korean 799 + chinese 799 + indian 799 + japanese 799 + thai 799 + Name: cuisine, dtype: int64 + old label count: korean 799 + indian 598 + chinese 442 + japanese 320 + thai 289 + Name: cuisine, dtype: int64 + ``` + + Veri şimdi tertemiz, dengeli ve çok lezzetli! + +1. Son adım, dengelenmiş verinizi, etiket ve özniteliklerle beraber, yeni bir dosyaya gönderilebilecek yeni bir veri iskeletine kaydetmek: + + ```python + transformed_df = pd.concat([transformed_label_df,transformed_feature_df],axis=1, join='outer') + ``` + +1. `transformed_df.head()` ve `transformed_df.info()` fonksiyonlarını kullanarak verinize bir kez daha göz atabilirsiniz. Gelecek derslerde kullanabilmek için bu verinin bir kopyasını kaydedin: + + ```python + transformed_df.head() + transformed_df.info() + transformed_df.to_csv("../../data/cleaned_cuisine.csv") + ``` + + Bu yeni CSV şimdi kök data (veri) klasöründe görülebilir. + +--- + +## :rocket: Meydan okuma + +Bu öğretim programı farklı ilgi çekici veri setleri içermekte. `data` klasörlerini inceleyin ve ikili veya çok sınıflı sınıflandırma için uygun olabilecek veri setleri bulunduran var mı, bakın. Bu veri seti için hangi soruları sorabilirdiniz? + +## [Ders sonrası kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/20/) + +## Gözden Geçirme & Kendi Kendine Çalışma + +SMOTE'nin API'ını keşfedin. En iyi hangi durumlar için kullanılıyor? Hangi problemleri çözüyor? + +## Ödev + +[Sınıflandırma yöntemlerini keşfedin](assignment.md) diff --git a/4-Classification/1-Introduction/translations/assignment.tr.md b/4-Classification/1-Introduction/translations/assignment.tr.md new file mode 100644 index 00000000..99dfe5c2 --- /dev/null +++ b/4-Classification/1-Introduction/translations/assignment.tr.md @@ -0,0 +1,11 @@ +# Sınıflandırma yöntemlerini keşfedin + +## Yönergeler + +[Scikit-learn dokümentasyonunda](https://scikit-learn.org/stable/supervised_learning.html) veriyi sınıflandırma yöntemlerini içeren büyük bir liste göreceksiniz. Bu dokümanlar arasında ufak bir çöpçü avı yapın: Hedefiniz, sınıflandırma yöntemleri aramak ve bu eğitim programındaki bir veri seti, sorabileceğiniz bir soru ve bir sınıflandırma yöntemi eşleştirmek. Bir .doc dosyasında elektronik çizelge veya tablo hazırlayın ve veri setinin sınıflandırma algoritmasıyla nasıl çalışacağını açıklayın. + +## Rubrik + +| Ölçüt | Örnek Alınacak Nitelikte | Yeterli | Geliştirme Gerekli | +| -------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| | Bir sınıflandırma yönteminin yanısıra 5 algoritmayı inceleyen bir doküman sunulmuş. İnceleme iyi açıklanmış ve detaylı. | Bir sınıflandırma yönteminin yanısıra 5 algoritmayı inceleyen bir doküman sunulmuş. İnceleme iyi açıklanmış ve detaylı. | Bir sınıflandırma yönteminin yanısıra 3'ten az algoritmayı inceleyen bir doküman sunulmuş ve inceleme iyi açıklanmış veya detaylı değil. | diff --git a/4-Classification/translations/README.tr.md b/4-Classification/translations/README.tr.md new file mode 100644 index 00000000..dc2ed959 --- /dev/null +++ b/4-Classification/translations/README.tr.md @@ -0,0 +1,25 @@ +# Sınıflandırmaya başlarken +## Bölgesel konu: Leziz Asya ve Hint Mutfağı :ramen: + +Asya ve Hindistan'da yemek gelenekleri fazlaca çeşitlilik gösterir ve çok lezzetlidir! Malzemelerini anlamaya çalışmak için bölgesel mutfak hakkındaki verilere bakalım. + +![Taylandlı yemek satıcısı](../images/thai-food.jpg) +> Fotoğraf Lisheng Chang tarafından çekilmiştir ve Unsplash'tadır. + +## Öğrenecekleriniz + +Bu bölümde, bu eğitim programının tamamen regresyon üzerine olan ilk bölümünde öğrendiğiniz becerilere dayanıp onların üstüne beceriler ekleyeceksiniz ve verileriniz hakkında bilgi sahibi olmanızı sağlayacak diğer sınıflandırıcıları öğreneceksiniz. + +> Sınıflandırma modelleriyle çalışmayı öğrenmenizi sağlayacak faydalı düşük kodlu araçlar vardır. [Bu görev için Azure ML](https://docs.microsoft.com/learn/modules/create-classification-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa)'i deneyin. + +## Dersler + +1. [Sınıflandırmaya giriş](../1-Introduction/README.md) +2. [Daha fazla sınıflandırıcı](../2-Classifiers-1/README.md) +3. [Hatta daha fazla sınıflandırıcı](../3-Classifiers-2/README.md) +4. [Uygulamalı Makine Öğrenimi: bir web uygulaması oluşturun](../4-Applied/README.md) +## Katkıda bulunanlar + +"Sınıflandırmaya başlarken" [Cassie Breviu](https://www.twitter.com/cassieview) ve [Jen Looper](https://www.twitter.com/jenlooper) tarafından :hearts: ile yazılmıştır. + +Leziz mutfak veri seti [Kaggle](https://www.kaggle.com/hoandan/asian-and-indian-cuisines)'dan alınmıştır. From 47eba72c03526c2140409874691fbc48a0fcd2f9 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Sun, 18 Jul 2021 18:36:01 +0300 Subject: [PATCH 71/91] Fix file paths --- 4-Classification/1-Introduction/translations/README.tr.md | 6 +++--- 4-Classification/translations/README.tr.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4-Classification/1-Introduction/translations/README.tr.md b/4-Classification/1-Introduction/translations/README.tr.md index 9413d5f3..e4cc372a 100644 --- a/4-Classification/1-Introduction/translations/README.tr.md +++ b/4-Classification/1-Introduction/translations/README.tr.md @@ -19,7 +19,7 @@ Hatırlayın: Sınıflandırma, bir veri noktasının etiketini veya sınıfını belirlemek için farklı yollar belirlemek üzere çeşitli algoritmalar kullanır. Bir grup malzemeyi gözlemleyerek kökeninin hangi mutfak olduğunu belirleyip belirleyemeyeceğimizi görmek için bu mutfak verisiyle çalışalım. -## [Ders öncesi kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/19/) +## [Ders öncesi kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/19/?loc=tr) ### Giriş @@ -286,7 +286,7 @@ Veriyi temizlediniz, şimdi [SMOTE](https://imbalanced-learn.org/dev/references/ Bu öğretim programı farklı ilgi çekici veri setleri içermekte. `data` klasörlerini inceleyin ve ikili veya çok sınıflı sınıflandırma için uygun olabilecek veri setleri bulunduran var mı, bakın. Bu veri seti için hangi soruları sorabilirdiniz? -## [Ders sonrası kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/20/) +## [Ders sonrası kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/20/?loc=tr) ## Gözden Geçirme & Kendi Kendine Çalışma @@ -294,4 +294,4 @@ SMOTE'nin API'ını keşfedin. En iyi hangi durumlar için kullanılıyor? Hangi ## Ödev -[Sınıflandırma yöntemlerini keşfedin](assignment.md) +[Sınıflandırma yöntemlerini keşfedin](assignment.tr.md) diff --git a/4-Classification/translations/README.tr.md b/4-Classification/translations/README.tr.md index dc2ed959..91b74255 100644 --- a/4-Classification/translations/README.tr.md +++ b/4-Classification/translations/README.tr.md @@ -14,7 +14,7 @@ Bu bölümde, bu eğitim programının tamamen regresyon üzerine olan ilk böl ## Dersler -1. [Sınıflandırmaya giriş](../1-Introduction/README.md) +1. [Sınıflandırmaya giriş](../1-Introduction/translations/README.tr.md) 2. [Daha fazla sınıflandırıcı](../2-Classifiers-1/README.md) 3. [Hatta daha fazla sınıflandırıcı](../3-Classifiers-2/README.md) 4. [Uygulamalı Makine Öğrenimi: bir web uygulaması oluşturun](../4-Applied/README.md) From 66f2f1318827f960638fee94c3ee0617f7914dad Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Sun, 18 Jul 2021 19:34:27 +0200 Subject: [PATCH 72/91] Italian Translation - Chapter 2 correction in 2-Data --- 3-Web-App/1-Web-App/translations/README.it.md | 347 ++++++++++++++++++ .../1-Web-App/translations/assignment.it.md | 11 + 3-Web-App/translations/README.it.md | 22 ++ 3 files changed, 380 insertions(+) create mode 100644 3-Web-App/1-Web-App/translations/README.it.md create mode 100644 3-Web-App/1-Web-App/translations/assignment.it.md create mode 100644 3-Web-App/translations/README.it.md diff --git a/3-Web-App/1-Web-App/translations/README.it.md b/3-Web-App/1-Web-App/translations/README.it.md new file mode 100644 index 00000000..18e6af10 --- /dev/null +++ b/3-Web-App/1-Web-App/translations/README.it.md @@ -0,0 +1,347 @@ +# Crearere un'app web per utilizzare un modello ML + +In questa lezione, si addestrerà un modello ML su un insieme di dati fuori dal mondo: _avvistamenti di UFO nel secolo scorso_, provenienti dal [database di NUFORC](https://www.nuforc.org). + +Si imparerà: + +- Come "scapigliare" un modello addestrato +- Come usare quel modello in un'app Flask + +Si continuerà a utilizzare i notebook per pulire i dati e addestrare il modello, ma si può fare un ulteriore passo avanti esplorando il processo utilizzando un modello "in the wild", per così dire: in un'app web. + +Per fare ciò, è necessario creare un'app Web utilizzando Flask. + +## [Quiz Pre-Lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/17/) + +## Costruire un'app + +Esistono diversi modi per creare app Web per utilizzare modelli di machine learning. L'architettura web può influenzare il modo in cui il modello viene addestrato. Si immagini di lavorare in un'azienda in cui il gruppo di data science ha addestrato un modello che vogliono che venga utilizzato in un'app. + +### Considerazioni + +Ci sono molte domande da porsi: + +- **È un'app Web o un'app mobile?** Se si sta creando un'app mobile o si deve usare il modello in un contesto IoT, ci si può avvalere [di TensorFlow Lite](https://www.tensorflow.org/lite/) e usare il modello in un'app Android o iOS. +- **Dove risiederà il modello**? E' utilizzato in cloud o in locale? +- **Supporto offline**. L'app deve funzionare offline? +- **Quale tecnologia è stata utilizzata per addestrare il modello?** La tecnologia scelta può influenzare gli strumenti che è necessario utilizzare. + - **Utilizzare** TensorFlow Se si sta addestrando un modello utilizzando TensorFlow, ad esempio, tale ecosistema offre la possibilità di convertire un modello TensorFlow per l'utilizzo in un'app Web utilizzando [TensorFlow.js](https://www.tensorflow.org/js/). + - **Utilizzare PyTorch**. Se stai costruendo un modello utilizzando una libreria come PyTorch[,](https://pytorch.org/) si ha la possibilità di esportarlo in formato [ONNX](https://onnx.ai/) ( Open Neural Network Exchange) per l'utilizzo in app Web JavaScript che possono utilizzare il motore di esecuzione [Onnx](https://www.onnxruntime.ai/). Questa opzione verrà esplorata in una lezione futura per un modello addestrato da Scikit-learn + - **Utilizzo di Lobe.ai o Azure Custom vision**. Se si sta usando un sistema ML SaaS (Software as a Service) come [Lobe.ai](https://lobe.ai/) o [Azure Custom Vision](https://azure.microsoft.com/services/cognitive-services/custom-vision-service/?WT.mc_id=academic-15963-cxa) per addestrare un modello, questo tipo di software fornisce modi per esportare il modello per molte piattaforme, inclusa la creazione di un'API su misura da interrogare nel cloud dalla propria applicazione online. + +Si hai anche l'opportunità di creare un'intera app Web Flask in grado di addestrare il modello stesso in un browser Web. Questo può essere fatto anche usando TensorFlow.js in un contesto JavaScript. + +Per i nostri scopi, poiché si è lavorato con i notebook basati su Python, verranno esplorati i passaggi necessari per esportare un modello addestrato da un tale notebook in un formato leggibile da un'app Web creata in Python. + +## Strumento + +Per questa attività sono necessari due strumenti: Flask e Pickle, entrambi eseguiti su Python. + +✅ Cos'è [Flask](https://palletsprojects.com/p/flask/)? Definito come un "micro-framework" dai suoi creatori, Flask fornisce le funzionalità di base dei framework web utilizzando Python e un motore di modelli per creare pagine web. Si dia un'occhiata a [questo modulo di apprendimento](https://docs.microsoft.com/learn/modules/python-flask-build-ai-web-app?WT.mc_id=academic-15963-cxa) per esercitarsi a costruire con Flask. + +✅ Cos'è [Pickle](https://docs.python.org/3/library/pickle.html)? Pickle 🥒 è un modulo Python che serializza e de-serializza una struttura di oggetti Python. Quando si utilizza pickle in un modello, si serializza o si appiattisce la sua struttura per l'uso sul web. Cautela: pickle non è intrinsecamente sicuro, quindi si faccia attenzione se viene chiesto di de-serializzare un file. Un file creato con pickle ha il suffisso `.pkl`. + +## Esercizio: pulire i dati + +In questa lezione verranno utilizzati i dati di 80.000 avvistamenti UFO, raccolti da [NUFORC](https://nuforc.org) (The National UFO Reporting Center). Questi dati hanno alcune descrizioni interessanti di avvistamenti UFO, ad esempio: + +- **Descrizione di esempio lunga**. "Un uomo emerge da un raggio di luce che di notte brilla su un campo erboso e corre verso il parcheggio della Texas Instruments". +- **Descrizione di esempio breve**. "le luci ci hanno inseguito". + +Il [foglio](./data/ufos.csv) di calcolo ufos.csv include colonne sulla `città`, `lo stato` e il `paese` in cui è avvenuto l'avvistamento, la `forma dell'oggetto e la` sua `latitudine` e `longitudine`. + +Nel [notebook](notebook.ipynb) vuoto incluso in questa lezione: + +1. importare `pandas`, `matplotlib` e numpy `come` fatto nelle lezioni precedenti e importare il foglio di calcolo ufos. Si può dare un'occhiata a un insieme di dati di esempio: + + ```python + import pandas as pd + import numpy as np + + ufos = pd.read_csv('../data/ufos.csv') + ufos.head() + ``` + +1. Convertire i dati ufos in un piccolo dataframe con nuove intestazioni Controllare i valori univoci nel campo `Country` . + + ```python + ufos = pd.DataFrame({'Seconds': ufos['duration (seconds)'], 'Country': ufos['country'],'Latitude': ufos['latitude'],'Longitude': ufos['longitude']}) + + ufos.Country.unique() + ``` + +1. Ora si può ridurre la quantità di dati da gestire eliminando qualsiasi valore nullo e importando solo avvistamenti tra 1-60 secondi: + + ```python + ufos.dropna(inplace=True) + + ufos = ufos[(ufos['Seconds'] >= 1) & (ufos['Seconds'] <= 60)] + + ufos.info() + ``` + +1. Importare la libreria LabelEncoder `di` Scikit-learn per convertire i valori di testo per i paesi in un numero: + + ✅ LabelEncoder codifica i dati in ordine alfabetico + + ```python + from sklearn.preprocessing import LabelEncoder + + ufos['Country'] = LabelEncoder().fit_transform(ufos['Country']) + + ufos.head() + ``` + + I dati dovrebbero assomigliare a questo: + + ```output + Seconds Country Latitude Longitude + 2 20.0 3 53.200000 -2.916667 + 3 20.0 4 28.978333 -96.645833 + 14 30.0 4 35.823889 -80.253611 + 23 60.0 4 45.582778 -122.352222 + 24 3.0 3 51.783333 -0.783333 + ``` + +## Esercizio: costruire il proprio modello + +Ora ci si può preparare per addestrare un modello portando i dati nel gruppo di addestramento e test. + +1. Selezionare le tre caratteristiche su cui lo si vuole allenare come vettore X mentre il vettore y sarà `Country` Se deve essere in grado di inserire `Secondi`, `Latitudine` e `Longitudine` e ottenere un ID nazione da restituire. + + ```python + from sklearn.model_selection import train_test_split + + Selected_features = ['Seconds','Latitude','Longitude'] + + X = ufos[Selected_features] + y = ufos['Country'] + + X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0) + ``` + +1. Addestrare il modello usando la regressione logistica: + + ```python + from sklearn.metrics import accuracy_score, classification_report + from sklearn.linear_model import LogisticRegression + model = LogisticRegression() + model.fit(X_train, y_train) + predictions = model.predict(X_test) + + print(classification_report(y_test, predictions)) + print('Predicted labels: ', predictions) + print('Accuracy: ', accuracy_score(y_test, predictions)) + ``` + +La precisione non è male **(circa il 95%)**, non sorprende che `Country` e `Latitude/Longitude` siano correlati. + +Il modello creato non è molto rivoluzionario in quanto si dovrebbe essere in grado di dedurre una `nazione` dalla sua `latitudine` e `longitudine`, ma è un buon esercizio provare ad allenare dai dati grezzi che sono stati puliti ed esportati, e quindi utilizzare questo modello in una app web. + +## Esercizio: usare pickle con il modello + +Ora è il momento di utilizzare pickle _con_ il modello! Lo si può fare in poche righe di codice. Una volta che è stato serializzato con pickle_,_ caricare il modello e testarlo rispetto a un array di dati di esempio contenente valori per secondi, latitudine e longitudine, + +```python +import pickle +model_filename = 'ufo-model.pkl' +pickle.dump(model, open(model_filename,'wb')) + +model = pickle.load(open('ufo-model.pkl','rb')) +print(model.predict([[50,44,-12]])) +``` + +Il modello restituisce **"3"**, che è il codice paese per il Regno Unito. Jolly 👽 + +## Esercizio: creare un'app Flask + +Ora si può creare un'app Flask per chiamare il modello e restituire risultati simili, ma in un modo visivamente più gradevole. + +1. Iniziare creando una cartella chiamata web-app **a** livello del _file_ notebook.ipynb dove risiede _il_ file ufo-model.pkl. + +1. In quella cartella creare altre tre cartelle: **static**, con una cartella **css** al suo interno e **templates**. Ora si dovrebbero avere i seguenti file e directory: + + ```output + web-app/ + static/ + css/ + templates/ + notebook.ipynb + ufo-model.pkl + ``` + + ✅ Fare riferimento alla cartella della soluzione per una visualizzazione dell'app finita + +1. Il primo file da creare nella cartella dell'_app_ Web è **il** file requirements.txt. Come _package.json_ in un'app JavaScript, questo file elenca le dipendenze richieste dall'app. In **requirements.txt** aggiungere le righe: + + ```text + scikit-learn + pandas + numpy + flask + ``` + +1. Ora, eseguire questo file portandosi su _web-app_: + + ```bash + cd web-app + ``` + +1. Aprire una finestra di terminale dove risiede requirements.txt e digitare `pip install`, per installare le librerie elencate in _reuirements.txt_: + + ```bash + pip install -r requirements.txt + ``` + +1. Ora si è pronti per creare altri tre file per completare l'app: + + 1. Crea **app.py** nella directory radice + 2. Creare **index.html** nella directory _templates_ . + 3. Crea **sytles.css** nella directory _static/css_ . + +1. Inserire nel _file_ styles.css alcuni stili: + + ```css + body { + width: 100%; + height: 100%; + font-family: 'Helvetica'; + background: black; + color: #fff; + text-align: center; + letter-spacing: 1.4px; + font-size: 30px; + } + + input { + min-width: 150px; + } + + .grid { + width: 300px; + border: 1px solid #2d2d2d; + display: grid; + justify-content: center; + margin: 20px auto; + } + + .box { + color: #fff; + background: #2d2d2d; + padding: 12px; + display: inline-block; + } + ``` + +1. Quindi, creare il file _index.html_ : + + ```html + + + + + 🛸 UFO Appearance Prediction! 👽 + + + + +
+ +
+ +

According to the number of seconds, latitude and longitude, which country is likely to have reported seeing a UFO?

+ +
+ + + + +
+ + +

{{ prediction_text }}

+ +
+
+ + + + ``` + + Dare un'occhiata al modello in questo file. Notare la sintassi con le parentesi graffe attorno alle variabili che verranno fornite dall'app, come il testo di previsione: `{{}}`. C'è anche un modulo che invia una previsione al percorso `/` predict. + + Infine, si è pronti per creare il file python che guida il consumo del modello e la visualizzazione delle previsioni: + +1. In `app.py` aggiungere: + + ```python + import numpy as np + from flask import Flask, request, render_template + import pickle + + app = Flask(__name__) + + model = pickle.load(open("../ufo-model.pkl", "rb")) + + + @app.route("/") + def home(): + return render_template("index.html") + + + @app.route("/predict", methods=["POST"]) + def predict(): + + int_features = [int(x) for x in request.form.values()] + final_features = [np.array(int_features)] + prediction = model.predict(final_features) + + output = prediction[0] + + countries = ["Australia", "Canada", "Germany", "UK", "US"] + + return render_template( + "index.html", prediction_text="Likely country: {}".format(countries[output]) + ) + + + if __name__ == "__main__": + app.run(debug=True) + ``` + + > 💡 Suggerimento: quando si aggiunge [`debug=True`](https://www.askpython.com/python-modules/flask/flask-debug-mode) durante l'esecuzione dell'app Web utilizzando Flask, qualsiasi modifica apportata all'applicazione verrà applicata immediatamente senza la necessità di riavviare il server. Attenzione! Non abilitare questa modalità in un'app di produzione. + +Se si esegue `python app.py` o `python3 app.py` , il server web si avvia, localmente, e si può compilare un breve modulo per ottenere una risposta alla domanda scottante su dove sono stati avvistati gli UFO! + +Prima di farlo, dare un'occhiata alle parti di `app.py`: + +1. Innanzitutto, le dipendenze vengono caricate e l'app si avvia. +1. Quindi, il modello viene importato. +1. Quindi, index.html viene visualizzato sulla rotta home. + +Sulla rotta `/predict` , accadono diverse cose quando il modulo viene inviato: + +1. Le variabili del modulo vengono raccolte e convertite in un array numpy. Vengono quindi inviati al modello e viene restituita una previsione. +2. Le nazioni che si vogliono visualizzare vengono nuovamente esposte come testo leggibile dal loro codice paese previsto e tale valore viene inviato a index.html per essere visualizzato nel modello. + +Usare un modello in questo modo, con Flask e un modello serializzato è relativamente semplice. La cosa più difficile è capire che forma hanno i dati che devono essere inviati al modello per ottenere una previsione. Tutto dipende da come è stato addestrato il modello. Questo ha tre punti dati da inserire per ottenere una previsione. + +In un ambiente professionale, si può vedere quanto sia necessaria una buona comunicazione tra le persone che addestrano il modello e coloro che lo consumano in un'app Web o mobile. In questo caso, si ricoprono entrambi i ruoli! + +--- + +## 🚀 Sfida + +Invece di lavorare su un notebook e importare il modello nell'app Flask, si può addestrare il modello direttamente nell'app Flask! Provare a convertire il codice Python nel notebook, magari dopo che i dati sono stati puliti, per addestrare il modello dall'interno dell'app su un percorso chiamato /`train`. Quali sono i pro e i contro di seguire questo metodo? + +## [Quiz post-lezione](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/18/) + +## Revisione e Auto Apprendimento + +Esistono molti modi per creare un'app Web per utilizzare i modelli ML. Elencare dei modi in cui si potrebbe utilizzare JavaScript o Python per creare un'app Web per sfruttare machine learning. Considerare l'architettura: il modello dovrebbe rimanere nell'app o risiedere nel cloud? Se quest'ultimo, come accedervi? Disegnare un modello architettonico per una soluzione web ML applicata. + +## Compito + +[Provare un modello diverso](assignment.md) + + diff --git a/3-Web-App/1-Web-App/translations/assignment.it.md b/3-Web-App/1-Web-App/translations/assignment.it.md new file mode 100644 index 00000000..21a1b804 --- /dev/null +++ b/3-Web-App/1-Web-App/translations/assignment.it.md @@ -0,0 +1,11 @@ +# Provare un modello diverso + +## Istruzioni + +Ora che si è creato un'app Web utilizzando un modello di regressione addestrato, usare uno dei modelli di una lezione precedente sulla regressione per ripetere questa app Web. Si può mantenere lo stile o progettarla in modo diverso per riflettere i dati della zucca. Fare attenzione a modificare gli input in modo che riflettano il metodo di addestramento del proprio modello. + +## Rubrica + +| Criteri | Ottimo | Adeguato | Necessita miglioramento | +| -------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | -------------------------------------- | +| | L'app Web funziona come previsto e viene distribuita nel cloud | L'app Web contiene difetti o mostra risultati imprevisti | L'app web non funziona correttamente | diff --git a/3-Web-App/translations/README.it.md b/3-Web-App/translations/README.it.md new file mode 100644 index 00000000..52d9c5ec --- /dev/null +++ b/3-Web-App/translations/README.it.md @@ -0,0 +1,22 @@ +# Creare un'app Web per utilizzare il modello ML + +In questa sezione del programma di studi, verrà presentato un argomento ML applicato: come salvare il modello di Scikit-learn come file che può essere utilizzato per fare previsioni all'interno di un'applicazione web. Una volta salvato il modello, si imparerà come utilizzarlo in un'app Web integrata in Flask. Per prima cosa si creerà un modello utilizzando alcuni dati che riguardano gli avvistamenti di UFO! Quindi, si creerà un'app Web che consentirà di inserire un numero di secondi con un valore di latitudine e longitudine per prevedere quale paese ha riferito di aver visto un UFO. + +![Parcheggio UFO](images/ufo.jpg) + +Foto di Michael Herren su Unsplash + + +## Lezioni + +1. [Costruire un'app Web](1-Web-App/README.md) + +## Crediti + +"Costruire un'app web" è stato scritto con ♥️ da [Jen Looper](https://twitter.com/jenlooper). + +♥️ I quiz sono stati scritti da Rohan Raj. + +L'insieme di dati proviene da [Kaggle](https://www.kaggle.com/NUFORC/ufo-sightings). + +L'architettura dell'app web è stata suggerita in parte da [questo articolo](https://towardsdatascience.com/how-to-easily-deploy-machine-learning-models-using-flask-b95af8fe34d4) e da [questo](https://github.com/abhinavsagar/machine-learning-deployment) repository di Abhinav Sagar. \ No newline at end of file From 889e697dac61751545e9be35aec744fecc785981 Mon Sep 17 00:00:00 2001 From: Roberto Pauletto Date: Sun, 18 Jul 2021 19:37:32 +0200 Subject: [PATCH 73/91] Italian Translation - Chapter 2 sentence modified in 2-Data --- 2-Regression/2-Data/translations/README.it.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-Regression/2-Data/translations/README.it.md b/2-Regression/2-Data/translations/README.it.md index 3a67cdea..7b78ac52 100644 --- a/2-Regression/2-Data/translations/README.it.md +++ b/2-Regression/2-Data/translations/README.it.md @@ -171,7 +171,7 @@ Provare a creare alcuni grafici di base per visualizzare il nuovo dataframe appe ### Renderlo utile -Per fare in modo che i grafici mostrino dati utili, di solito è necessario raggruppare i dati in qualche modo. Si prova a creare un grafico in cui l'asse y mostra i prezzi e l'asse x mostra la distribuzione dei dati raggruppati per mese. +Per fare in modo che i grafici mostrino dati utili, di solito è necessario raggruppare i dati in qualche modo. Si prova a creare un grafico che mostra la distribuzione dei dati dove l'asse x mostra i mesi. 1. Aggiungere una cella per creare un grafico a barre raggruppato: From 9628c457b884ecd79af96a32537107f701587b1d Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Sun, 18 Jul 2021 21:23:45 +0200 Subject: [PATCH 74/91] Update README.fr.md --- 1-Introduction/2-history-of-ML/translations/README.fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/2-history-of-ML/translations/README.fr.md b/1-Introduction/2-history-of-ML/translations/README.fr.md index 5debe07e..66132162 100644 --- a/1-Introduction/2-history-of-ML/translations/README.fr.md +++ b/1-Introduction/2-history-of-ML/translations/README.fr.md @@ -114,4 +114,4 @@ Voici quelques articles à regarder et à écouter : ## Devoir -[Créer une frise chonologique](assignment.fr.md) +[Créer une frise chronologique](assignment.fr.md) From f8f4ceacf499aae9cadd26d9e6b8bba788c41d2f Mon Sep 17 00:00:00 2001 From: fribble186 Date: Mon, 19 Jul 2021 16:12:43 +0800 Subject: [PATCH 75/91] Translated 2-Regression assignment.md into Simplified Chinese --- .../1-Tools/translations/assignment.zh-cn.md | 14 ++++++++++++++ .../2-Data/translations/assignment.zh-cn.md | 9 +++++++++ .../3-Linear/translations/assignment.zh-cn.md | 12 ++++++++++++ .../4-Logistic/translations/assignment.zh-cn.md | 11 +++++++++++ 4 files changed, 46 insertions(+) create mode 100644 2-Regression/1-Tools/translations/assignment.zh-cn.md create mode 100644 2-Regression/2-Data/translations/assignment.zh-cn.md create mode 100644 2-Regression/3-Linear/translations/assignment.zh-cn.md create mode 100644 2-Regression/4-Logistic/translations/assignment.zh-cn.md diff --git a/2-Regression/1-Tools/translations/assignment.zh-cn.md b/2-Regression/1-Tools/translations/assignment.zh-cn.md new file mode 100644 index 00000000..c296c8ca --- /dev/null +++ b/2-Regression/1-Tools/translations/assignment.zh-cn.md @@ -0,0 +1,14 @@ +# 用 Scikit-learn 实现一次回归算法 + +## 说明 + +先看看 Scikit-learn 中的 [Linnerud 数据集](https://scikit-learn.org/stable/modules/generated/sklearn.datasets.load_linnerud.html#sklearn.datasets.load_linnerud) +这个数据集中有多个[目标变量(target)](https://scikit-learn.org/stable/datasets/toy_dataset.html#linnerrud-dataset),其中包含了三种运动(训练数据)和三个生理指标(目标变量)组成,这些数据都是从一个健身俱乐部中的20名中年男子收集到的。 + +之后用自己的方式,创建一个可以描述腰围和完成仰卧起坐个数关系的回归模型。用同样的方式对这个数据集中的其它数据也建立一下模型探究一下其中的关系。 + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| ------------------------------ | ----------------------------------- | ----------------------------- | -------------------------- | +| 需要提交一段能描述数据集中关系的文字 | 很好的描述了数据集中的关系 | 只能描述少部分的关系 | 啥都没有提交 | diff --git a/2-Regression/2-Data/translations/assignment.zh-cn.md b/2-Regression/2-Data/translations/assignment.zh-cn.md new file mode 100644 index 00000000..e9c0f1c2 --- /dev/null +++ b/2-Regression/2-Data/translations/assignment.zh-cn.md @@ -0,0 +1,9 @@ +# 探索数据可视化 + +有好几个库都可以进行数据可视化。用 matplotlib 和 seaborn 对本课中涉及的 Pumpkin 数据集创建一些数据可视化的图标。并思考哪个库更容易使用? + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| -------- | --------- | -------- | ----------------- | +| | 提交了含有两种探索可视化方法的notebook工程文件 | 提交了只包含有一种探索可视化方法的notebook工程文件 | 没提交 notebook 工程文件 | diff --git a/2-Regression/3-Linear/translations/assignment.zh-cn.md b/2-Regression/3-Linear/translations/assignment.zh-cn.md new file mode 100644 index 00000000..e9c476c3 --- /dev/null +++ b/2-Regression/3-Linear/translations/assignment.zh-cn.md @@ -0,0 +1,12 @@ +# 创建自己的回归模型 + +## 说明 + +在这节课中你学到了如何用线性回归和多项式回归建立一个模型。利用这些只是,找到一个你感兴趣的数据集或者是 Scikit-learn 内置的数据集来建立一个全新的模型。用你的 notebook 来解释为什么用了这种技术来对这个数据集进行建模,并且证明出你的模型的准确度。如果它没你想象中准确,请思考一下并解释一下原因。 + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| -------- | ------------------------------------------------------------ | -------------------------- | ------------------------------- | +| | 提交了一个完整的 notebook 工程文件,其中包含了解集,并且可读性良好 | 不完整的解集 | 解集是有缺陷或者有错误的 | + diff --git a/2-Regression/4-Logistic/translations/assignment.zh-cn.md b/2-Regression/4-Logistic/translations/assignment.zh-cn.md new file mode 100644 index 00000000..8dc55af3 --- /dev/null +++ b/2-Regression/4-Logistic/translations/assignment.zh-cn.md @@ -0,0 +1,11 @@ +# 再探回归模型 + +## 说明 + +在这节课中,你使用了 pumpkin 数据集的子集。现在,让我们回到原始数据,并尝试使用所有数据。经过了数据清理和标准化,建立一个逻辑回归模型。 + +## 评判标准 + +| 标准 | 优秀 | 中规中矩 | 仍需努力 | +| -------- | ----------------------------------------------------------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | +| | 用notebook呈现了一个解释性和性能良好的模型 | 用notebook呈现了一个性能一般的模型 | 用notebook呈现了一个性能差的模型或根本没有模型 | From fafbd6b2b44d35dac162390ed37aed84e433303b Mon Sep 17 00:00:00 2001 From: Foo-x Date: Mon, 19 Jul 2021 18:39:02 +0900 Subject: [PATCH 76/91] fix: typo --- 1-Introduction/1-intro-to-ML/translations/README.ja.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.ja.md b/1-Introduction/1-intro-to-ML/translations/README.ja.md index aded0f7e..1107739c 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.ja.md +++ b/1-Introduction/1-intro-to-ML/translations/README.ja.md @@ -98,7 +98,7 @@ AI、ML、深層学習、データサイエンスの違いについて理解し ## 振り返りと自習 -クラウド上でMLアルゴリズムをどのように扱うことができるかについては、この[ラーニングパス](https://docs.microsoft.com/learn/paths/create-no-code-predictive-models-azure-machine-learning/?WT.mc_id=academic-15963-cxa)に従ってください。. +クラウド上でMLアルゴリズムをどのように扱うことができるかについては、この[ラーニングパス](https://docs.microsoft.com/learn/paths/create-no-code-predictive-models-azure-machine-learning/?WT.mc_id=academic-15963-cxa)に従ってください。 ## 課題 From 48590a589ecae9cb929bfe5a6d52740eec40b79b Mon Sep 17 00:00:00 2001 From: manusquall Date: Mon, 19 Jul 2021 10:35:08 +0000 Subject: [PATCH 77/91] finish the fr.json translation proposition --- quiz-app/src/assets/translations/fr.json | 156 +++++++++++------------ 1 file changed, 78 insertions(+), 78 deletions(-) diff --git a/quiz-app/src/assets/translations/fr.json b/quiz-app/src/assets/translations/fr.json index 3ec4ec9e..80b55749 100644 --- a/quiz-app/src/assets/translations/fr.json +++ b/quiz-app/src/assets/translations/fr.json @@ -415,7 +415,7 @@ "isCorrect": "true" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1033,7 +1033,7 @@ "questionText": "La classification est une forme d'apprentissage supervisé qui a beaucoup en commun avec", "answerOptions": [ { - "answerText": "Série temporelle", + "answerText": "Série chronologique", "isCorrect": "false" }, { @@ -1164,7 +1164,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1213,7 +1213,7 @@ "questionText": "Quel classificateur avons-nous utilisé dans cette leçon?", "answerOptions": [ { - "answerText": "régression logistique", + "answerText": "Régression logistique", "isCorrect": "true" }, { @@ -1221,7 +1221,7 @@ "isCorrect": "false" }, { - "answerText": "MultiClass one-vs-tout", + "answerText": "Multiclasse un-contre-tous", "isCorrect": "false" } ] @@ -1257,7 +1257,7 @@ "isCorrect": "true" }, { - "answerText": "k-signifie", + "answerText": "K-Means", "isCorrect": "false" }, { @@ -1295,7 +1295,7 @@ "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1310,15 +1310,15 @@ "questionText": "Les classificateurs de support-vectoriel peuvent être utilisés pour", "answerOptions": [ { - "answerText": "Classification", + "answerText": "La classification", "isCorrect": "false" }, { - "answerText": "régression", + "answerText": "La régression", "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1327,15 +1327,15 @@ "questionText": "Forêt aléatoire est un type de classificateur ___", "answerOptions": [ { - "answerText": "Ensemble", + "answerText": "Ensembliste", "isCorrect": "true" }, { - "answerText": "Dissembliste", + "answerText": "Disensembliste", "isCorrect": "false" }, { - "answerText": "Assemblez", + "answerText": "Assembliste", "isCorrect": "false" } ] @@ -1371,17 +1371,17 @@ "isCorrect": "false" }, { - "answerText": "recommander des modes à essayer", + "answerText": "Recommander des modes à essayer", "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] }, { - "questionText": "L'intégration d'un modèle dans une application Web l'aide à être hors ligne", + "questionText": "L'intégration d'un modèle dans une application Web l'aide à être compatible hors ligne", "answerOptions": [ { "answerText": "Vrai", @@ -1394,7 +1394,7 @@ ] }, { - "questionText": "OnNX Runtime peut être utilisé pour", + "questionText": "Onnx Runtime peut être utilisé pour", "answerOptions": [ { "answerText": "Exécution de modèles dans une application Web", @@ -1405,7 +1405,7 @@ "isCorrect": "false" }, { - "answerText": "Hyperparameter Tuning", + "answerText": "Réglage des hyperparamètres", "isCorrect": "false" } ] @@ -1417,7 +1417,7 @@ "title": "Classification 4: Quiz de validation des connaissances", "quiz": [ { - "questionText": "L'application Nettron vous aide:", + "questionText": "L'application Netron vous aide:", "answerOptions": [ { "answerText": "Visualiser les données", @@ -1434,10 +1434,10 @@ ] }, { - "questionText": "Convertissez votre modèle SCIKIT-HALL pour une utilisation avec OnNX en utilisant:", + "questionText": "Convertissez votre modèle Scikit-learnL pour une utilisation avec Onnx en utilisant:", "answerOptions": [ { - "answerText": "Sklearn-App", + "answerText": "Sklearn-app", "isCorrect": "false" }, { @@ -1445,7 +1445,7 @@ "isCorrect": "false" }, { - "answerText": "Sklearn-ONNX", + "answerText": "Sklearn-onnX", "isCorrect": "true" } ] @@ -1471,7 +1471,7 @@ }, { "id": 27, - "title": "Introduction au Clustering: Quiz préalable", + "title": "Introduction au Clustering (regroupement): Quiz préalable", "quiz": [ { "questionText": "Un exemple de vie réel de regroupement serait", @@ -1502,7 +1502,7 @@ "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "false" } ] @@ -1528,10 +1528,10 @@ }, { "id": 28, - "title": "Introduction au Clustering: Quiz de validation des connaissances", + "title": "Introduction au Clustering (regroupement): Quiz de validation des connaissances", "quiz": [ { - "questionText": "La géométrie euclidienne est disposée le long", + "questionText": "La géométrie Euclidienne est disposée le long", "answerOptions": [ { "answerText": "De plans", @@ -1633,7 +1633,7 @@ "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1701,15 +1701,15 @@ "questionText": "Que signifie NLP pour ces leçons?", "answerOptions": [ { - "answerText": "Traitement des langues neurales", + "answerText": "Neural Language Processing (Traitement des langues neurales)", "isCorrect": "false" }, { - "answerText": "Traitement des langues naturelles", + "answerText": "Natural Language Processing (Traitement des langues naturelles)", "isCorrect": "true" }, { - "answerText": "Traitement linguistique naturel", + "answerText": "Natural Linguistic Processing (Traitement linguistique naturel)", "isCorrect": "false" } ] @@ -1783,7 +1783,7 @@ "isCorrect": "false" }, { - "answerText": "tous les deux", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -1812,7 +1812,7 @@ "title": "Tâches NLP: Quiz préalable", "quiz": [ { - "questionText": "Tokenization", + "questionText": "La tokenization", "answerOptions": [ { "answerText": "Divise le texte au moyen de la ponctuation", @@ -1829,7 +1829,7 @@ ] }, { - "questionText": "Embeddings", + "questionText": "L'Embeddings", "answerOptions": [ { "answerText": "Convertit numériquement les données de texte afin que les mots puissent se classer", @@ -1846,18 +1846,18 @@ ] }, { - "questionText": "Marquage des parties de la parole", + "questionText": "Le balisage des parties du discours (Parts-of-Speech Tagging)", "answerOptions": [ { - "answerText": "Divise des phrases par leurs parties de la parole", + "answerText": "Divise les phrases en fonction de leurs parties du discours", "isCorrect": "false" }, { - "answerText": "prend des mots togmentés et les étiquettes de leur part de la parole", + "answerText": "prend les mots tokenisés et les marque selon leur partie du discours", "isCorrect": "true" }, { - "answerText": "Phrases de diagrammes", + "answerText": "schématise des phrases", "isCorrect": "false" } ] @@ -1886,18 +1886,18 @@ ] }, { - "questionText": "N-grammes se réfèrent à", + "questionText": "N-grams fait référence à", "answerOptions": [ { - "answerText": "Un texte peut être divisé en séquences de mots d'une longueur définie", + "answerText": "Un texte pouvant être divisé en séquences de mots d'une longueur définie", "isCorrect": "true" }, { - "answerText": "Un mot peut être divisé en séquences de caractères d'une longueur de jeu", + "answerText": "Un mot pouvant être divisé en séquences de caractères d'une longueur de jeu", "isCorrect": "false" }, { - "answerText": "Un texte peut être divisé en paragraphes d'une longueur définie", + "answerText": "Un texte pouvant être divisé en paragraphes d'une longueur définie", "isCorrect": "false" } ] @@ -2000,7 +2000,7 @@ ] }, { - "questionText": "Pour utiliser `blob.translate` vous avez besoin:", + "questionText": "Pour utiliser `blob.translate` vous avez besoin de:", "answerOptions": [ { "answerText": "Une connexion Internet", @@ -2017,18 +2017,18 @@ ] }, { - "questionText": "Pour déterminer un sentiment, une approche ML serait de:", + "questionText": "Pour déterminer un sentiment, une approche ML serait d':", "answerOptions": [ { - "answerText": "Appliquez des techniques de régression pour générer manuellement des opinions et des scores et rechercher des modèles", + "answerText": "Appliquer des techniques de régression pour générer manuellement des opinions et des scores et rechercher des modèles", "isCorrect": "false" }, { - "answerText": "Appliquez des techniques de PNL pour générer manuellement des opinions et des scores et rechercher des modèles", + "answerText": "Appliquer des techniques de PNL pour générer manuellement des opinions et des scores et rechercher des modèles", "isCorrect": "true" }, { - "answerText": "Appliquez des techniques de regroupement pour des opinions et des scores générés manuellement et rechercher des modèles", + "answerText": "Appliquer des techniques de regroupement pour des opinions et des scores générés manuellement et rechercher des modèles", "isCorrect": "false" } ] @@ -2253,10 +2253,10 @@ }, { "id": 41, - "title": "Introduction aux Time Series (séries temporelles): Quiz préalable", + "title": "Introduction aux Séries chronologiques (Time Series) : Quiz préalable", "quiz": [ { - "questionText": "La prévision de Time Series est utile pour", + "questionText": "La prévision de série chronologique est utile pour", "answerOptions": [ { "answerText": "Déterminer les coûts futurs", @@ -2273,7 +2273,7 @@ ] }, { - "questionText": "Une série temporelles est une séquence prise à:", + "questionText": "Une série chronologique est une séquence prise à:", "answerOptions": [ { "answerText": "points successifs également espacés dans l'espace", @@ -2290,7 +2290,7 @@ ] }, { - "questionText": "La série temporelles peut être utilisée dans les cas de:", + "questionText": "La série chronologique peut être utilisée dans les cas de:", "answerOptions": [ { "answerText": "Prévision de tremblement de terre", @@ -2310,10 +2310,10 @@ }, { "id": 42, - "title": "Introduction aux Time Series (séries temporelles): Quiz de validation des connaissances", + "title": "Introduction aux séries chronologiques : Quiz de validation des connaissances", "quiz": [ { - "questionText": "Les tendances de série temporelles sont", + "questionText": "Les tendances de série chronologique sont", "answerOptions": [ { "answerText": "des augmentations et des diminutions mesurables au fil du temps", @@ -2347,10 +2347,10 @@ ] }, { - "questionText": "La prévision de la série temporelle est la plus utile pour", + "questionText": "La prévision de séries chronologiques est utile pour", "answerOptions": [ { - "answerText": "L'conométrics", + "answerText": "L'économétrie", "isCorrect": "true" }, { @@ -2367,27 +2367,27 @@ }, { "id": 43, - "title": "Série TIME ARIMA: Quiz préalable", + "title": "Les séries chronologiques ARIMA: Quiz préalable", "quiz": [ { - "questionText": "Arima signifie", + "questionText": "ARIMA signifie", "answerOptions": [ { - "answerText": "Moyenne mobile intégrale autonome", + "answerText": "AutoRegressive Integral Moving Average", "isCorrect": "false" }, { - "answerText": "Action mobile intégrée autorégressive", + "answerText": "AutoRegressive Integrated Moving Action", "isCorrect": "false" }, { - "answerText": "Moyenne mobile intégrée autorégresive", + "answerText": "AutoRegressive Integrated Moving Average", "isCorrect": "true" } ] }, { - "questionText": "Stationarité fait référence à", + "questionText": "La stationnarité fait référence à", "answerOptions": [ { "answerText": "Les données dont les attributs ne changent pas lors de la décalage", @@ -2404,7 +2404,7 @@ ] }, { - "questionText": "différenciation", + "questionText": "La différenciation", "answerOptions": [ { "answerText": "Stabilise la tendance et la saisonnalité", @@ -2424,7 +2424,7 @@ }, { "id": 44, - "title": "Série TIME ARIMA: Quiz de validation des connaissances", + "title": "Les séries chronologiques ARIMA: Quiz de validation des connaissances", "quiz": [ { "questionText": "Arima est utilisé pour créer un modèle adapté à la forme spéciale des données de la série chronologique", @@ -2444,7 +2444,7 @@ ] }, { - "questionText": "Utilisez Sarimax à", + "questionText": "Utilisez Sarimax pour", "answerOptions": [ { "answerText": "Gérer les modèles d'ARIMA saisonniers", @@ -2461,18 +2461,18 @@ ] }, { - "questionText": " `La validation` de la promenade implique ", + "questionText": " La validation « Walk-Forward » implique de", "answerOptions": [ { "answerText": "Réévaluer un modèle progressivement tel qu'il est validé", "isCorrect": "false" }, { - "answerText": "Ré-entraînant un modèle progressivement tel qu'il est validé", + "answerText": "Re-entraîner un modèle progressivement tel qu'il est validé", "isCorrect": "true" }, { - "answerText": "Ré-configurez un modèle progressivement tel qu'il est validé", + "answerText": "Re-configurer un modèle progressivement tel qu'il est validé", "isCorrect": "false" } ] @@ -2535,7 +2535,7 @@ "title": "Renforcement 1: Quiz de validation des connaissances", "quiz": [ { - "questionText": "Qu'est-ce que q-apprentissage?", + "questionText": "Qu'est-ce que le Q-Learning?", "answerOptions": [ { "answerText": "Un mécanisme d'enregistrement de la \"bonté\" de chaque État", @@ -2552,7 +2552,7 @@ ] }, { - "questionText": "Pour quelles valeurs une table Q correspond à la stratégie de marche aléatoire?", + "questionText": "Pour quelles valeurs une Q-Table correspond à la stratégie de marche aléatoire?", "answerOptions": [ { "answerText": "toutes les valeurs égales", @@ -2588,7 +2588,7 @@ "title": "Renforcement 2: Quiz préalable", "quiz": [ { - "questionText": "Les échecs et les jeux sont des jeux avec des états continus.", + "questionText": "Les échecs et le go sont des jeux avec des états continus", "answerOptions": [ { "answerText": "Vrai", @@ -2601,7 +2601,7 @@ ] }, { - "questionText": "Quel est le problème de la cartpole?", + "questionText": "Quel est le problème CartPole ?", "answerOptions": [ { "answerText": "Un processus d'élimination des valeurs aberrantes", @@ -2658,14 +2658,14 @@ ] }, { - "questionText": "Quelle paire avez-nous utilisée comme valeur de la clé de dictionnaire?", + "questionText": "Quelle paire avons-nous utilisée comme valeur de la clé de dictionnaire?", "answerOptions": [ { - "answerText": "(état, action) comme clé de la table Q-Table comme valeur", + "answerText": "(état, action) comme clé, l'entrée Q-Table comme valeur", "isCorrect": "true" }, { - "answerText": "State comme clé, action en tant que valeur", + "answerText": "L'état comme clé, action en tant que valeur", "isCorrect": "false" }, { @@ -2675,7 +2675,7 @@ ] }, { - "questionText": "Quels sont les hyperparamètres que nous avons utilisés pendant q-apprentissage?", + "questionText": "Quels sont les hyperparamètres que nous avons utilisés pendant le Q-Learning?", "answerOptions": [ { "answerText": "Valeur de la table Q, récompense actuelle, action aléatoire", @@ -2718,15 +2718,15 @@ "questionText": "Quelle technique ML peut utiliser les hôpitaux pour gérer la réadmission?", "answerOptions": [ { - "answerText": "Clustering", + "answerText": "Le Clustering (Regroupement)", "isCorrect": "true" }, { - "answerText": "Série temporelle", + "answerText": "Les séries chronologiques", "isCorrect": "false" }, { - "answerText": "NLP", + "answerText": "Le NLP", "isCorrect": "false" } ] @@ -2779,7 +2779,7 @@ "isCorrect": "true" }, { - "answerText": "Série temporelle", + "answerText": "Série chronologique", "isCorrect": "false" }, { From d741c3f67ea6e4d2d79749fb94d425c4c4f9d58a Mon Sep 17 00:00:00 2001 From: manusquall Date: Mon, 19 Jul 2021 10:41:33 +0000 Subject: [PATCH 78/91] review and correct some meaning --- quiz-app/src/assets/translations/fr.json | 40 ++++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/quiz-app/src/assets/translations/fr.json b/quiz-app/src/assets/translations/fr.json index 80b55749..9908c3ea 100644 --- a/quiz-app/src/assets/translations/fr.json +++ b/quiz-app/src/assets/translations/fr.json @@ -820,7 +820,7 @@ ] }, { - "questionText": "Types de régression logistique incluent", + "questionText": "Les types de régression logistique incluent", "answerOptions": [ { "answerText": "multinomial et cardinal", @@ -848,7 +848,7 @@ "isCorrect": "false" }, { - "answerText": "cardinal", + "answerText": "cardinale", "isCorrect": "false" } ] @@ -860,7 +860,7 @@ "title": "Régression logistique: Quiz de validation des connaissances", "quiz": [ { - "questionText": "Sea-né est un type de", + "questionText": "Seaborn est un type de", "answerOptions": [ { "answerText": "Bibliothèque de visualisation de données", @@ -880,15 +880,15 @@ "questionText": "Une matrice de confusion est également connue sous le nom de:", "answerOptions": [ { - "answerText": "matrice d'erreur", + "answerText": "Matrice d'erreur", "isCorrect": "true" }, { - "answerText": "Matrix de vérité", + "answerText": "Matrice de vérité", "isCorrect": "false" }, { - "answerText": "matrice de précision", + "answerText": "Matrice de précision", "isCorrect": "false" } ] @@ -916,35 +916,35 @@ "title": "Construire une application Web: Quiz préalable", "quiz": [ { - "questionText": "Qu'est-ce que OnNX signifie?", + "questionText": "Qu'est-ce que ONNX signifie?", "answerOptions": [ { - "answerText": "Exchange de réseau de neurones", + "answerText": "Over Neural Network Exchange", "isCorrect": "false" }, { - "answerText": "Exchange de réseau de neurones ouverts", + "answerText": "Open Neural Network Exchange", "isCorrect": "true" }, { - "answerText": "Exchange de réseau neural de sortie", + "answerText": "Output Neural Network Exchange", "isCorrect": "false" } ] }, { - "questionText": "Comment le ballon est-il défini par ses créateurs?", + "questionText": "Comment Flask est-il défini par ses créateurs?", "answerOptions": [ { - "answerText": "mini-cadre", + "answerText": "mini-framework", "isCorrect": "false" }, { - "answerText": "Grand-cadre", + "answerText": "grand-framework", "isCorrect": "false" }, { - "answerText": "micro-cadre", + "answerText": "micro-framework", "isCorrect": "true" } ] @@ -953,15 +953,15 @@ "questionText": "Que fait le module de cornichon de Python", "answerOptions": [ { - "answerText": "Serialise un objet Python", + "answerText": "Serialiser un objet Python", "isCorrect": "false" }, { - "answerText": "désagréalise un objet Python", + "answerText": "Dé-sérialiser un objet Python", "isCorrect": "false" }, { - "answerText": "Serialise et désémarifier un objet Python", + "answerText": "Sérialiser et Dé-sérialiser un objet Python", "isCorrect": "true" } ] @@ -976,7 +976,7 @@ "questionText": "Quels sont les outils que nous pouvons utiliser pour héberger un modèle pré-formé sur le Web à l'aide de Python?", "answerOptions": [ { - "answerText": "Flacon", + "answerText": "Flask", "isCorrect": "true" }, { @@ -984,7 +984,7 @@ "isCorrect": "false" }, { - "answerText": "ONNX.JS", + "answerText": "onnx.JS", "isCorrect": "false" } ] @@ -1018,7 +1018,7 @@ "isCorrect": "false" }, { - "answerText": "Code des données en série", + "answerText": "Encode des données en série", "isCorrect": "false" } ] From 7dea56de001724f4df76d2e32e998e904d5ba189 Mon Sep 17 00:00:00 2001 From: manusquall Date: Mon, 19 Jul 2021 10:58:34 +0000 Subject: [PATCH 79/91] fix mistranslation --- quiz-app/src/assets/translations/fr.json | 104 +++++++++++------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/quiz-app/src/assets/translations/fr.json b/quiz-app/src/assets/translations/fr.json index 9908c3ea..da0ee317 100644 --- a/quiz-app/src/assets/translations/fr.json +++ b/quiz-app/src/assets/translations/fr.json @@ -50,7 +50,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -107,7 +107,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -236,15 +236,15 @@ "questionText": "L'injustice dans le machine learning peut arriver", "answerOptions": [ { - "answerText": "intentionnellement", + "answerText": "Intentionnellement", "isCorrect": "false" }, { - "answerText": "Indormalement", + "answerText": "Involontairement", "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -253,15 +253,15 @@ "questionText": "Le terme \" injustice \" en ml connotes:", "answerOptions": [ { - "answerText": "nuit à un groupe de personnes", + "answerText": "Préjudices pour un groupe de personnees", "isCorrect": "true" }, { - "answerText": "Dommage à une personne", + "answerText": "préjudice à une personne", "isCorrect": "false" }, { - "answerText": "nuit à la majorité des gens", + "answerText": "Préjudices pour la majorité des gens", "isCorrect": "false" } ] @@ -293,21 +293,21 @@ "questionText": "L'injustice dans un modèle peut être causée par", "answerOptions": [ { - "answerText": "dépassement de données historiques", + "answerText": "Dépendance excessive de données historiques", "isCorrect": "true" }, { - "answerText": "Sous-solliance sur les données historiques", + "answerText": "sous-dépendance sur les données historiques", "isCorrect": "false" }, { - "answerText": "Trop d'alignement sur les données historiques", + "answerText": "Alignement trop étroit sur les données historiques", "isCorrect": "false" } ] }, { - "questionText": "Pour atténuer l'injustice, tu peux", + "questionText": "Pour atténuer l'injustice, vous pouvez", "answerOptions": [ { "answerText": "Identifier les préjudices et les groupes affectés", @@ -318,7 +318,7 @@ "isCorrect": "false" }, { - "answerText": "à la fois ce qui précède", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -375,7 +375,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -521,11 +521,11 @@ "questionText": "Si la précision de la formation du modèle d'apprentissage de votre machine est de 95% et que la précision des tests est de 30%, quel type de condition est appelé?", "answerOptions": [ { - "answerText": "Surface", + "answerText": "Surapprentissage", "isCorrect": "true" }, { - "answerText": "sous-facture", + "answerText": "Insuffisance", "isCorrect": "false" }, { @@ -552,18 +552,18 @@ ] }, { - "questionText": "Le processus de division d'un jeu de données dans un certain rapport d'entraînement et de test de jeu de données à l'aide de la méthode / la fonction Train_Test_split () '' Train_Test_Split () 'est appelée:", + "questionText": "Le processus de division d'un ensemble de données en un certain rapport d'ensemble de données d'entraînement et de test à l'aide de la méthode/fonction 'train_test_split ()' de Scikit Learn est appelé une:", "answerOptions": [ { "answerText": "Validation croisée", "isCorrect": "false" }, { - "answerText": "validation de maintien", + "answerText": "Validation d'attentn", "isCorrect": "true" }, { - "answerText": "laissez une validation d'une sortie", + "answerText": "Validation \"Oubliez-en un\" ", "isCorrect": "false" } ] @@ -582,7 +582,7 @@ "isCorrect": "false" }, { - "answerText": "Scikit-apprendre", + "answerText": "Scikit-learn", "isCorrect": "false" }, { @@ -592,18 +592,18 @@ ] }, { - "questionText": "Si vous souhaitez comprendre la propagation ou les autres caractéristiques des points de données de votre ensemble de données, puis effectuez:", + "questionText": "Si vous souhaitez comprendre la propagation ou les autres caractéristiques des points de données de votre ensemble de données, alors effectuez:", "answerOptions": [ { - "answerText": "Visualisation des données", + "answerText": "Une visualisation des données", "isCorrect": "true" }, { - "answerText": "Pré-traitement des données", + "answerText": "Un pré-traitement des données", "isCorrect": "false" }, { - "answerText": "Split test de train", + "answerText": "Un Train Test Splitn", "isCorrect": "false" } ] @@ -612,7 +612,7 @@ "questionText": "Lequel d'entre eux fait partie de l'étape de visualisation des données dans un projet de machine learning?", "answerOptions": [ { - "answerText": "Intégrant un algorithme d'apprentissage de certains machines", + "answerText": "Intégrer un algorithme d'apprentissage de certains machines", "isCorrect": "false" }, { @@ -634,16 +634,16 @@ { "questionText": "Lequel de ces extraits de code est correct d'après cette leçon, si vous souhaitez vérifier la présence de valeurs manquantes dans votre ensemble de données ? Supposons que l'ensemble de données soit stocké dans une variable nommée \"ensemble de données\", qui est un objet Pandas DataFrame.", "answerOptions": [ - { - "answerText": "DataSet.isnull (). Somme ()", + { + "answerText": "dataset.isnull().sum()", "isCorrect": "true" }, { - "answerText": "FindMissing (DataSet)", + "answerText": "findMissing(dataset)", "isCorrect": "false" }, { - "answerText": "Somme (NULL (DataSet))", + "answerText": "sum(null(dataset))", "isCorrect": "false" } ] @@ -652,15 +652,15 @@ "questionText": "Laquelle de ces méthodes de traçage est utile lorsque vous souhaitez comprendre la propagation de différents groupes de fichiers de données de votre jeu de données?", "answerOptions": [ { - "answerText": "Terrain de dispersion", + "answerText": "Nuage de pointsn", "isCorrect": "false" }, { - "answerText": "Terrain de ligne", + "answerText": "Graphique linéaire", "isCorrect": "false" }, { - "answerText": "barre de bar", + "answerText": "Graphique à barres", "isCorrect": "true" } ] @@ -689,7 +689,7 @@ "title": "Régression linéaire et polynomiale: Quiz préalable", "quiz": [ { - "questionText": "Matplotlib est un", + "questionText": "Matplotlib est une", "answerOptions": [ { "answerText": "Bibliothèque de dessin", @@ -700,7 +700,7 @@ "isCorrect": "true" }, { - "answerText": "Library Lanchage", + "answerText": "Bibliothèque de prêt", "isCorrect": "false" } ] @@ -717,7 +717,7 @@ "isCorrect": "false" }, { - "answerText": "une courbe", + "answerText": "Une courbe", "isCorrect": "false" } ] @@ -726,15 +726,15 @@ "questionText": "Un bon modèle de régression linéaire a un coefficient de corrélation ___", "answerOptions": [ { - "answerText": "Low", + "answerText": "Bas", "isCorrect": "false" }, { - "answerText": "High", + "answerText": "Elevé", "isCorrect": "true" }, { - "answerText": "flat", + "answerText": "Plat", "isCorrect": "false" } ] @@ -757,7 +757,7 @@ "isCorrect": "false" }, { - "answerText": "polynôme", + "answerText": "polynômial", "isCorrect": "true" } ] @@ -766,15 +766,15 @@ "questionText": "Ce sont tous types de méthodes de régression", "answerOptions": [ { - "answerText": "Falsestetep, crête, lasso et élastique", + "answerText": "Falsestep, Ridge, Lasso et Elasticnet", "isCorrect": "false" }, { - "answerText": "Stealwise, Ridge, Lasso et Elasticnet", + "answerText": "Stepwise, Ridge, Lasso et Elasticnet", "isCorrect": "true" }, { - "answerText": "Stealwise, Ridge, Lariat et Elasticnet", + "answerText": "Stepwise, Ridge, Lariat et Elasticnet", "isCorrect": "false" } ] @@ -1735,7 +1735,7 @@ "questionText": "Le test Turing d'Alan Turing a essayé de déterminer si un ordinateur était", "answerOptions": [ { - "answerText": "indiscernable d'un humain", + "answerText": "Indiscernable d'un humain", "isCorrect": "false" }, { @@ -1743,7 +1743,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -2047,11 +2047,11 @@ "isCorrect": "false" }, { - "answerText": "sentiment et signification", + "answerText": "Sentiment et signification", "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -2121,11 +2121,11 @@ "isCorrect": "false" }, { - "answerText": "lignes vierges ou colonnes", + "answerText": "Lignes vierges ou colonnes", "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -2161,7 +2161,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -2227,11 +2227,11 @@ "isCorrect": "false" }, { - "answerText": "mots que vous pouvez supprimer pour accélérer l'analyse du sentiment", + "answerText": "Mots que vous pouvez supprimer pour accélérer l'analyse du sentiment", "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] @@ -2546,7 +2546,7 @@ "isCorrect": "false" }, { - "answerText": "Les deux ci-dessus", + "answerText": "Les deux", "isCorrect": "true" } ] From cdd0dfb8baddaebb2dcdfe987bda759ae5374245 Mon Sep 17 00:00:00 2001 From: "Charles Emmanuel S. Ndiaye" Date: Mon, 19 Jul 2021 12:32:28 +0000 Subject: [PATCH 80/91] Update the links to redirect to translated pages --- 1-Introduction/translations/README.fr.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/1-Introduction/translations/README.fr.md b/1-Introduction/translations/README.fr.md index c27f9bef..462dea70 100644 --- a/1-Introduction/translations/README.fr.md +++ b/1-Introduction/translations/README.fr.md @@ -7,10 +7,10 @@ Dans cette section du programme, vous découvrirez les concepts de base sous-jac ### Leçons -1. [Introduction au machine learning](1-intro-to-ML/README.md) -1. [L’histoire du machine learning et de l’IA](2-history-of-ML/README.md) -1. [Équité et machine learning](3-équité/README.md) -1. [Techniques de machine learning](4-techniques-of-ML/README.md) +1. [Introduction au machine learning](../1-intro-to-ML/translations/README.fr.md) +1. [L’histoire du machine learning et de l’IA](../2-history-of-ML/translations/README.fr.md) +1. [Équité et machine learning](../3-fairness/translations/README.fr.md) +1. [Techniques de machine learning](../4-techniques-of-ML/translations/README.fr.md) ### Crédits "Introduction au machine learning" a été écrit avec ♥️ par une équipe de personnes comprenant [Muhammad Sakib Khan Inan](https://twitter.com/Sakibinan), [Ornella Altunyan](https://twitter.com/ornelladotcom) et [Jen Looper](https://twitter.com/jenlooper) From 7bb38cd9d98a11e97bb74ee58927f24c2d928a32 Mon Sep 17 00:00:00 2001 From: "Charles Emmanuel S. Ndiaye" Date: Mon, 19 Jul 2021 12:38:53 +0000 Subject: [PATCH 81/91] update the quiz links to the french translation --- 1-Introduction/1-intro-to-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/1-intro-to-ML/translations/README.fr.md b/1-Introduction/1-intro-to-ML/translations/README.fr.md index 0d07a5e8..d8915f58 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.fr.md +++ b/1-Introduction/1-intro-to-ML/translations/README.fr.md @@ -4,7 +4,7 @@ > 🎥 Cliquer sur l'image ci-dessus afin de regarder une vidéo expliquant la différence entre machine learning, AI et deep learning. -## [Quiz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1/) +## [Quiz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/1?loc=fr) ### Introduction @@ -98,7 +98,7 @@ Dans un avenir proche, comprendre les bases du machine learning sera indispensab Esquisser, sur papier ou à l'aide d'une application en ligne comme [Excalidraw](https://excalidraw.com/), votre compréhension des différences entre l'IA, le ML, le deep learning et la data science. Ajouter quelques idées de problèmes que chacune de ces techniques est bonne à résoudre. -## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2/) +## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/2?loc=fr) ## Révision et auto-apprentissage From 2cbe730dd959bc6ce906c0ea0dd5b7b42dacfc40 Mon Sep 17 00:00:00 2001 From: "Charles Emmanuel S. Ndiaye" Date: Mon, 19 Jul 2021 12:40:20 +0000 Subject: [PATCH 82/91] update the quiz links to the french translation --- 1-Introduction/2-history-of-ML/translations/README.fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-Introduction/2-history-of-ML/translations/README.fr.md b/1-Introduction/2-history-of-ML/translations/README.fr.md index 66132162..9c59eb6f 100644 --- a/1-Introduction/2-history-of-ML/translations/README.fr.md +++ b/1-Introduction/2-history-of-ML/translations/README.fr.md @@ -3,7 +3,7 @@ ![Résumé de l'histoire du machine learning dans un sketchnote](../../../sketchnotes/ml-history.png) > Sketchnote de [Tomomi Imura](https://www.twitter.com/girlie_mac) -## [Quizz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/3/) +## [Quizz préalable](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/3?loc=fr) Dans cette leçon, nous allons parcourir les principales étapes de l'histoire du machine learning et de l'intelligence artificielle. @@ -102,7 +102,7 @@ Reste à savoir ce que l'avenir nous réserve, mais il est important de comprend Plongez dans l'un de ces moments historiques et apprenez-en plus sur les personnes derrière ceux-ci. Il y a des personnalités fascinantes, et aucune découverte scientifique n'a jamais été créée avec un vide culturel. Que découvrez-vous ? -## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/4/) +## [Quiz de validation des connaissances](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/4?loc=fr) ## Révision et auto-apprentissage From 922413c563afdda446f99d582c08db3da38d253b Mon Sep 17 00:00:00 2001 From: Foo-x Date: Mon, 19 Jul 2021 21:44:29 +0900 Subject: [PATCH 83/91] feat: add ja 1.1 assignment Add Japanese translation of the 1.1 assignment. Refs #149 --- 1-Introduction/1-intro-to-ML/translations/README.ja.md | 2 +- .../1-intro-to-ML/translations/assignment.ja.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 1-Introduction/1-intro-to-ML/translations/assignment.ja.md diff --git a/1-Introduction/1-intro-to-ML/translations/README.ja.md b/1-Introduction/1-intro-to-ML/translations/README.ja.md index 1107739c..ada00550 100644 --- a/1-Introduction/1-intro-to-ML/translations/README.ja.md +++ b/1-Introduction/1-intro-to-ML/translations/README.ja.md @@ -102,4 +102,4 @@ AI、ML、深層学習、データサイエンスの違いについて理解し ## 課題 -[起動し、実行してください。](assignment.md) +[稼働させる](assignment.ja.md) diff --git a/1-Introduction/1-intro-to-ML/translations/assignment.ja.md b/1-Introduction/1-intro-to-ML/translations/assignment.ja.md new file mode 100644 index 00000000..9c86969c --- /dev/null +++ b/1-Introduction/1-intro-to-ML/translations/assignment.ja.md @@ -0,0 +1,9 @@ +# 稼働させる + +## 指示 + +この評価のない課題では、Pythonについて復習し、環境を稼働させてノートブックを実行できるようにする必要があります。 + +この[Pythonラーニングパス](https://docs.microsoft.com/learn/paths/python-language/?WT.mc_id=academic-15963-cxa)を受講し、次の入門用ビデオに従ってシステムをセットアップしてください。 + +https://www.youtube.com/playlist?list=PLlrxD0HtieHhS8VzuMCfQD4uJ9yne1mE6 From e1e18f2a3cad47b9e9c1199f36dfdc80bb9f1a3e Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Mon, 19 Jul 2021 14:50:54 +0200 Subject: [PATCH 84/91] Add missing comma Add the missing comma and fix #208 --- 4-Classification/1-Introduction/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4-Classification/1-Introduction/README.md b/4-Classification/1-Introduction/README.md index 4490131c..09a35154 100644 --- a/4-Classification/1-Introduction/README.md +++ b/4-Classification/1-Introduction/README.md @@ -163,7 +163,7 @@ Now you can dig deeper into the data and learn what are the typical ingredients def create_ingredient_df(df): ingredient_df = df.T.drop(['cuisine','Unnamed: 0']).sum(axis=1).to_frame('value') ingredient_df = ingredient_df[(ingredient_df.T != 0).any()] - ingredient_df = ingredient_df.sort_values(by='value', ascending=False + ingredient_df = ingredient_df.sort_values(by='value', ascending=False, inplace=False) return ingredient_df ``` From 34807d24a36319b21a93049bee2fff52fa1769ef Mon Sep 17 00:00:00 2001 From: simplg <81249731+simplg@users.noreply.github.com> Date: Mon, 19 Jul 2021 14:52:54 +0200 Subject: [PATCH 85/91] Fix path and table format Fix #209 with the correct path to cleaned_cuisine.csv Fix also a formating error with the table where almond was the index column of the dataframe --- 4-Classification/2-Classifiers-1/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/4-Classification/2-Classifiers-1/README.md b/4-Classification/2-Classifiers-1/README.md index 0db1aeba..213179bb 100644 --- a/4-Classification/2-Classifiers-1/README.md +++ b/4-Classification/2-Classifiers-1/README.md @@ -15,7 +15,7 @@ Assuming you completed [Lesson 1](../1-Introduction/README.md), make sure that a ```python import pandas as pd - cuisines_df = pd.read_csv("../../data/cleaned_cuisine.csv") + cuisines_df = pd.read_csv("../data/cleaned_cuisine.csv") cuisines_df.head() ``` @@ -67,13 +67,13 @@ Assuming you completed [Lesson 1](../1-Introduction/README.md), make sure that a Your features look like this: -| almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | artemisia | artichoke | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | -| -----: | -------: | ----: | ---------: | ----: | -----------: | ------: | -------: | --------: | --------: | ---: | ------: | ----------: | ---------: | ----------------------: | ---: | ---: | ---: | ----: | -----: | -------: | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | +| | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | artemisia | artichoke | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | +| -----: | -------: | ----: | ---------: | ----: | -----------: | ------: | -------: | --------: | --------: | ---: | ------: | ----------: | ---------: | ----------------------: | ---: | ---: | ---: | ----: | -----: | -------: | -----: | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | Now you are ready to train your model! From 60526b022f0d2d098693448d361972613f20ed4d Mon Sep 17 00:00:00 2001 From: Jen Looper Date: Mon, 19 Jul 2021 10:20:02 -0400 Subject: [PATCH 86/91] changing classification file name to cleaned_cuisines --- 4-Classification/1-Introduction/README.md | 2 +- 4-Classification/1-Introduction/solution/notebook.ipynb | 2 +- 4-Classification/1-Introduction/translations/README.tr.md | 2 +- 4-Classification/1-Introduction/translations/README.zh-cn.md | 2 +- 4-Classification/2-Classifiers-1/README.md | 2 +- 4-Classification/2-Classifiers-1/solution/notebook.ipynb | 2 +- 4-Classification/3-Classifiers-2/README.md | 2 +- 4-Classification/3-Classifiers-2/notebook.ipynb | 2 +- 4-Classification/3-Classifiers-2/solution/notebook.ipynb | 2 +- 4-Classification/4-Applied/README.md | 2 +- 4-Classification/4-Applied/solution/notebook.ipynb | 2 +- .../data/{cleaned_cuisine.csv => cleaned_cuisines.csv} | 0 12 files changed, 11 insertions(+), 11 deletions(-) rename 4-Classification/data/{cleaned_cuisine.csv => cleaned_cuisines.csv} (100%) diff --git a/4-Classification/1-Introduction/README.md b/4-Classification/1-Introduction/README.md index 4490131c..8e075f0e 100644 --- a/4-Classification/1-Introduction/README.md +++ b/4-Classification/1-Introduction/README.md @@ -275,7 +275,7 @@ Now that you have cleaned the data, use [SMOTE](https://imbalanced-learn.org/dev ```python transformed_df.head() transformed_df.info() - transformed_df.to_csv("../data/cleaned_cuisine.csv") + transformed_df.to_csv("../data/cleaned_cuisines.csv") ``` This fresh CSV can now be found in the root data folder. diff --git a/4-Classification/1-Introduction/solution/notebook.ipynb b/4-Classification/1-Introduction/solution/notebook.ipynb index c5b8c629..5abb9693 100644 --- a/4-Classification/1-Introduction/solution/notebook.ipynb +++ b/4-Classification/1-Introduction/solution/notebook.ipynb @@ -622,7 +622,7 @@ "metadata": {}, "outputs": [], "source": [ - "transformed_df.to_csv(\"../../data/cleaned_cuisine.csv\")" + "transformed_df.to_csv(\"../../data/cleaned_cuisines.csv\")" ] }, { diff --git a/4-Classification/1-Introduction/translations/README.tr.md b/4-Classification/1-Introduction/translations/README.tr.md index e4cc372a..fd0e2184 100644 --- a/4-Classification/1-Introduction/translations/README.tr.md +++ b/4-Classification/1-Introduction/translations/README.tr.md @@ -275,7 +275,7 @@ Veriyi temizlediniz, şimdi [SMOTE](https://imbalanced-learn.org/dev/references/ ```python transformed_df.head() transformed_df.info() - transformed_df.to_csv("../../data/cleaned_cuisine.csv") + transformed_df.to_csv("../../data/cleaned_cuisines.csv") ``` Bu yeni CSV şimdi kök data (veri) klasöründe görülebilir. diff --git a/4-Classification/1-Introduction/translations/README.zh-cn.md b/4-Classification/1-Introduction/translations/README.zh-cn.md index 2e258f3f..adef7c8a 100644 --- a/4-Classification/1-Introduction/translations/README.zh-cn.md +++ b/4-Classification/1-Introduction/translations/README.zh-cn.md @@ -269,7 +269,7 @@ Scikit-learn项目提供多种对数据进行分类的算法,你需要根据 ```python transformed_df.head() transformed_df.info() - transformed_df.to_csv("../data/cleaned_cuisine.csv") + transformed_df.to_csv("../data/cleaned_cuisines.csv") ``` 这个全新的CSV文件可以在数据根目录中被找到。 diff --git a/4-Classification/2-Classifiers-1/README.md b/4-Classification/2-Classifiers-1/README.md index 0db1aeba..c5588f1b 100644 --- a/4-Classification/2-Classifiers-1/README.md +++ b/4-Classification/2-Classifiers-1/README.md @@ -15,7 +15,7 @@ Assuming you completed [Lesson 1](../1-Introduction/README.md), make sure that a ```python import pandas as pd - cuisines_df = pd.read_csv("../../data/cleaned_cuisine.csv") + cuisines_df = pd.read_csv("../../data/cleaned_cuisines.csv") cuisines_df.head() ``` diff --git a/4-Classification/2-Classifiers-1/solution/notebook.ipynb b/4-Classification/2-Classifiers-1/solution/notebook.ipynb index a819dbe5..770ac85c 100644 --- a/4-Classification/2-Classifiers-1/solution/notebook.ipynb +++ b/4-Classification/2-Classifiers-1/solution/notebook.ipynb @@ -47,7 +47,7 @@ ], "source": [ "import pandas as pd\n", - "cuisines_df = pd.read_csv(\"../../data/cleaned_cuisine.csv\")\n", + "cuisines_df = pd.read_csv(\"../../data/cleaned_cuisines.csv\")\n", "cuisines_df.head()" ] }, diff --git a/4-Classification/3-Classifiers-2/README.md b/4-Classification/3-Classifiers-2/README.md index dd25926e..9720c763 100644 --- a/4-Classification/3-Classifiers-2/README.md +++ b/4-Classification/3-Classifiers-2/README.md @@ -6,7 +6,7 @@ In this second classification lesson, you will explore more ways to classify num ### Prerequisite -We assume that you have completed the previous lessons and have a cleaned dataset in your `data` folder called _cleaned_cuisine.csv_ in the root of this 4-lesson folder. +We assume that you have completed the previous lessons and have a cleaned dataset in your `data` folder called _cleaned_cuisines.csv_ in the root of this 4-lesson folder. ### Preparation diff --git a/4-Classification/3-Classifiers-2/notebook.ipynb b/4-Classification/3-Classifiers-2/notebook.ipynb index f4dec474..4659a7b6 100644 --- a/4-Classification/3-Classifiers-2/notebook.ipynb +++ b/4-Classification/3-Classifiers-2/notebook.ipynb @@ -47,7 +47,7 @@ ], "source": [ "import pandas as pd\n", - "cuisines_df = pd.read_csv(\"../data/cleaned_cuisine.csv\")\n", + "cuisines_df = pd.read_csv(\"../data/cleaned_cuisines.csv\")\n", "cuisines_df.head()" ] }, diff --git a/4-Classification/3-Classifiers-2/solution/notebook.ipynb b/4-Classification/3-Classifiers-2/solution/notebook.ipynb index d953c603..a089b21f 100644 --- a/4-Classification/3-Classifiers-2/solution/notebook.ipynb +++ b/4-Classification/3-Classifiers-2/solution/notebook.ipynb @@ -47,7 +47,7 @@ ], "source": [ "import pandas as pd\n", - "cuisines_df = pd.read_csv(\"../../data/cleaned_cuisine.csv\")\n", + "cuisines_df = pd.read_csv(\"../../data/cleaned_cuisines.csv\")\n", "cuisines_df.head()" ] }, diff --git a/4-Classification/4-Applied/README.md b/4-Classification/4-Applied/README.md index 773271a1..1f3573c2 100644 --- a/4-Classification/4-Applied/README.md +++ b/4-Classification/4-Applied/README.md @@ -40,7 +40,7 @@ First, train a classification model using the cleaned cuisines dataset we used. 1. Then, work with your data in the same way you did in previous lessons, by reading a CSV file using `read_csv()`: ```python - data = pd.read_csv('../data/cleaned_cuisine.csv') + data = pd.read_csv('../data/cleaned_cuisines.csv') data.head() ``` diff --git a/4-Classification/4-Applied/solution/notebook.ipynb b/4-Classification/4-Applied/solution/notebook.ipynb index 5ed9da52..b388d2ca 100644 --- a/4-Classification/4-Applied/solution/notebook.ipynb +++ b/4-Classification/4-Applied/solution/notebook.ipynb @@ -115,7 +115,7 @@ } ], "source": [ - "data = pd.read_csv('../../data/cleaned_cuisine.csv')\n", + "data = pd.read_csv('../../data/cleaned_cuisines.csv')\n", "data.head()" ] }, diff --git a/4-Classification/data/cleaned_cuisine.csv b/4-Classification/data/cleaned_cuisines.csv similarity index 100% rename from 4-Classification/data/cleaned_cuisine.csv rename to 4-Classification/data/cleaned_cuisines.csv From 0c108193ccae130f6dfa7e326db29e835f206219 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Mon, 19 Jul 2021 19:44:41 +0300 Subject: [PATCH 87/91] Add Turkish translation of Classifiers-1 --- .../2-Classifiers-1/translations/README.tr.md | 241 ++++++++++++++++++ .../translations/assignment.tr.md | 8 + 2 files changed, 249 insertions(+) create mode 100644 4-Classification/2-Classifiers-1/translations/README.tr.md create mode 100644 4-Classification/2-Classifiers-1/translations/assignment.tr.md diff --git a/4-Classification/2-Classifiers-1/translations/README.tr.md b/4-Classification/2-Classifiers-1/translations/README.tr.md new file mode 100644 index 00000000..f02bd759 --- /dev/null +++ b/4-Classification/2-Classifiers-1/translations/README.tr.md @@ -0,0 +1,241 @@ +# Mutfak sınıflandırıcıları 1 + +Bu derste, mutfaklarla ilgili dengeli ve temiz veriyle dolu, geçen dersten kaydettiğiniz veri setini kullanacaksınız. + +Bu veri setini çeşitli sınıflandırıcılarla _bir grup malzemeyi baz alarak verilen bir ulusal mutfağı öngörmek_ için kullanacaksınız. Bunu yaparken, sınıflandırma görevleri için algoritmaların leveraj edilebileceği yollardan bazıları hakkında daha fazla bilgi edineceksiniz. + +## [Ders öncesi kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/21/?loc=tr) +# Hazırlık + +[Birinci dersi](../../1-Introduction/README.md) tamamladığınızı varsayıyoruz, dolayısıyla bu dört ders için _cleaned_cuisines.csv_ dosyasının kök `/data` klasöründe var olduğundan emin olun. + +## Alıştırma - ulusal bir mutfağı öngörün + +1. Bu dersin _notebook.ipynb_ dosyasında çalışarak, Pandas kütüphanesiyle beraber o dosyayı da alın: + + ```python + import pandas as pd + cuisines_df = pd.read_csv("../data/cleaned_cuisines.csv") + cuisines_df.head() + ``` + + Veri şöyle görünüyor: + +| | Unnamed: 0 | cuisine | almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | +| --- | ---------- | ------- | ------ | -------- | ----- | ---------- | ----- | ------------ | ------- | -------- | --- | ------- | ----------- | ---------- | ----------------------- | ---- | ---- | --- | ----- | ------ | -------- | +| 0 | 0 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 1 | 1 | indian | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 2 | 2 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | 3 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 4 | 4 | indian | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + + +1. Şimdi, birkaç kütüphane daha alın: + + ```python + from sklearn.linear_model import LogisticRegression + from sklearn.model_selection import train_test_split, cross_val_score + from sklearn.metrics import accuracy_score,precision_score,confusion_matrix,classification_report, precision_recall_curve + from sklearn.svm import SVC + import numpy as np + ``` + +1. X ve y koordinatlarını eğitme için iki veri iskeletine bölün. `cuisine` etiket veri iskeleti olabilir: + + ```python + cuisines_label_df = cuisines_df['cuisine'] + cuisines_label_df.head() + ``` + + Şöyle görünecek: + + ```output + 0 indian + 1 indian + 2 indian + 3 indian + 4 indian + Name: cuisine, dtype: object + ``` + +1. `Unnamed: 0` ve `cuisine` sütunlarını, `drop()` fonksiyonunu çağırarak temizleyin. Kalan veriyi eğitilebilir öznitelikler olarak kaydedin: + + ```python + cuisines_feature_df = cuisines_df.drop(['Unnamed: 0', 'cuisine'], axis=1) + cuisines_feature_df.head() + ``` + + Öznitelikleriniz şöyle görünüyor: + +| almond | angelica | anise | anise_seed | apple | apple_brandy | apricot | armagnac | artemisia | artichoke | ... | whiskey | white_bread | white_wine | whole_grain_wheat_flour | wine | wood | yam | yeast | yogurt | zucchini | +| -----: | -------: | ----: | ---------: | ----: | -----------: | ------: | -------: | --------: | --------: | ---: | ------: | ----------: | ---------: | ----------------------: | ---: | ---: | ---: | ----: | -----: | -------: | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | + +Şimdi modelinizi eğitmek için hazırsınız! + +## Sınıflandırıcınızı seçme + +Veriniz temiz ve eğitme için hazır, şimdi bu iş için hangi algoritmanın kullanılması gerektiğine karar vermelisiniz. + +Scikit-learn, sınıflandırmayı gözetimli öğrenme altında grupluyor. Bu kategoride sınıflandırma için birçok yöntem görebilirsiniz. [Çeşitlilik](https://scikit-learn.org/stable/supervised_learning.html) ilk bakışta oldukça şaşırtıcı. Aşağıdaki yöntemlerin hepsi sınıflandırma yöntemlerini içermektedir: + +- Doğrusal Modeller +- Destek Vektör Makineleri +- Stokastik Gradyan İnişi +- En Yakın Komşu +- Gauss Süreçleri +- Karar Ağaçları +- Topluluk Metotları (Oylama Sınıflandırıcısı) +- Çok sınıflı ve çok çıktılı algoritmalar (çok sınıflı ve çok etiketli sınıflandırma, çok sınıflı-çok çıktılı sınıflandırma) + +> [Verileri sınıflandırmak için sinir ağlarını](https://scikit-learn.org/stable/modules/neural_networks_supervised.html#classification) da kullanabilirsiniz, ancak bu, bu dersin kapsamı dışındadır. + +### Hangi sınıflandırıcıyı kullanmalı? + +Şimdi, hangi sınıflandırıcıyı seçmelisiniz? Genellikle, birçoğunu gözden geçirmek ve iyi bir sonuç aramak deneme yollarından biridir. Scikit-learn, oluşturulmuş bir veri seti üzerinde KNeighbors, iki yolla SVC, GaussianProcessClassifier, DecisionTreeClassifier, RandomForestClassifier, MLPClassifier, AdaBoostClassifier, GaussianNB ve QuadraticDiscrinationAnalysis karşılaştırmaları yapan ve sonuçları görsel olarak gösteren bir [yan yana karşılaştırma](https://scikit-learn.org/stable/auto_examples/classification/plot_classifier_comparison.html) sunar: + +![sınıflandırıcıların karşılaştırılması](../images/comparison.png) +> Grafikler Scikit-learn dokümantasyonlarında oluşturulmuştur. + +> AutoML, bu karşılaştırmaları bulutta çalıştırarak bu problemi muntazam bir şekilde çözer ve veriniz için en iyi algoritmayı seçmenizi sağlar. [Buradan](https://docs.microsoft.com/learn/modules/automate-model-selection-with-azure-automl/?WT.mc_id=academic-15963-cxa) deneyin. + +### Daha iyi bir yaklaşım + +Böyle tahminlerle çözmekten daha iyi bir yol ise, indirilebilir [ML Kopya kağıdı](https://docs.microsoft.com/azure/machine-learning/algorithm-cheat-sheet?WT.mc_id=academic-15963-cxa) içindeki fikirlere bakmaktır. Burada, bizim çok sınıflı problemimiz için bazı seçenekler olduğunu görüyoruz: + +![çok sınıflı problemler için kopya kağıdı](../images/cheatsheet.png) +> Microsoft'un Algoritma Kopya Kağıdı'ndan, çok sınıflı sınıflandırma seçeneklerini detaylandıran bir bölüm + +:white_check_mark: Bu kopya kağıdını indirin, yazdırın ve duvarınıza asın! + +### Akıl yürütme + +Elimizdeki kısıtlamalarla farklı yaklaşımlar üzerine akıl yürütelim: + +- **Sinir ağları çok ağır**. Temiz ama minimal veri setimizi ve eğitimi not defterleriyle yerel makinelerde çalıştırdığımızı göz önünde bulundurursak, sinir ağları bu görev için çok ağır oluyor. +- **İki sınıflı sınıflandırıcısı yok**. İki sınıflı sınıflandırıcı kullanmıyoruz, dolayısıyla bire karşı hepsi (one-vs-all) yöntemi eleniyor. +- **Karar ağacı veya lojistik regresyon işe yarayabilirdi**. Bir karar ağacı veya çok sınıflı veri için lojistik regresyon işe yarayabilir. +- **Çok Sınıf Artırmalı Karar Ağaçları farklı bir problemi çözüyor**. Çok sınıf artırmalı karar ağacı, parametrik olmayan görevler için en uygunu, mesela sıralama (ranking) oluşturmak için tasarlanan görevler. Yani, bizim için kullanışlı değil. + +### Scikit-learn kullanımı + +Verimizi analiz etmek için Scikit-learn kullanacağız. Ancak, Scikit-learn içerisinde lojistik regresyonu kullanmanın birçok yolu var. [Geçirilecek parametreler](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html?highlight=logistic%20regressio#sklearn.linear_model.LogisticRegression) göz atın. + +Aslında, Scikit-learn'den lojistik regresyon yapmasını beklediğimizde belirtmemiz gereken `multi_class` ve `solver` diye iki önemli parametre var. `multi_class` değeri belli bir davranış uygular. Çözücünün değeri, hangi algoritmanın kullanılacağını gösterir. Her çözücü her `multi_class` değeriyle eşleştirilemez. + +Dokümanlara göre, çok sınıflı durumunda eğitme algoritması: + +- Eğer `multi_class` seçeneği `ovr` olarak ayarlanmışsa, **bire karşı diğerleri (one-vs-rest, OvR) şemasını kullanır** +- Eğer `multi_class` seçeneği `multinomial` olarak ayarlanmışsa, **çapraz düzensizlik yitimini/kaybını kullanır**. (Güncel olarak `multinomial` seçeneği yalnızca ‘lbfgs’, ‘sag’, ‘saga’ ve ‘newton-cg’ çözücüleriyle destekleniyor.) + +> :mortar_board: Buradaki 'şema' ya 'ovr' (one-vs-rest, yani bire karşı diğerleri) ya da 'multinomial' olabilir. Lojistik regresyon aslında ikili sınıflandırmayı desteklemek için tasarlandığından, bu şemalar onun çok sınıflı sınıflandırma görevlerini daha iyi ele alabilmesini sağlıyor. [kaynak](https://machinelearningmastery.com/one-vs-rest-and-one-vs-one-for-multi-class-classification/) + +> :mortar_board: 'Çözücü', "eniyileştirme probleminde kullanılacak algoritma" olarak tanımlanır. [kaynak](https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LogisticRegression.html?highlight=logistic%20regressio#sklearn.linear_model.LogisticRegression) + +Scikit-learn, çözücülerin, farklı tür veri yapıları tarafından sunulan farklı meydan okumaları nasıl ele aldığını açıklamak için bu tabloyu sunar: + +![çözücüler](../images/solvers.png) + +## Alıştırma - veriyi bölün + +İkincisini önceki derte öğrendiğinizden, ilk eğitme denememiz için lojistik regresyona odaklanabiliriz. +`train_test_split()` fonksiyonunu çağırarak verilerinizi eğitme ve sınama gruplarına bölün: + +```python +X_train, X_test, y_train, y_test = train_test_split(cuisines_feature_df, cuisines_label_df, test_size=0.3) +``` + +## Alıştırma - lojistik regresyon uygulayın + +Çok sınıflı durumu kullandığınız için, hangi _şemayı_ kullanacağınızı ve hangi _çözücüyü_ ayarlayacağınızı seçmeniz gerekiyor. Eğitme için, bir çok sınıflı ayarında LogisticRegression ve **liblinear** çözücüsünü kullanın. + +1. multi_class'ı `ovr` ve solver'ı `liblinear` olarak ayarlayarak bir lojistik regresyon oluşturun: + + ```python + lr = LogisticRegression(multi_class='ovr',solver='liblinear') + model = lr.fit(X_train, np.ravel(y_train)) + + accuracy = model.score(X_test, y_test) + print ("Accuracy is {}".format(accuracy)) + ``` + + :white_check_mark: Genelde varsayılan olarak ayarlanan `lbfgs` gibi farklı bir çözücü deneyin. + + > Not olarak, gerektiğinde verinizi düzleştirmek için Pandas [`ravel`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.ravel.html) fonksiyonunu kullanın. + + Doğruluk **%80** üzerinde iyidir! + +1. Bir satır veriyi (#50) sınayarak bu modeli eylem halinde görebilirsiniz: + + ```python + print(f'ingredients: {X_test.iloc[50][X_test.iloc[50]!=0].keys()}') + print(f'cuisine: {y_test.iloc[50]}') + ``` + + Sonuç bastırılır: + + ```output + ingredients: Index(['cilantro', 'onion', 'pea', 'potato', 'tomato', 'vegetable_oil'], dtype='object') + cuisine: indian + ``` + + :white_check_mark: Farklı bir satır sayısı deneyin ve sonuçları kontrol edin + +1. Daha derinlemesine inceleyerek, bu öngörünün doğruluğunu kontrol edebilirsiniz: + + ```python + test= X_test.iloc[50].values.reshape(-1, 1).T + proba = model.predict_proba(test) + classes = model.classes_ + resultdf = pd.DataFrame(data=proba, columns=classes) + + topPrediction = resultdf.T.sort_values(by=[0], ascending = [False]) + topPrediction.head() + ``` + + Sonuç bastırılır - Hint mutfağı iyi olasılıkla en iyi öngörü: + + | | 0 | + | -------: | -------: | + | indian | 0.715851 | + | chinese | 0.229475 | + | japanese | 0.029763 | + | korean | 0.017277 | + | thai | 0.007634 | + + :while_check_mark: Modelin, bunun bir Hint mutfağı olduğundan nasıl emin olduğunu açıklayabilir misiniz? + +1. Regresyon derslerinde yaptığınız gibi, bir sınıflandırma raporu bastırarak daha fazla detay elde edin: + + ```python + y_pred = model.predict(X_test) + print(classification_report(y_test,y_pred)) + ``` + + | | precision | recall | f1-score | support | + | ------------ | ------ | -------- | ------- | ---- | + | chinese | 0.73 | 0.71 | 0.72 | 229 | + | indian | 0.91 | 0.93 | 0.92 | 254 | + | japanese | 0.70 | 0.75 | 0.72 | 220 | + | korean | 0.86 | 0.76 | 0.81 | 242 | + | thai | 0.79 | 0.85 | 0.82 | 254 | + | accuracy | 0.80 | 1199 | | | + | macro avg | 0.80 | 0.80 | 0.80 | 1199 | + | weighted avg | 0.80 | 0.80 | 0.80 | 1199 | + +## :rocket: Meydan Okuma + +Bu derste, bir grup malzemeyi baz alarak bir ulusal mutfağı öngörebilen bir makine öğrenimi modeli oluşturmak için temiz verinizi kullandınız. Scikit-learn'ün veri sınıflandırmak için sağladığı birçok yöntemi okumak için biraz vakit ayırın. Arka tarafta neler olduğunu anlamak için 'çözücü' kavramını derinlemesine inceleyin. + +## [Ders sonrası kısa sınavı](https://jolly-sea-0a877260f.azurestaticapps.net/quiz/22/?loc=tr) + +## Gözden geçirme & kendi kendine çalışma + +[Bu deste](https://people.eecs.berkeley.edu/~russell/classes/cs194/f11/lectures/CS194%20Fall%202011%20Lecture%2006.pdf) lojistik regresyonun arkasındaki matematiği derinlemesine inceleyin. +## Ödev + +[Çözücüleri çalışın](assignment.tr.md) diff --git a/4-Classification/2-Classifiers-1/translations/assignment.tr.md b/4-Classification/2-Classifiers-1/translations/assignment.tr.md new file mode 100644 index 00000000..9b545f1a --- /dev/null +++ b/4-Classification/2-Classifiers-1/translations/assignment.tr.md @@ -0,0 +1,8 @@ +# Çözücüleri çalışın +## Yönergeler + +Bu derste, doğru bir model yaratmak için algoritmaları bir makine öğrenimi süreciyle eşleştiren çeşitli çözücüleri öğrendiniz. Derste sıralanan çözücüleri inceleyin ve iki tanesini seçin. Kendi cümlelerinizle, bu iki çözücünün benzerliklerini ve farklılıklarını bulup yazın. Ne tür problemleri ele alıyorlar? Çeşitli veri yapılarıyla nasıl çalışıyorlar? Birini diğerine neden tercih ederdiniz? + +| Ölçüt | Örnek Alınacak Nitelikte | Yeterli | Geliştirme Gerekli | +| -------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------------------------- | +| | Her biri bir çözücü üzerine yazılmış, onları dikkatle karşılaştıran ve iki paragraf içeren bir .doc dosyası sunulmuş | Bir paragraf içeren bir .doc dosyası sunulmuş | Görev tamamlanmamış | From 3707c00ab3355b357e91e0471e081a32c0a7e5f2 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Mon, 19 Jul 2021 19:48:02 +0300 Subject: [PATCH 88/91] Add Turkish translation of Classifiers-1 --- 4-Classification/2-Classifiers-1/translations/assignment.tr.md | 1 + 1 file changed, 1 insertion(+) diff --git a/4-Classification/2-Classifiers-1/translations/assignment.tr.md b/4-Classification/2-Classifiers-1/translations/assignment.tr.md index 9b545f1a..10d4c64f 100644 --- a/4-Classification/2-Classifiers-1/translations/assignment.tr.md +++ b/4-Classification/2-Classifiers-1/translations/assignment.tr.md @@ -2,6 +2,7 @@ ## Yönergeler Bu derste, doğru bir model yaratmak için algoritmaları bir makine öğrenimi süreciyle eşleştiren çeşitli çözücüleri öğrendiniz. Derste sıralanan çözücüleri inceleyin ve iki tanesini seçin. Kendi cümlelerinizle, bu iki çözücünün benzerliklerini ve farklılıklarını bulup yazın. Ne tür problemleri ele alıyorlar? Çeşitli veri yapılarıyla nasıl çalışıyorlar? Birini diğerine neden tercih ederdiniz? +## Rubrik | Ölçüt | Örnek Alınacak Nitelikte | Yeterli | Geliştirme Gerekli | | -------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ---------------------------- | From e2a499310553f917b9a32eacdcf9c2e30330047a Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Mon, 19 Jul 2021 19:52:29 +0300 Subject: [PATCH 89/91] Fix typo --- translations/README.tr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/README.tr.md b/translations/README.tr.md index cc517004..f4dab353 100644 --- a/translations/README.tr.md +++ b/translations/README.tr.md @@ -100,7 +100,7 @@ Bu eğitim programını oluştururken iki pedagojik ilke seçtik: uygulamalı ** | Ek Yazı | Gerçek Hayattan ML Senaryoları ve Uygulamaları | [Vahşi Doğada ML](../9-Real-World/README.md) | Klasik makine öğreniminin ilginç ve açıklayıcı gerçek hayat uygulamaları | [ders](../9-Real-World/1-Applications/README.md) | Takım | ## Çevrimdışı erişim -Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu yazılım havuzunu çatallayın, yerel makinenizde [Docsify'ı kurum](https://docsify.js.org/#/quickstart) ve sonra bu yazılım havuzunun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. +Bu dokümantasyonu [Docsify](https://docsify.js.org/#/) kullanarak çevrimdışı çalıştırabilirsiniz. Bu yazılım havuzunu çatallayın, yerel makinenizde [Docsify'ı kurun](https://docsify.js.org/#/quickstart) ve sonra bu yazılım havuzunun kök dizininde `docsify serve` yazın. İnternet sitesi, 3000 portunda `localhost:3000` yerel ana makinenizde sunulacaktır. ## PDF'ler From 534f059fef10a984cf17debb46800efcd4a131bf Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Mon, 19 Jul 2021 19:54:31 +0300 Subject: [PATCH 90/91] Fix file paths --- 4-Classification/1-Introduction/translations/README.tr.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/4-Classification/1-Introduction/translations/README.tr.md b/4-Classification/1-Introduction/translations/README.tr.md index e4cc372a..4b8c2c90 100644 --- a/4-Classification/1-Introduction/translations/README.tr.md +++ b/4-Classification/1-Introduction/translations/README.tr.md @@ -49,7 +49,7 @@ Scikit-learn, veriyi sınıflandırmak için kullanmak üzere, çözmek istediğ ## Alıştırma - verinizi temizleyip dengeleyin -Bu projeye başlamadan önce elinizdeki ilk görev, daha iyi sonuçlar almak için, verinizi temizlemek ve **dengelemek**. Bu klasördeki boş _notebook.ipynb_ dosyasıyla başlayın. +Bu projeye başlamadan önce elinizdeki ilk görev, daha iyi sonuçlar almak için, verinizi temizlemek ve **dengelemek**. Üst klasördeki boş _notebook.ipynb_ dosyasıyla başlayın. Kurmanız gereken ilk şey [imblearn](https://imbalanced-learn.org/stable/). Bu, veriyi daha iyi dengelemenizi sağlayacak bir Scikit-learn paketidir. (Bu görev hakkında birazdan daha fazla bilgi göreceksiniz.) @@ -74,7 +74,7 @@ Kurmanız gereken ilk şey [imblearn](https://imbalanced-learn.org/stable/). Bu, 1. Sonraki görev veriyi almak olacak: ```python - df = pd.read_csv('../../data/cuisines.csv') + df = pd.read_csv('../data/cuisines.csv') ``` `read_csv()` kullanmak _cusines.csv_ csv dosyasının içeriğini okuyacak ve `df` değişkenine yerleştirecek. @@ -275,7 +275,7 @@ Veriyi temizlediniz, şimdi [SMOTE](https://imbalanced-learn.org/dev/references/ ```python transformed_df.head() transformed_df.info() - transformed_df.to_csv("../../data/cleaned_cuisine.csv") + transformed_df.to_csv("../data/cleaned_cuisine.csv") ``` Bu yeni CSV şimdi kök data (veri) klasöründe görülebilir. From e3d630e499752e47b9e060f3b98535a574260382 Mon Sep 17 00:00:00 2001 From: Buse Orak Date: Mon, 19 Jul 2021 19:56:13 +0300 Subject: [PATCH 91/91] Link to translated lesson and fix typo --- 4-Classification/translations/README.tr.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/4-Classification/translations/README.tr.md b/4-Classification/translations/README.tr.md index 91b74255..347999d8 100644 --- a/4-Classification/translations/README.tr.md +++ b/4-Classification/translations/README.tr.md @@ -1,21 +1,21 @@ # Sınıflandırmaya başlarken ## Bölgesel konu: Leziz Asya ve Hint Mutfağı :ramen: -Asya ve Hindistan'da yemek gelenekleri fazlaca çeşitlilik gösterir ve çok lezzetlidir! Malzemelerini anlamaya çalışmak için bölgesel mutfak hakkındaki verilere bakalım. +Asya ve Hindistan'da yemek gelenekleri fazlaca çeşitlilik gösterir ve çok lezzetlidir! Malzemelerini anlamaya çalışmak için bölgesel mutfaklar hakkındaki veriye bakalım. ![Taylandlı yemek satıcısı](../images/thai-food.jpg) > Fotoğraf Lisheng Chang tarafından çekilmiştir ve Unsplash'tadır. ## Öğrenecekleriniz -Bu bölümde, bu eğitim programının tamamen regresyon üzerine olan ilk bölümünde öğrendiğiniz becerilere dayanıp onların üstüne beceriler ekleyeceksiniz ve verileriniz hakkında bilgi sahibi olmanızı sağlayacak diğer sınıflandırıcıları öğreneceksiniz. +Bu bölümde, bu eğitim programının tamamen regresyon üzerine olan ilk bölümünde öğrendiğiniz becerilere dayanıp onların üstüne beceriler ekleyeceksiniz ve veriniz hakkında bilgi sahibi olmanızı sağlayacak diğer sınıflandırıcıları öğreneceksiniz. > Sınıflandırma modelleriyle çalışmayı öğrenmenizi sağlayacak faydalı düşük kodlu araçlar vardır. [Bu görev için Azure ML](https://docs.microsoft.com/learn/modules/create-classification-model-azure-machine-learning-designer/?WT.mc_id=academic-15963-cxa)'i deneyin. ## Dersler 1. [Sınıflandırmaya giriş](../1-Introduction/translations/README.tr.md) -2. [Daha fazla sınıflandırıcı](../2-Classifiers-1/README.md) +2. [Daha fazla sınıflandırıcı](../2-Classifiers-1/translations/README.tr.md) 3. [Hatta daha fazla sınıflandırıcı](../3-Classifiers-2/README.md) 4. [Uygulamalı Makine Öğrenimi: bir web uygulaması oluşturun](../4-Applied/README.md) ## Katkıda bulunanlar