jueves, diciembre 15, 2005

... and winter arrives to woodchuck.

In this blog, I would try to justify why use Hibernate instead of plain JDBC.

What is Hibernate? Hibernate is a powerful, high performance object/relational persistence and query service. What offer Hibernate? What makes better from other solutions?

  • First of all, Hibernate is considerated a professional open-source project.
  • It implements all Object Oriented Programming features like, associations, inheritance, polymorphism, composition and collections.
  • It is transparent to JDBC connections, but doesn't hide.
  • It has its query engine, HQL, Criteria and Query by Example, as well as native SQL.
  • Hibernate decouples business objects from RDMS, thanks of dialects. You can change your RDMS without changing business database process.
  • Hibernate lets you implements quality code, because it takes you to use good practices in patterns world. So easy to develop a Generic DAO pattern.
  • Easy to use. It is so easy to implements typical operations of the data layer. For example to insert a tuple into database it is as easy as call session.save(Object obj).
  • The model objects (Value Objects or Tranfer Objects), haven't any dependency to hibernate, you musn't extend them from any hibernate class. Hibernate would use reflection and configuration files to know which classes and fields must be supported by database operations.
  • Hibernate can work with cache services and transactional services. Typically JTA and JBossCache, but you can use any other.
  • Model objects have to be configured into Hibernate Engine. For this configuration, you have three possible strategies, XML Files, JDK5.0 (EJB3) Annotations or Hibernate XDoclet, so developer has variability at his point.
  • Hibernate Validator is an annotated solution for validating model objects, you can validate fields of your object model without implementing any conditional, only using field annotations.

martes, diciembre 06, 2005

Cross-Validation VS Bootstrap

When you develop a Machine Learning Technique, you need to know how better is your solution compared with other solutions.
There are a lot of methods, but the most used are Fold-Cross Validation and Bootstrap. Both are commonly used in classifiers system. In my thesis "Rule Induction Using Ants", we find not knowing with of two techniques we would use.

In paper "A study of Cross-Validation and Bootstrap dor Accuracy Estimation and Model Selection" written by Ron Kohavi are some experiments in C4.5 and Naive-Bayesian Classifiers. The results with that algorithms and six datasets are:

  • Bootstrap has low variance, but large bias in some problems.
  • K -Fold Cross Validation with moderate values (10-20), reduce the variance but increase bias.
  • Using Stratified strategy is better in terms of variance and bias, comparated with Regular Cross Validation.
So it seems that 10-Fold-Cross Validation is the best strategy tu use, but, are any better technique rather than Cross Validation and Bootstrap? And more important, that study has used only six datasets, has anybody know any study that say in which cases are better Bootstrap and which cases are K-Fold-Cross Validation?

That's all folks, I wish this Post could help someone.

Hello Everyone

Hello, this is my first Blog. I just don't know when I could write off another, but I promise writing new entries every time I can.

This blog try to be a discussion blog of Artificial Intelligence and Computer in General, but of course I am open to talk about any theme it could be interesting.

Also I would try to publish my research results in Artificial Intelligence and concretaly Emergent Intelligence.

I wish everyone could post comments and different points of view.