Using Silhouette analysis for selecting the number of cluster for K-means clustering. (Part 2)

Postado em

Data science musing of kapild.

Continuing from my last post on k-means clustering, in this post I will talk about how to use `Silhouette analysis` for selecting number of clusters for K-means clustering.

What is Silhouette analysis (S.A.)?: S.A. is a way to measure how close each point in a cluster is to the points in its neighboring clusters. Its a neat way to find out the optimum value for k during k-means clustering. Silhouette values lies in the range of [-1, 1]. A value of +1 indicates that the sample is far away from its neighboring cluster and very close to the cluster its assigned. Similarly, value of -1 indicates that the point is close to its neighboring cluster than to the cluster its assigned. And, a value of 0 means its at the boundary of the distance between the two cluster. Value of +1 is idea and -1 is least preferred. Hence…

Ver o post original 546 mais palavras

Dois portugueses e o negociante faz tudo

Postado em

Conheci dois portugueses que tinha juntos uma frota de taxis.

Durante um ano um trabalhava e o outro tirava ferias, e assim sucessivamente. Um tomava conta, o outro , férias de 1 ano. 1 ANO !!!

Ja o empresario faz-tudo não tem férias. E quando fica doente quem cuida? O problema não é falir com a doença, deixando familiares na mão. O problema são as contas a pagar e compromissos não cumpridos. Estes podem dar em ações judiciais, indenizações. E tem a perda dos empregados, com consequentes ações trabalistas.

Ou seja, se o negocio cresce vc te que se preocupar com a continuidade, e com gerentes e supervisoes. Assim se o negocio expandir, vc tem que ver se vc tem lucro ou só trabalha, e se vc vive para trabalhar

Planeje-se antes de abrir um negócio “rentável” . Anúcios motram sempre o cara de sucesso, sorrindo e feliz. Não mostra o caso dos que quebraram.

 

Esta empreendedora teve sua ideia rejeitada ‘só’ 90 vezes

Postado em

São Paulo – “O mundo adora dizer ‘não’”. Esta é a conclusão da empreendedora americana Danae Ringelmann, ao relembrar o início do seu negócio. A ideia de Ringelmann foi rejeitada “apenas” 90 vezes antes de conseguir levantar seu primeiro dólar em investimento.

Mas o mais importante: ela não desistiu, e hoje o resultado é recompensador. Ringelmann é uma das fundadoras do Indiegogo, uma plataforma de crowdfunding que visa ajudar empreendedores a conseguir investimento.

Migrating from Eclipse ADT

Postado em

Migrating from Eclipse ADT to Android Studio requires adapting to a new project structure, build system, and IDE functionality. To simplify the migration process, Android Studio provides an import tool so you can quickly transition your Eclipse ADT workspaces and Ant build scripts to Android Studio projects and Gradle-based build files.

This document provides an overview of the migration process and walks you through a sample import procedure. For more information about Android Studio features and the Gradle-based build system, see Android Studio Overview and Configuring Gradle Builds.

Migration Overview


Migrating from Eclipse to Android Studio requires that you change the structure of your development projects, move to a new build system, and use a new user interface. Here are some of the key changes you should be aware of as you prepare to migrate to Android Studio:

  • Project filesAndroid Studio uses a different project structure. Each Eclipse ADT project is called a module in Android Studio. Each instance of Android Studio contains a project with one or more app modules. For more information see, Project Structure.
  • Manifest settingsSeveral elements in the AndroidManifest.xml file are now properties in the defaultConfig and productFlavorsblocks in the build.gradle file. These elements are still valid manifest entries and may appear in manifests from older projects, imported projects, dependencies, and libraries. For more information see, Manifest Settings.
  • DependenciesLibrary dependencies are handled differently in Android Studio, using Gradle dependency declarations and Maven dependencies for well-known local source and binary libraries with Maven coordinates. For more information see,Dependencies
  • Test codeWith Eclipse ADT, test code is written in separate projects and integrated through the <instrumentation> element in your manifest file. Android Studio provides a AndroidTest folder within your project so you can easily add and maintain your test code within the same project view. JUnit tests can also be configured to run locally to reduce testing cycles.
  • Gradle-based build systemIn place of XML-based Ant build files, Android Studio supports Gradle build files, which use the Gradle Domain Specific Language (DSL) for ease of extensibility and customization. The Android Studio build system also supports build variants, which are combinations of productFlavor and buildTypes, to customize your build outputs.
  • User interfaceAndroid Studio provides an intuitive interface and menu options based on the IntelliJ IDEA IDE. To become familiar with the IDE basics, such as navigation, code completion, and keyboard shortcuts, see IntelliJ IDEA Quick Start Guide.
  • Developer tools versioningAndroid Studio updates independently of the Gradle-based build system so different build settings can be applied across different versions of command line, Android Studio, and continuous integration builds. For more information, see Configuring Gradle Builds.

