Skip to content

Naivebayes exercicio #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2017/03-classificacao-scikit-learn/hands-on-knn.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.2"
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down
318 changes: 318 additions & 0 deletions 2017/04-knn-exercicio/knn_joel_ribeiro.ipynb

Large diffs are not rendered by default.

892 changes: 892 additions & 0 deletions 2017/04-knn-exercicio/train.csv

Large diffs are not rendered by default.

30 changes: 22 additions & 8 deletions 2017/05-naive-bayes/Naive_Bayes_Francisco_Carlos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@
{
"cell_type": "code",
"execution_count": 535,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Separa em conjunto de treino (70%) e teste (30%)\n",
Expand All @@ -181,7 +183,9 @@
{
"cell_type": "code",
"execution_count": 536,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#separa conjunto de teste em features e classe e calcula o tamanho total de treino\n",
Expand Down Expand Up @@ -535,7 +539,9 @@
{
"cell_type": "code",
"execution_count": 546,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#feature_index = [(frequency_label.loc[i] == data.loc[i]).argmax() for i in data.index]\n",
Expand All @@ -545,7 +551,9 @@
{
"cell_type": "code",
"execution_count": 547,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Faz a predição do conjunto de teste\n",
Expand All @@ -569,7 +577,9 @@
{
"cell_type": "code",
"execution_count": 548,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"result_y = np.squeeze(np.asarray(predicts))\n",
Expand Down Expand Up @@ -644,7 +654,9 @@
{
"cell_type": "code",
"execution_count": 552,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Transforma os valores string em númericos\n",
Expand All @@ -666,7 +678,9 @@
{
"cell_type": "code",
"execution_count": 553,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"#Faz o fit e o predict com a implementação do scikit\n",
Expand Down Expand Up @@ -787,7 +801,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.1"
}
},
"nbformat": 4,
Expand Down
Loading