Skip to content
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

git add doc/foo.txt #1

Open
wants to merge 5 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
1 change: 1 addition & 0 deletions Pyhton/P.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions Pyhton/PRE-PROCESAMIENTO.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
Created on Tue May 21 23:49:01 2019
"""
#PLANTILLA DE PRE PROCESADO

#IMPORTAR LAS LIBRERIAS

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd


#IMPORTAR EL DATASET
dataset = pd.read_csv('Data.csv')

x = dataset.iloc[ : , :-1 ].values #MATRIZ DE DATOS INDEPENDIENTES

y = dataset.iloc[ : , 3 ].values #VECTOR DE DATOS DEPENDIENTES

#LIMPIEZA DE DATOS O TRATAMIENTO DE LOS NA(NULL)
from sklearn.preprocessing import Imputer
imputer = Imputer(missing_values = "NaN", strategy = "mean", axis = 0)
imputer = imputer.fit(x[:,1:3])
x[:, 1:3] = imputer.transform(x[:, 1:3])

x
12 changes: 12 additions & 0 deletions R/Pre procesamiento.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#PLANTILLA DE PRE PROCESADO
#IMPORTAR EL DATASET
dataset = read.csv('Data.csv')

#LIMPIEZA DE DATOS O TRATAMIENTO DE LOS NA(NULL)
dataset$Age = ifelse (is.na(dataset$Age),
ave(dataset$Age, FUN = function(x) mean(x, na.rm = TRUE)),
dataset$Age)

dataset$Salary = ifelse (is.na(dataset$Salary),
ave(dataset$Salary, FUN = function(x) mean(x, na.rm = TRUE)),
dataset$Salary)
1 change: 1 addition & 0 deletions R/r.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@