Migration Prerequisites


Before migrating your Eclipse ADT app to Android Studio, review the following steps to make sure your project is ready for conversion, and verify you have the tool configuration you need in Android Studio:

  • In Eclipse ADT:
    • Make sure the Eclipse ADT root directory contains the AndroidManifest.xml file. Also, the root directory must contain either the .project and .classpath files from Eclipse or the res/ and src/ directories.
    • Build your project to ensure your latest workspace and project updates are saved and included in the import.
    • Comment out any references to Eclipse ADT workspace library files in the project.properties or .classpathfiles for import. You can add these references in the build.gradle file after the import. For more information, seeConfiguring Gradle Builds.
    • It may be useful to record your workspace directory, path variables, and any actual path maps that could be used to specify any unresolved relative paths, path variables, and linked resource references. Android Studio allows you to manually specify any unresolved paths during the import process.
  • In Android Studio:
    • Make a note of any third-party Eclipse ADT plugins in use and check for equivalent features in Android Studio or search for a compatible plugin in the IntelliJ Android Studio Plugins repository. Use the File > Settings > Pluginsmenu option to manage plugins in Android Studio. Android Studio does not migrate any third-party Eclipse ADT plugins.
    • If you plan to run Android Studio behind a firewall, be sure to set the proxy settings for Android Studio and the SDK Manager. Android Studio requires an internet connection for Setup Wizard synchronization, 3rd-party library access, access to remote repositories, Gradle initialization and synchronization, and Android Studio version updates. For more information, see Proxy Settings.
    • Use the File > Settings > System Settings menu option to verify the current version and, if necessary, update Android Studio to the latest version from the stable channel. To install Android Studio, please visit the Android Studio download page.

Importing Projects to Android Studio


Android Studio provides a function for importing Eclipse ADT projects, which creates a new Android Studio project and app modules based on your current Eclipse ADT workspace and projects. No changes are made to your Eclipse project files. The Eclipse ADT workspace becomes a new Android Studio project, and each Eclipse ADT project within the workspace becomes a new Android Studio module. Each instance of Android Studio contains a project with one or more app modules.

After selecting an Eclipse ADT project to import, Android Studio creates the Android Studio project structure and app modules, generates the new Gradle-based build files and settings, and configures the required dependencies. The import options also allow you to enter your workspace directory and any actual path maps to handle any unresolved relative paths, path variables, and linked resource references.

Depending on the structure of your Eclipse ADT development project, you should select specific files for importing:

  • For workspaces with multiple projects, select the project folder for each Eclipse ADT project individually to import the projects into the same Android Studio project. Android Studio combines the Eclipse ADT projects into a single Android Studio project with different app modules for each imported project.
  • For Eclipse ADT projects with separate test projects, select the test project folder for import. Android Studio imports the test project and then follows the dependency chain to import the source project and any project dependencies.
  • If Eclipse ADT projects share dependencies within the same workspace, import each project individually into Android Studio. Android Studio maintains the shared dependencies across the newly created modules as part of the import process.

To import a project to Android Studio:

  1. Start Android Studio and close any open Android Studio projects.
  2. From the Android Studio menu select File > New > Import Project.Alternatively, from the Welcome screen, select Import project (Eclipse ADT, Gradle, etc.).
  3. Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok.
  4. Select the destination folder and click Next.
  5. Select the import options and click Finish.The import process prompts to migrate any library and project dependencies to Android Studio, and add the dependency declarations to the build.gradle file. The import process also replaces any well-known source libraries, binary libraries, and JAR files that have known Maven coordinates with Maven dependencies, so you no longer need to maintain these dependencies manually. The import options also allow you to enter your workspace directory and any actual path maps to handle any unresolved relative paths, path variables, and linked resource references.

  6. Android Studio imports the app and displays the project import summary. Review the summary for details about the project restructuring and the import process.

After importing the project from Eclipse ADT to the new Android Studio project and module structure, each app module folder in Android Studio contains the complete source set for that module, including the src/main and src/androidTestdirectories, resources, build file, and Android manifest. Before starting app development, you should resolve any issues shown in the project import summary to make sure the project re-structuring and import process completed properly.

