Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

apply WEKA filter on customer dataset

# imports
import weka.core.converters.ConverterUtils.DataSource as DS
import weka.filters.Filter as Filter
import weka.filters.unsupervised.attribute.Remove as Remove
import os

# load data
data = DS.read(os.environ.get("MOOC_DATA") + os.sep + "iris.arff")

# remove class attribute
rem = Remove()
rem.setOptions(["-R", "last"])
rem.setInputFormat(data)
dataNew = Filter.useFilter(data, rem)

# output filtered dataset
print(dataNew)
Comment

PREVIOUS NEXT
Code Example
Python :: keyword only arguments python 
Python :: Python NumPy squeeze function Example with axis=1 
Python :: Python NumPy atleast_3d Function Syntax 
Python :: Python NumPy atleast_1d Function Example 
Python :: Python NumPy moveaxis function Example 02 
Python :: seasonal plot python 
Python :: display colors in python console 
Python :: django.db.utils.operationalerror: (1051, "unknown table 
Python :: Set changed size during iteration 
Python :: codeforces problem 200B 
Python :: Python NumPy hstack Function Example with 2d array 
Python :: percentile of a score python 
Python :: Python NumPy hsplit Function 
Python :: maximaze window in tkinter 
Python :: Python __le__ magic method 
Python :: what are while loops in python 
Python :: check if string is palindrome using recursion in python 
Python :: WAP to input 3 no.s and print their sum. 
Python :: using .get() for deep dictionary 
Python :: complete dates pandas per group by 
Python :: call a Python range() using range(start, stop) 
Python :: ccacxc 
Python :: python extract multiple values from a single cell in a dataframe column using pandas 
Python :: groupby and add aggregated column 
Python :: object get in djangi 
Python :: Deploying matlab app on the web using python 
Python :: python compare number with a precision 
Python :: random pick and remove index pandas 
Python :: qtextedit insert unicode 
Python :: how to get only the string of the input not the spaces arournd it in python 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =