Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Home
Help
Search
Login
Register
RapidMiner
RapidMiner Forum
»
RapidMiner Studio
»
Development
»
Extend MissingVelueReplenishment with median calculations
Pages: [
1
]
« previous
next »
Print
Author
Topic: Extend MissingVelueReplenishment with median calculations (Read 2021 times)
der_maik81
Newbie
Posts: 2
Extend MissingVelueReplenishment with median calculations
«
on:
October 19, 2008, 11:11:23 AM »
Hello Folks,
I want to extend the operator "mssingValueReplenishment" with the possibility to calculate the median of a given attribute. I dont't really know how to start my coding.
Here the steps i did so far:
1) Extend the cases in
MissingValueReplenishment.public double getReplenishmentValue(int functionIndex, ExampleSet exampleSet, Attribute attribute, double currentValue, String valueString) with
case MEDIAN:
return exampleSet.getStatistics(attribute, Statistics.MEDIAN);
2) In addition to that in the interface "statistics" i'have added
public static final String MEDIAN = "median"
The attributes in my exampleSet are numerical by nature, so i think the key to solving my problem belongs to
3) NumericalStatistics.count(Attribute a) - Here the variance and the mean are calculated for the given attribute.
But now I don't know to go on.
I would be glad if someone has a tip how to proceed.
Thanks very much an best wishes,
Maik
Logged
Tobias Malbrecht
Global Moderator
Sr. Member
Posts: 293
Re: Extend MissingVelueReplenishment with median calculations
«
Reply #1 on:
October 19, 2008, 03:21:46 PM »
Hello Maik,
in principal, you could extend the NumericalStatistics to calculate the median as well. But from my point of view, I think for you it would be easier to simply calculate the median in the method getReplenishmentValue(...) from the data. Everything you need (example set, attribute) is available in that method, so no new methods etc. have to be added. This way however has the disadvantage of an additional data scan, but it is much easier to implement.
Hope that helps,
Tobias
Logged
Tobias Malbrecht
Director of Product Marketing
RapidMiner
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Community
-----------------------------
=> News and Updates
=> Data Mining
=> Chit Chat
-----------------------------
RapidMiner Studio
-----------------------------
=> Getting Started
=> Data Mining / ETL / BI Processes
=> Problems and Support
=> Feature Requests
=> Development
-----------------------------
RapidMiner Server (formerly RapidAnalytics)
-----------------------------
=> Getting Started
=> Applications and Integration
Loading...