Validating imported projects

After completing the import process, use the Android Studio Build and Run menu options to build your project and verify the output. If your project is not building properly, check the following settings:

      • Use the Android SDK button in Android Studio to launch the SDK Manager and verify the installed versions of SDK tools, build tools, and platform match the settings for your Eclipse ADT project. Android Studio inherits the SDK Manager and JDK settings from your imported Eclipse project.
      • Use the File > Project Structure menu option to verify additional Android Studio settings:
        • Under SDK Location verify Android Studio has access to the correct SDK and JDK locations and versions.
        • Under Project verify the Gradle version, Android Plugin version, and related repositories.
        • Under Modules verify the app and module settings, such as signing configuration and library dependencies.
      • If your project depends on another project, make sure that dependency is defined properly in the build.gradle file in the app module folder.

If there still are unexpected issues when building and running your project in Android Studio after you have checked these settings, consider modifying the Eclipse ADT project and re-starting the import process. Importing an Eclipse ADT project to Android Studio creates a new Android Studio project and does not impact the existing Eclipse ADT project.

To get started using Android Studio, review the Android Studio features and Gradle-based build system to become familiar with the new project and module structure, flexible build settings, and other advanced Android development capabilities. For a comparison of Eclipse ADT and Android Studio features and usage, see Transitioning to Android Studio from Eclipse. For specific Android Studio how-to documentation, see the pages in the Workflow section.

Terms of service

Postado em

Effective Date: August 8, 2015

A Violation of any of the below Terms of Service will result in action by 000Webhost up to and possibly including the termination of your account, with or without warning.

000Webhost is a private service which provides free web hosting. We offer our free members up to 1500MB of web space, and 100GB data transfer per account. 000Webhost reserves the right to cancel any account for any reason or no reason at all. 000Webhost provides web hosting to any site that abides to our terms and conditions. 000Webhost reserves the right to change the terms and conditions at any time. 000Webhost users are entirely liable for all activities conducted through their account.

The following rules apply while using 000Webhost services:

The most important rules are:

1. No adult content of any kind

2. No warez / hacking / phishing sites

3. No mass mailers / spammers (account will be automatically suspended if you try to send mass mail), so if your software supports such feature, disable it right now.

4. We do not allow any file sharing or file download scripts to be run.

5. Chat, proxy scripts are not allowed. (allowed if you upgrade account)

6. Paid-to-surf, auto-surf, buxto, and any other similar scripts are banned(allowed if you upgrade account)

7. We do not allow online gaming scripts such as ogame, mafia, etc.. (allowed if you upgrade account)

8. Nulled software such as ip.board or vbulletin is not allowed to be hosted

9. Account cannot be used to store files only

10. Sites related to torrents cannot be hosted (allowed if you upgrade account)

Other rules:
Obscene, graphically violent, and other inappropriate content is strictly prohibited.

000Webhost is not responsible for the content of any member homepages. We reserve the right to remove any homepages that are in violation of our terms and conditions. Members will be held legally responsible for the contents of their web pages including but not limited to use of copyrighted material without the permission of the author or posting material considered indecent for minors. The use of 000Webhost Homepages for illegal purposes is strictly forbidden and any homepage found to be or believed to be, in 000Webhost sole discretion, violating the law may be removed without notice. 000Webhost membership will be revoked if any of the following activities occur:

• Hate, Bigotry, and/or Intolerance
• Warez or Software Piracy related
• Music Piracy Related
• Hacking Related
• Making available copyrighted software which has been “cracked” (e.g., copyright protection for the software has been removed)
• Making available serial numbers for software which can be used to illegally validate or register software.
• Making available tools which can be used for no purpose other than “cracking” software.
• Spamming to promote your website
• Anything related to illegal activity

You agree to not use the Service to:

1. upload, post, email, transmit or otherwise make available any Content that is unlawful, harmful, threatening, abusive, harassing, tortious, defamatory, vulgar, obscene, libelous, invasive of another’s privacy, hateful, or racially, ethnically or otherwise objectionable;
2. harm minors in any way;
3. impersonate any person or entity.
4. forge headers or otherwise manipulate identifiers in order to disguise the origin of any Content transmitted through the Service;
5. upload, post, email, transmit or otherwise make available any Content that you do not have a right to make available under any law or under contractual or fiduciary relationships (such as inside information, proprietary and confidential information learned or disclosed as part of employment relationships or under nondisclosure agreements);
6. upload, post, email, transmit or otherwise make available any Content that infringes any patent, trademark, trade secret, copyright or other proprietary rights (“Rights”) of any party;
7. upload, post, email, transmit or otherwise make available any unsolicited or unauthorized advertising, promotional materials, “junk mail,” “spam,” “chain letters,” “pyramid schemes,” or any other form of solicitation, except in those areas (such as shopping) that are designated for such purpose ;
8. upload, post, email, transmit or otherwise make available any material that contains software viruses or any other computer code, files or programs designed to interrupt, destroy or limit the functionality of any computer software or hardware or telecommunications equipment;
9. upload, post, email, transmit or otherwise make available any material that is of broadcast / streaming types.
10. interfere with or disrupt the Service or servers or networks connected to the Service, or disobey any requirements, procedures, policies or regulations of networks connected to the Service;
11. intentionally or unintentionally violate any applicable local, state, national or international law, including, but not limited to, regulations promulgated by the U.S. Securities and Exchange Commission, any rules of any national or other securities exchange, including, without limitation, the New York Stock Exchange, the American Stock Exchange or the NASDAQ, and any regulations having the force of law;
12. provide material support or resources (or to conceal or disguise the nature, location, source, or ownership of material support or resources) to any organization(s) designated by the United States government as a foreign terrorist organization pursuant to section 219 of the Immigration and Nationality Act;
13. “stalk” or otherwise harass another; and/or
14. upload, post, email, transmit or otherwise material for the purposes of file distribution, relay, or streaming reasons.
15. execute slow MySQL queries or overload the server your account is hosted on.
16. collect or store personal data about other users in connection with the prohibited conduct and activities set forth in paragraphs 1 through 14 above.

We do not allow any type of programs, software, or MP3 files on our server unless you are the full owner and have all rights to the file. Copyrighted files not belonging to users posting those files may be deleted without notice!
You and any person who has access to your account must evaluate, and bear the risk associated with, the accuracy, completeness or usefulness of any Content. 000Webhost reserves the right to remove Content which is deemed in 000Webhost sole discretion harmful, offensive, or otherwise in violation of the Rules or any rules or policies 000Webhost has in place at the time.
In order to keep your client profile active you should login to the members area at least one time a year. By logon to our members area you will show that you are still using our services. While we will never delete your account even if you do not login to the members area for more than one year, we reserve a right to disable some account features that we advertise on our homepage.
You or 000Webhost may terminate your Account at any time for any reason. To remove your 000Webhost site and account, log in and visit your My Account section.

THE 000Webhost SERVICE IS PROVIDED TO YOU “AS IS” AND “AS AVAILABLE” WITH NO WARRANTY. TO THE MAXIMUM EXTENT PERMITTED BY LAW, 000Webhost DISCLAIMS ALL WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, THE IMPLIED CONDITION OF SATISFACTORY QUALITY AND IMPLIED WARRANTIES ARISING FROM COURSE OF DEALING OR COURSE OF PERFORMANCE. YOU ACKNOWLEDGE THAT IF YOU RELY ON ANY INFORMATION OR CONTENT ON THE SERVICE, YOU DO SO SOLELY AT YOUR OWN RISK.

000Webhost will not be liable for any of its services. We have the right to cancel our service at any time, and we will not be liable for any files that are lost and/or corrupted which may occur (including, for example, from a system crash, security breach, or hard disk failure).
By signing up with 000webhost.com, your email is automatically added to our mailing list. 000webhost.com reserves a right to send you 1 promotional email message every month. You may opt out of emails you receive from 000webhost.com by visiting http://members.000webhost.com/unsubscribe.php
000webhost.com will show 1 popup per website once in 7 days. This feature can be disabled from members area.
000webhost.com reserves the right to suspend resource-intensive websites until customer upgrades his account.
To the full extent permissible under the applicable law, 000Webhost shall not be liable for any direct, indirect, incidental, special or consequential damages resulting from the use or inability to use 000Webhost services. You agree, at your own expense, to indemnify, defend and hold harmless 000Webhost and its affiliates, officers, directors, employees, consultants, agents, suppliers and licensors from and against any and all third party claims, liability, damages, losses and/or costs (including but not limited to reasonable attorneys’ fees) arising from or relating to: (a) your failure to comply with these terms of use; (b) your infringement or violation of any intellectual property or other right of a third party; or (c) your violation of any applicable law.